· 9 years ago · Dec 01, 2016, 10:38 PM
1<!DOCTYPE html>
2<html>
3 <head>
4 <title>Kodeworms</title>
5 <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" />
6 </head>
7 <body class="logged-out">
8 </body>
9</html>
10
11.logged-out {
12 background-image: href=("{{ STATIC_URL }}img/landing.jpg") no-repeat center 30px;
13 background-size: 90%;
14}
15
16# Django settings for BE.
17import os
18
19import dj_database_url
20
21here = lambda * x: os.path.join(os.path.abspath(os.path.dirname(__file__)), *x)
22
23PROJECT_ROOT = here("..")
24root = lambda * x: os.path.join(os.path.abspath(PROJECT_ROOT), *x)
25
26DEBUG = True
27TEMPLATE_DEBUG = DEBUG
28
29ADMINS = (
30 # ('Your Name', 'your_email@example.com'),
31)
32
33MANAGERS = ADMINS
34
35DATABASES = {
36 'default': dj_database_url.config()
37}
38
39SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
40# Hosts/domain names that are valid for this site; required if DEBUG is False
41# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
42ALLOWED_HOSTS = ['http://serene-schubland-8864.herokuapp.com']
43
44# Local time zone for this installation. Choices can be found here:
45# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
46# although not all choices may be available on all operating systems.
47# In a Windows environment this must be set to your system time zone.
48TIME_ZONE = 'Asia/Calcutta'
49
50# Language code for this installation. All choices can be found here:
51# http://www.i18nguy.com/unicode/language-identifiers.html
52LANGUAGE_CODE = 'en-us'
53
54SITE_ID = 1
55
56# If you set this to False, Django will make some optimizations so as not
57# to load the internationalization machinery.
58USE_I18N = True
59
60# If you set this to False, Django will not format dates, numbers and
61# calendars according to the current locale.
62USE_L10N = True
63
64# If you set this to False, Django will not use timezone-aware datetimes.
65USE_TZ = True
66
67# Absolute filesystem path to the directory that will hold user-uploaded files.
68# Example: "/var/www/example.com/media/"
69MEDIA_ROOT = root("..","..", "uploads")
70
71# URL that handles the media served from MEDIA_ROOT. Make sure to use a
72# trailing slash.
73# Examples: "http://example.com/media/", "http://media.example.com/"
74MEDIA_URL = ''
75
76# Absolute path to the directory static files should be collected to.
77# Don't put anything in this directory yourself; store your static files
78# in apps' "static/" subdirectories and in STATICFILES_DIRS.
79# Example: "/var/www/example.com/static/"
80STATIC_ROOT = root("..","..", "static" )
81
82# URL prefix for static files.
83# Example: "http://example.com/static/", "http://static.example.com/"
84STATIC_URL = '/static/'
85
86# Additional locations of static files
87STATICFILES_DIRS = (
88 root("..","assets"),
89)
90
91# List of finder classes that know how to find static files in
92# various locations.
93STATICFILES_FINDERS = (
94 'django.contrib.staticfiles.finders.FileSystemFinder',
95 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
96# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
97)
98
99# Make this unique, and don't share it with anybody.
100SECRET_KEY = 'j%ox@teo++vyzqfjfr@4trs&cx&2q52)ss$+ds*u=(u+!k#b@i'
101
102# List of callables that know how to import templates from various sources.
103TEMPLATE_LOADERS = (
104 'django.template.loaders.filesystem.Loader',
105 'django.template.loaders.app_directories.Loader',
106# 'django.template.loaders.eggs.Loader',
107)
108
109MIDDLEWARE_CLASSES = (
110 'django.middleware.common.CommonMiddleware',
111 'django.contrib.sessions.middleware.SessionMiddleware',
112 'django.middleware.csrf.CsrfViewMiddleware',
113 'django.contrib.auth.middleware.AuthenticationMiddleware',
114 'django.contrib.messages.middleware.MessageMiddleware',
115 # Uncomment the next line for simple clickjacking protection:
116 'django.middleware.clickjacking.XFrameOptionsMiddleware',
117)
118
119ROOT_URLCONF = 'BE.urls'
120
121# Python dotted path to the WSGI application used by Django's runserver.
122WSGI_APPLICATION = 'BE.wsgi.application'
123
124TEMPLATE_DIRS = (
125 root("templates"),
126)
127
128DJANGO_APPS = (
129 'django.contrib.auth',
130 'django.contrib.contenttypes',
131 'django.contrib.sessions',
132 'django.contrib.sites',
133 'django.contrib.messages',
134 'django.contrib.staticfiles',
135 'django.contrib.admin',
136)
137
138THIRD_PARTY_APPS = (
139 'south',
140)
141
142LOCAL_APPS = (
143 'course',
144)
145
146INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
147
148# A sample logging configuration. The only tangible logging
149# performed by this configuration is to send an email to
150# the site admins on every HTTP 500 error when DEBUG=False.
151# See http://docs.djangoproject.com/en/dev/topics/logging for
152# more details on how to customize your logging configuration.
153LOGGING = {
154 'version': 1,
155 'disable_existing_loggers': False,
156 'filters': {
157 'require_debug_false': {
158 '()': 'django.utils.log.RequireDebugFalse'
159 }
160 },
161 'handlers': {
162 'mail_admins': {
163 'level': 'ERROR',
164 'filters': ['require_debug_false'],
165 'class': 'django.utils.log.AdminEmailHandler'
166 }
167 },
168 'loggers': {
169 'django.request': {
170 'handlers': ['mail_admins'],
171 'level': 'ERROR',
172 'propagate': True,
173 },
174 }
175}