12. [2-1-3] quiz/settings.py ②
116. INSTALLED_APPS = (
117. 'django.contrib.auth',
118. 'django.contrib.contenttypes',
119. 'django.contrib.sessions',
120. 'django.contrib.sites',
121. 'django.contrib.messages',
122. 'django.contrib.staticfiles',
123. # Uncomment the next line to enable the admin:
124. 'django.contrib.admin',
125. # Uncomment the next line to enable admin documentation:
126. # 'django.contrib.admindocs',
127. 'quiz’,
128. )
15. [2-2-1] quiz/admin.py
1. from quiz.models import Quiz
2. from django.contrib import admin
3.
4. admin.site.register(Quiz)
16. [2-2-2] quiz/urls.py
1. from django.conf.urls import patterns, include, url
2.
3. # Uncomment the next two lines to enable the admin:
4. from django.contrib import admin
5. admin.autodiscover()
6.
7. urlpatterns = patterns('',
…
15. # Uncomment the next line to enable the admin:
16. url(r'^admin/', include(admin.site.urls)),
17. )
21. [3-1-3] hato/settings.py ①
2. import os
…..
32. TIME_ZONE = 'Asia/Tokyo’
…..
36. LANGUAGE_CODE = 'ja-jp’
…..
111. TEMPLATE_DIRS = (
112. # Put strings here, like "/home/html/django_templates" or
"C:/www/django/templates".
113. # Always use forward slashes, even on Windows.
114. # Don't forget to use absolute paths, not relative paths.
115. os.path.join(os.path.dirname(__file__), '..', 'templates').replace('','/'),
116. )
22. [3-1-4] hato/settings.py ②
116. INSTALLED_APPS = (
117. 'django.contrib.auth',
118. 'django.contrib.contenttypes',
119. 'django.contrib.sessions',
120. 'django.contrib.sites',
121. 'django.contrib.messages',
122. 'django.contrib.staticfiles',
123. # Uncomment the next line to enable the admin:
124. # 'django.contrib.admin',
125. # Uncomment the next line to enable admin documentation:
126. # 'django.contrib.admindocs',
127. ’nameform’,
128. )