diff --git a/mysite/settings.py b/mysite/settings.py
index 1fa9bff..a4bef25 100644
a
|
b
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
23 | 23 | SECRET_KEY = '2kf%#c!qp142t*!nt!4ad@)jscuqxor2^iv8dr9oxyp$+@(bqa' |
24 | 24 | |
25 | 25 | # SECURITY WARNING: don't run with debug turned on in production! |
26 | | DEBUG = True |
| 26 | DEBUG = False |
27 | 27 | |
28 | | ALLOWED_HOSTS = [] |
| 28 | ALLOWED_HOSTS = ['localhost'] |
29 | 29 | |
30 | 30 | |
31 | 31 | # Application definition |
… |
… |
INSTALLED_APPS = [
|
41 | 41 | |
42 | 42 | MIDDLEWARE = [ |
43 | 43 | 'django.middleware.security.SecurityMiddleware', |
44 | | 'django.contrib.sessions.middleware.SessionMiddleware', |
45 | 44 | 'django.middleware.common.CommonMiddleware', |
| 45 | 'django.contrib.sessions.middleware.SessionMiddleware', |
46 | 46 | 'django.middleware.csrf.CsrfViewMiddleware', |
47 | 47 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
48 | 48 | 'django.contrib.messages.middleware.MessageMiddleware', |
49 | 49 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
50 | 50 | ] |
51 | 51 | |
| 52 | CSRF_USE_SESSIONS = True |
| 53 | |
52 | 54 | ROOT_URLCONF = 'mysite.urls' |
53 | 55 | |
54 | 56 | TEMPLATES = [ |
diff --git a/mysite/urls.py b/mysite/urls.py
index b58234f..ea341cf 100644
a
|
b
|
Including another URLconf
|
15 | 15 | """ |
16 | 16 | from django.conf.urls import url |
17 | 17 | from django.contrib import admin |
| 18 | from django.http import HttpResponse |
| 19 | |
| 20 | |
| 21 | def home(request): |
| 22 | return HttpResponse('Hello world!') |
| 23 | |
18 | 24 | |
19 | 25 | urlpatterns = [ |
20 | 26 | url(r'^admin/', admin.site.urls), |
| 27 | url(r'^$', home, name='home') |
21 | 28 | ] |