Skip to content

Commit 8b9bbfd

Browse files
committed
Initial with requirements
0 parents  commit 8b9bbfd

12 files changed

+599
-0
lines changed

.gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# C extensions
6+
*.so
7+
8+
# Distribution / packaging
9+
.Python
10+
env/
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
*.egg-info/
22+
.installed.cfg
23+
*.egg
24+
25+
# PyInstaller
26+
# Usually these files are written by a python script from a template
27+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
28+
*.manifest
29+
*.spec
30+
31+
# Installer logs
32+
pip-log.txt
33+
pip-delete-this-directory.txt
34+
35+
# Unit test / coverage reports
36+
htmlcov/
37+
.tox/
38+
.coverage
39+
.cache
40+
nosetests.xml
41+
coverage.xml
42+
43+
# Translations
44+
*.mo
45+
*.pot
46+
47+
# Django stuff:
48+
*.log
49+
db.sqlite3
50+
local.py
51+
52+
# Sphinx documentation
53+
docs/_build/
54+
55+
# PyBuilder
56+
target/

LICENSE

+339
Large diffs are not rendered by default.

manage.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
import os
3+
import sys
4+
5+
if __name__ == "__main__":
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")
7+
8+
from django.core.management import execute_from_command_line
9+
10+
execute_from_command_line(sys.argv)

requirements.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Django==1.7.4
2+
Pillow==2.7.0
3+
Unidecode==0.04.17
4+
defusedxml==0.4.1
5+
django-allauth==0.19.1
6+
django-crispy-forms==1.4.0
7+
django-facebook==6.0.2
8+
oauthlib==0.7.2
9+
python3-openid==3.0.5
10+
requests==2.5.1
11+
requests-oauthlib==0.4.2

templates/404.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{%extends 'base.html'%}
2+
{%block body%}
3+
<div class='container text-center'>
4+
<h1>
5+
It appears you have hit a 404 page.
6+
</h1>
7+
</div>
8+
{%endblock%}

templates/base.html

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset='UTF-8'>
5+
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
6+
<title>CompsocSSC</title>
7+
<link async rel='icon' type='image/png' href={%static 'favicon.png'%}>
8+
<link rel='styleshet' href='https://maxcdn.bootstrapcnd.com/bootstrap/3.2.0/css/bootstrap.min.css'>
9+
{%block head%}
10+
{%endblock%}
11+
</head>
12+
<body>
13+
<div class='container'>
14+
<nav class='navbar navbar-inverse' role='navigation'>
15+
<div class='navbar-header'>
16+
<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='#navbar' aria-expand='false' aria-controls='navbar'>
17+
<span class='sr-only'>Toogle navigation</span>
18+
<span class='icon-bar'></span>
19+
<span class='icon-bar'></span>
20+
<span class='icon-bar'></span>
21+
</button>
22+
<a class='navbar-brand' href={%url 'home'%}>CompSocSSC</a>
23+
</div>
24+
<div class='navbar-collapse collapse' id='navbar'>
25+
<ul class='nav navbar-nav navbar-left'>
26+
<li><a href='{%url "contact"%}'>Contact</a></li>
27+
</ul>
28+
</div>
29+
</nav>
30+
</div>
31+
<div class='container text-center'>
32+
{%block body%}
33+
{%endblock%}
34+
</div>
35+
<!-- Javascript is here to speed up loading the page-->
36+
<script async src='//code.jquery.com/jquery-1.11.0.min.js'></script>
37+
<script async src='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.9/js/bootstrap.min.js'></script>
38+
</body>
39+
</html>

templates/contact.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{%extends 'base.html'%}
2+
{%block body%}
3+
<a href=#>Facebook</a>
4+
{%endblock%}

website/__init__.py

Whitespace-only changes.

