· 9 years ago · Dec 08, 2016, 07:28 AM
1import os
2
3
4SECRET_KEY = 'xxx'
5
6
7DEBUG = False
8
9
10
11ALLOWED_HOSTS = ['*']
12EMAIL_HOST = 'smtp.gmail.com'
13EMAIL_HOST_USER = 'myemail@example.com'
14EMAIL_HOST_PASSWORD = 'password'
15EMAIL_PORT = 587
16EMAIL_USE_TLS = True
17
18
19
20INSTALLED_APPS = [
21 'WebDev',
22 'Marketing',
23 'DataOutsourcing',
24 'Consultancy',
25 'BPO',
26 'Contact',
27 'Home',
28 'django.contrib.admin',
29 'django.contrib.auth',
30 'django.contrib.contenttypes',
31 'django.contrib.sessions',
32 'django.contrib.messages',
33 'django.contrib.staticfiles',
34 'django.contrib.sites',
35]
36SITE_ID = 1
37MIDDLEWARE = [
38 'django.middleware.security.SecurityMiddleware',
39 'django.contrib.sessions.middleware.SessionMiddleware',
40 'django.middleware.common.CommonMiddleware',
41 'django.middleware.csrf.CsrfViewMiddleware',
42 'django.contrib.auth.middleware.AuthenticationMiddleware',
43 'django.contrib.messages.middleware.MessageMiddleware',
44 'django.middleware.clickjacking.XFrameOptionsMiddleware',
45]
46
47ROOT_URLCONF = 'MegaaOpes.urls'
48
49TEMPLATES = [
50 {
51 'BACKEND': 'django.template.backends.django.DjangoTemplates',
52 'DIRS': [],
53 'APP_DIRS': True,
54 'OPTIONS': {
55 'context_processors': [
56 'django.template.context_processors.debug',
57 'django.template.context_processors.request',
58 'django.contrib.auth.context_processors.auth',
59 'django.contrib.messages.context_processors.messages',
60
61 ],
62 },
63 },
64]
65
66WSGI_APPLICATION = 'MegaaOpes.wsgi.application'
67
68
69# Database
70# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
71
72DATABASES = {
73 'default': {
74 'ENGINE': 'django.db.backends.sqlite3',
75 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
76 }
77}
78
79
80# Password validation
81# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password- validators
82
83AUTH_PASSWORD_VALIDATORS = [
84 {
85 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
86 },
87 {
88 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
89 },
90 {
91 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
92 },
93 {
94 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
95 },
96]
97
98
99# Internationalization
100# https://docs.djangoproject.com/en/1.10/topics/i18n/
101
102LANGUAGE_CODE = 'en-us'
103
104TIME_ZONE = 'UTC'
105
106USE_I18N = True
107
108USE_L10N = True
109
110USE_TZ = True
111
112
113# Static files (CSS, JavaScript, Images)
114# https://docs.djangoproject.com/en/1.10/howto/static-files/
115
116# Static files (CSS, JavaScript, Images)
117# https://docs.djangoproject.com/en/1.6/howto/static-files/
118
119
120
121
122# Parse database configuration from $DATABASE_URL
123
124
125
126# Honor the 'X-Forwarded-Proto' header for request.is_secure()
127SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
128
129# Allow all host headers
130ALLOWED_HOSTS = ['*']
131
132# Static files (CSS, JavaScript, Images)
133# https://docs.djangoproject.com/en/1.7/howto/static-files/
134
135#BASE_DIR = os.path.dirname(os.path.dirname(__file__))
136
137
138
139# URL prefix for static files.
140# Example: "http://example.com/static/", "http://static.example.com/"
141STATIC_URL = '/static/'
142
143EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
144
145<link rel="stylesheet" href="/static/css/style.css">
146
147│ db.sqlite3
148│ manage.py
149│
150├───APP1
151│ │ admin.py
152│ │ apps.py
153│ │ forms.py
154│ │ models.py
155│ │ tests.py
156│ │ urls.py
157│ │ views.py
158│ │ __init__.py
159│ │
160│ ├───migrations
161│ │ __init__.py
162│ │
163│ ├───templates
164│ email.html
165│ success.html
166│
167├───Home
168│ │ admin.py
169│ │ apps.py
170│ │ models.py
171│ │ tests.py
172│ │ urls.py
173│ │ views.py
174│ │ __init__.py
175│ │
176│ ├───migrations
177│ │ __init__.py
178│ │
179│ ├───static
180│ │ ├───css
181│ │ │ bootstrap.css
182│ │ │ bootstrap.min.css
183│ │ │ simple-sidebar.css
184│ │ │ style.css
185│ │ │
186│ │ └───js
187│ │ bootstrap.js
188│ │ bootstrap.min.js
189│ │ custom.js
190│ │ jquery-2.1.1.js
191│ │ jquery.js
192│ │ modernizr.js
193│ │ smoothscroll.js
194│ │
195│ ├───templates
196│ └───Home
197│ index.html
198│
199└───Project_Name
200 settings.py
201 urls.py
202 wsgi.py
203 __init__.py