website/settings.py

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
"""
2+
Django settings for website project.
3+
4+
For more information on this file, see
5+
https://docs.djangoproject.com/en/1.7/topics/settings/
6+
7+
For the full list of settings and their values, see
8+
https://docs.djangoproject.com/en/1.7/ref/settings/
9+
"""
10+
11+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12+
import os
13+
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
14+
15+
16+
# Quick-start development settings - unsuitable for production
17+
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
18+
19+
# SECURITY WARNING: keep the secret key used in production secret!
20+
SECRET_KEY = '&00qubg6jjbl_f8nh%r3ex$@(h_5uhk4j7$shs&__jc66sn#_u'
21+
22+
# SECURITY WARNING: don't run with debug turned on in production!
23+
DEBUG = True
24+
25+
TEMPLATE_DEBUG = DEBUG
26+
27+
ALLOWED_HOSTS = []
28+
29+
30+
# Application definition
31+
32+
INSTALLED_APPS = (
33+
'django.contrib.sites',
34+
'django.contrib.admin',
35+
'django.contrib.auth',
36+
'django.contrib.contenttypes',
37+
'django.contrib.sessions',
38+
'django.contrib.messages',
39+
'django.contrib.staticfiles',
40+
#---
41+
'crispy_forms',
42+
43+
)
44+
45+
MIDDLEWARE_CLASSES = (
46+
'django.contrib.sessions.middleware.SessionMiddleware',
47+
'django.middleware.common.CommonMiddleware',
48+
'django.middleware.csrf.CsrfViewMiddleware',
49+
'django.contrib.auth.middleware.AuthenticationMiddleware',
50+
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
51+
'django.contrib.messages.middleware.MessageMiddleware',
52+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
53+
)
54+
55+
ROOT_URLCONF = 'website.urls'
56+
57+
WSGI_APPLICATION = 'website.wsgi.application'
58+
59+
60+
# Database
61+
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
62+
63+
DATABASES = {
64+
'default': {
65+
'ENGINE': 'django.db.backends.sqlite3',
66+
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
67+
}
68+
}
69+
70+
# Internationalization
71+
# https://docs.djangoproject.com/en/1.7/topics/i18n/
72+
73+
LANGUAGE_CODE = 'en-us'
74+
75+
TIME_ZONE = None
76+
77+
USE_I18N = False
78+
79+
USE_L10N =False
80+
81+
USE_TZ = False
82+
83+
84+
# Static files (CSS, JavaScript, Images)
85+
# https://docs.djangoproject.com/en/1.7/howto/static-files/
86+
87+
STATIC_URL = '/static/'
88+
MEDIA_URL='/media/'
89+
STATIC_ROOT=os.path.join(BASE_DIR,'static_files')
90+
MEDIA_ROOT=os.path.join(BASE_DIR,'media_files')
91+
#-----------
92+
TEMPLATE_DIRS=[os.path.join(BASE_DIR,'templates')]
93+
STATICFILES_DIRS[os.path.join(BASE_DIR,'staticfiles')]
94+
#-----------
95+
LOGIN_REDIRECT_URL='/'
96+
LOGIN_URL='/'
97+
SITE_ID=1

website/urls.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from django.conf.urls import patterns, include, url
2+
from django.contrib import admin
3+
from website import views
4+
urlpatterns = patterns('',
5+
url(r'^admin/', include(admin.site.urls)),
6+
url(r'^$',views.home,name='home'),
7+
url(r'^contact/$',views.contact,name='contact'),
8+
)

website/views.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from django.shortcuts import render,redirect
2+
3+
def home(request):
4+
"""Site homepage for compsoc
5+
"""
6+
data={}
7+
template='base.html'
8+
return render(request,template,data)
9+
def contact(request):
10+
"""Contact page"""
11+
data={}
12+
template='contact.html'
13+
return render(request,template,data)

website/wsgi.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
WSGI config for website project.
3+
4+
It exposes the WSGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")
12+
13+
from django.core.wsgi import get_wsgi_application
14+
application = get_wsgi_application()

0 commit comments

Comments
 (0)