第一次出现的错误:
ImportError at /
No module named {{ project_name }}.urlsRequest Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.3.1
Exception Type: ImportError
Exception Value: No module named {{ project_name }}.urls
Exception Location: C:\Python25\Lib\site-packages\django\utils\importlib.py in import_module, line 35
Python Executable: C:\Python25\python.exe
Python Version: 2.5.2
Python Path: ['C:\\Python25\\Django\\django\\conf\\project_template',
'C:\\WINDOWS\\system32\\python25.zip',
'C:\\Python25\\DLLs',
'C:\\Python25\\lib',
'C:\\Python25\\lib\\plat-win',
'C:\\Python25\\lib\\lib-tk',
'C:\\Python25',
'C:\\Python25\\lib\\site-packages']
Server time: Sun, 11 Sep 2011 22:49:53 +0800
Traceback Switch to copy-and-paste view
C:\Python25\Lib\site-packages\django\core\handlers\base.py in get_response
if hasattr(request, "urlconf"):
# Reset url resolver with a custom urlconf.
urlconf = request.urlconf
urlresolvers.set_urlconf(urlconf)
resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
callback, callback_args, callback_kwargs = resolver.resolve(
request.path_info) ...
# Apply view middleware
for middleware_method in self._view_middleware:
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
▼ Local vars
Variable Value
settings <django.conf.LazySettings object at 0x00C63450>
middleware_method <bound method MessageMiddleware.process_request of <django.contrib.messages.middleware.MessageMiddleware object at 0x013F8A30>>
self <django.core.handlers.wsgi.WSGIHandler object at 0x010035D0>
receivers [(<function _rollback_on_exception at 0x0102B5B0>, None)]
request <WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{},
META:{'1830B7BD-F7A3-4C4D-989B-C004DE465EDE': '234:2c290a0',
'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users',
'APPDATA': 'C:\\Documents and Settings\\Administrator\\Application Data',
'CLASSPATH': '.;C:\\Java\\jdk1.6.0_20\\lib\\tools.jar',
'CLIENTNAME': 'Console',
'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files',
'COMPUTERNAME': '20100204-1130',
'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe',
'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain',
'DJANGO_SETTINGS_MODULE': 'project_template.settings',
'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Documents and Settings\\Administrator',
'HTTP_ACCEPT': '*/*',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'zh-cn',
'HTTP_CONNECTION': 'Keep-Alive',
'HTTP_HOST': '127.0.0.1:8000',
'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)',
'JAVA_HOME': 'C:\\Java\\jdk1.6.0_20',
'LOGONSERVER': '\\\\20100204-1130',
'NUMBER_OF_PROCESSORS': '1',
'OS': 'Windows_NT',
'PATH': 'C:\\server\\php\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\Program Files\\Common Files\\Thunder Network\\KanKan\\Codecs;c:\\Program Files\\Microsoft SQL Server\\90\\Tools\\bin\\;C:\\server\\bin;C:\\server\\php;C:\\server\\php\\ext;;C:\\Java\\jdk1.6.0_20\\bin;D:\\MySql5.0\\bin;C:\\Python32;C:\\Python32\\MSYS\\bin;C:\\Python32\\mingw\\MinGW\\bin;C:\\Python25\\Lib\\site-packages\\django\\bin;C:\\Python25\\Scripts;C:\\Python25\\Lib;C:\\Python25\\Django\\django\\conf\\project_template;',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH',
'PATH_INFO': u'/',
'PHPRC': 'C:\\server\\php',
'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 13 Stepping 8, GenuineIntel',
'PROCESSOR_LEVEL': '6',
'PROCESSOR_REVISION': '0d08',
'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G',
'PYTHONSTARTUP': 'C:\\Python32\\python.pythonstartup',
'QUERY_STRING': '',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '',
'REQUEST_METHOD': 'GET',
'RUN_MAIN': 'true',
'SCRIPT_NAME': u'',
'SERVER_NAME': 'localhost',
'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2',
'SESSIONNAME': 'Console',
'SYSTEMDRIVE': 'C:',
'SYSTEMROOT': 'C:\\WINDOWS',
'TEMP': 'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp',
'TMP': 'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp',
'USERDOMAIN': '20100204-1130',
'USERNAME': 'Administrator',
'USERPROFILE': 'C:\\Documents and Settings\\Administrator',
'VS90COMNTOOLS': 'C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\Tools\\',
'WINDIR': 'C:\\WINDOWS',
'wsgi.errors': <open file '<stderr>', mode 'w' at 0x00A7F0B0>,
'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
'wsgi.input': <socket._fileobject object at 0x013CF5F0>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>
exceptions <module 'django.core.exceptions' from 'C:\Python25\lib\site-packages\django\core\exceptions.pyc'>
resolver <RegexURLResolver {{ project_name }}.urls (None:None) ^/>
urlresolvers <module 'django.core.urlresolvers' from 'C:\Python25\lib\site-packages\django\core\urlresolvers.pyc'>
response None
urlconf '{{ project_name }}.urls'
C:\Python25\Lib\site-packages\django\core\urlresolvers.py in resolve
app_dict = property(_get_app_dict)
def resolve(self, path):
tried = []
match = self.regex.search(path)
if match:
new_path = path[match.end():]
for pattern in self.url_patterns: ...
try:
sub_match = pattern.resolve(new_path)
except Resolver404, e:
sub_tried = e.args[0].get('tried')
if sub_tried is not None:
tried.extend([[pattern] + t for t in sub_tried])
▼ Local vars
Variable Value
path u'/'
self <RegexURLResolver {{ project_name }}.urls (None:None) ^/>
new_path u''
tried []
match <_sre.SRE_Match object at 0x013FA7C8>
C:\Python25\Lib\site-packages\django\core\urlresolvers.py in _get_url_patterns
return self._urlconf_module
except AttributeError:
self._urlconf_module = import_module(self.urlconf_name)
return self._urlconf_module
urlconf_module = property(_get_urlconf_module)
def _get_url_patterns(self):
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) ...
try:
iter(patterns)
except TypeError:
raise ImproperlyConfigured("The included urlconf %s doesn't have any patterns in it" % self.urlconf_name)
return patterns
url_patterns = property(_get_url_patterns)
▼ Local vars
Variable Value
self <RegexURLResolver {{ project_name }}.urls (None:None) ^/>
C:\Python25\Lib\site-packages\django\core\urlresolvers.py in _get_urlconf_module
raise Resolver404({'tried': tried, 'path': new_path})
raise Resolver404({'path' : path})
def _get_urlconf_module(self):
try:
return self._urlconf_module
except AttributeError:
self._urlconf_module = import_module(self.urlconf_name) ...
return self._urlconf_module
urlconf_module = property(_get_urlconf_module)
def _get_url_patterns(self):
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
try:
▼ Local vars
Variable Value
self <RegexURLResolver {{ project_name }}.urls (None:None) ^/>
C:\Python25\Lib\site-packages\django\utils\importlib.py in import_module
raise TypeError("relative imports require the 'package' argument")
level = 0
for character in name:
if character != '.':
break
level += 1
name = _resolve_name(name[level:], package, level)
__import__(name) ...
return sys.modules[name]
▼ Local vars
Variable Value
name '{{ project_name }}.urls'
package None
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.3.1
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
('django.',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in get_response
101.
request.path_info)
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py" in resolve
250.
for pattern in self.url_patterns:
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py" in _get_url_patterns
279.
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py" in _get_urlconf_module
274.
self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python25\Lib\site-packages\django\utils\importlib.py" in import_module
35.
__import__(name)
Exception Type: ImportError at /
Exception Value: No module named {{ project_name }}.urls
Request information
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
No cookie data
META
Variable Value
TMP 'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp'
COMPUTERNAME '20100204-1130'
wsgi.multiprocess False
RUN_MAIN 'true'
1830B7BD-F7A3-4C4D-989B-C004DE465EDE '234:2c290a0'
USERDOMAIN '20100204-1130'
SERVER_PROTOCOL 'HTTP/1.1'
SERVER_SOFTWARE 'WSGIServer/0.1 Python/2.5.2'
SCRIPT_NAME u''
VS90COMNTOOLS 'C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\Tools\\'
COMMONPROGRAMFILES 'C:\\Program Files\\Common Files'
PROCESSOR_IDENTIFIER 'x86 Family 6 Model 13 Stepping 8, GenuineIntel'
REQUEST_METHOD 'GET'
PROGRAMFILES 'C:\\Program Files'
PROCESSOR_REVISION '0d08'
PATH 'C:\\server\\php\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\Program Files\\Common Files\\Thunder Network\\KanKan\\Codecs;c:\\Program Files\\Microsoft SQL Server\\90\\Tools\\bin\\;C:\\server\\bin;C:\\server\\php;C:\\server\\php\\ext;;C:\\Java\\jdk1.6.0_20\\bin;D:\\MySql5.0\\bin;C:\\Python32;C:\\Python32\\MSYS\\bin;C:\\Python32\\mingw\\MinGW\\bin;C:\\Python25\\Lib\\site-packages\\django\\bin;C:\\Python25\\Scripts;C:\\Python25\\Lib;C:\\Python25\\Django\\django\\conf\\project_template;'
QUERY_STRING ''
SYSTEMROOT 'C:\\WINDOWS'
wsgi.errors <open file '<stderr>', mode 'w' at 0x00A7F0B0>
CONTENT_LENGTH ''
HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)'
HTTP_CONNECTION 'Keep-Alive'
TEMP 'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp'
REMOTE_ADDR '127.0.0.1'
PROCESSOR_ARCHITECTURE 'x86'
wsgi.url_scheme 'http'
ALLUSERSPROFILE 'C:\\Documents and Settings\\All Users'
SERVER_PORT '8000'
SESSIONNAME 'Console'
HOMEPATH '\\Documents and Settings\\Administrator'
PROCESSOR_LEVEL '6'
JAVA_HOME 'C:\\Java\\jdk1.6.0_20'
wsgi.run_once False
USERNAME 'Administrator'
HTTP_ACCEPT '*/*'
LOGONSERVER '\\\\20100204-1130'
PROMPT '$P$G'
COMSPEC 'C:\\WINDOWS\\system32\\cmd.exe'
CLASSPATH '.;C:\\Java\\jdk1.6.0_20\\lib\\tools.jar'
wsgi.input <socket._fileobject object at 0x013CF5F0>
HTTP_HOST '127.0.0.1:8000'
wsgi.multithread True
PATHEXT '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PATH_INFO u'/'
CLIENTNAME 'Console'
FP_NO_HOST_CHECK 'NO'
WINDIR 'C:\\WINDOWS'
wsgi.version (1, 0)
HOMEDRIVE 'C:'
APPDATA 'C:\\Documents and Settings\\Administrator\\Application Data'
SERVER_NAME 'localhost'
PHPRC 'C:\\server\\php'
REMOTE_HOST ''
SYSTEMDRIVE 'C:'
GATEWAY_INTERFACE 'CGI/1.1'
HTTP_ACCEPT_LANGUAGE 'zh-cn'
NUMBER_OF_PROCESSORS '1'
PYTHONSTARTUP 'C:\\Python32\\python.pythonstartup'
DJANGO_SETTINGS_MODULE 'project_template.settings'
CONTENT_TYPE 'text/plain'
wsgi.file_wrapper ''
OS 'Windows_NT'
HTTP_ACCEPT_ENCODING 'gzip, deflate'
USERPROFILE 'C:\\Documents and Settings\\Administrator'
Settings
Using settings module project_template.settings
Setting Value
USE_L10N True
USE_THOUSAND_SEPARATOR False
LANGUAGE_CODE 'en-us'
ROOT_URLCONF '{{ project_name }}.urls'
MANAGERS (('your name', '383243143@'),)
DEFAULT_CHARSET 'utf-8'
STATIC_ROOT ''
TEST_DATABASE_CHARSET None
MESSAGE_STORAGE 'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
DATABASE_HOST ''
IGNORABLE_404_STARTS ('/cgi-bin/', '/_vti_bin', '/_vti_inf')
SEND_BROKEN_LINK_EMAILS False
URL_VALIDATOR_USER_AGENT 'Django/1.3.1 (http://www.)'
STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder')
SESSION_COOKIE_DOMAIN None
SESSION_COOKIE_NAME 'sessionid'
COMMENTS_MODERATORS_GROUP None
TIME_INPUT_FORMATS ('%H:%M:%S', '%H:%M')
DATABASES {'default': {'ENGINE': 'django.db.backends.dummy',
'HOST': '',
'NAME': '',
'OPTIONS': {},
'PASSWORD': '********************',
'PORT': '',
'TEST_CHARSET': None,
'TEST_COLLATION': None,
'TEST_MIRROR': None,
'TEST_NAME': None,
'TIME_ZONE': 'America/Chicago',
'USER': ''}}
TEST_DATABASE_NAME None
FILE_UPLOAD_PERMISSIONS None
FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
DEFAULT_CONTENT_TYPE 'text/html'
APPEND_SLASH True
FIRST_DAY_OF_WEEK 0
DATABASE_ROUTERS []
YEAR_MONTH_FORMAT 'F Y'
STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': ''}}
SERVER_EMAIL 'root@localhost'
SESSION_COOKIE_PATH '/'
USE_X_FORWARDED_HOST False
IGNORABLE_404_ENDS ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
MIDDLEWARE_CLASSES ('django.',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
USE_I18N True
THOUSAND_SEPARATOR ','
SECRET_KEY '********************'
LANGUAGE_COOKIE_NAME 'django_language'
FILE_UPLOAD_TEMP_DIR None
TRANSACTIONS_MANAGED False
LOGGING_CONFIG 'django.utils.log.dictConfig'
TEMPLATE_LOADERS ('django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader')
TEMPLATE_DEBUG True
AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend',)
TEST_DATABASE_COLLATION None
FORCE_SCRIPT_NAME None
CACHE_BACKEND 'locmem://'
SESSION_COOKIE_SECURE False
CSRF_COOKIE_DOMAIN None
FILE_CHARSET 'utf-8'
DEBUG True
SESSION_FILE_PATH None
DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS ['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles']
LANGUAGES (('ar', 'Arabic'),
('az', 'Azerbaijani'),
('bg', 'Bulgarian'),
('bn', 'Bengali'),
('bs', 'Bosnian'),
('ca', 'Catalan'),
('cs', 'Czech'),
('cy', 'Welsh'),
('da', 'Danish'),
('de', 'German'),
('el', 'Greek'),
('en', 'English'),
('en-gb', 'British English'),
('es', 'Spanish'),
('es-ar', 'Argentinian Spanish'),
('es-mx', 'Mexican Spanish'),
('es-ni', 'Nicaraguan Spanish'),
('et', 'Estonian'),
('eu', 'Basque'),
('fa', 'Persian'),
('fi', 'Finnish'),
('fr', 'French'),
('fy-nl', 'Frisian'),
('ga', 'Irish'),
('gl', 'Galician'),
('he', 'Hebrew'),
('hi', 'Hindi'),
('hr', 'Croatian'),
('hu', 'Hungarian'),
('id', 'Indonesian'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('km', 'Khmer'),
('kn', 'Kannada'),
('ko', 'Korean'),
('lt', 'Lithuanian'),
('lv', 'Latvian'),
('mk', 'Macedonian'),
('ml', 'Malayalam'),
('mn', 'Mongolian'),
('nl', 'Dutch'),
('no', 'Norwegian'),
('nb', 'Norwegian Bokmal'),
('nn', 'Norwegian Nynorsk'),
('pa', 'Punjabi'),
('pl', 'Polish'),
('pt', 'Portuguese'),
('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'),
('ru', 'Russian'),
('sk', 'Slovak'),
('sl', 'Slovenian'),
('sq', 'Albanian'),
('sr', 'Serbian'),
('sr-latn', 'Serbian Latin'),
('sv', 'Swedish'),
('ta', 'Tamil'),
('te', 'Telugu'),
('th', 'Thai'),
('tr', 'Turkish'),
('uk', 'Ukrainian'),
('ur', 'Urdu'),
('vi', 'Vietnamese'),
('zh-cn', 'Simplified Chinese'),
('zh-tw', 'Traditional Chinese'))
DATABASE_ENGINE ''
DATABASE_NAME ''
COMMENTS_FIRST_FEW 0
PREPEND_WWW False
SESSION_COOKIE_HTTPONLY False
DATABASE_PORT ''
DEBUG_PROPAGATE_EXCEPTIONS False
MONTH_DAY_FORMAT 'F j'
LOGIN_URL '/accounts/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE False
TIME_FORMAT 'P'
DATE_INPUT_FORMATS ('%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y')
CSRF_COOKIE_NAME 'csrftoken'
EMAIL_HOST_PASSWORD '********************'
PASSWORD_RESET_TIMEOUT_DAYS '********************'
CACHE_MIDDLEWARE_ALIAS 'default'
SESSION_SAVE_EVERY_REQUEST False
ADMIN_MEDIA_PREFIX '/static/admin/'
NUMBER_GROUPING 0
SESSION_ENGINE 'django.contrib.sessions.backends.db'
CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure'
COMMENTS_SKETCHY_USERS_GROUP None
LOGIN_REDIRECT_URL '/accounts/profile/'
LOGGING {'disable_existing_loggers': False,
'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler',
'level': 'ERROR'}},
'loggers': {'django.request': {'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True}},
'version': 1}
CACHE_MIDDLEWARE_KEY_PREFIX ''
LOCALE_PATHS ()
TEMPLATE_STRING_IF_INVALID ''
COMMENTS_ALLOW_PROFANITIES False
LOGOUT_URL '/accounts/logout/'
EMAIL_USE_TLS False
TEMPLATE_DIRS ()
FIXTURE_DIRS ()
EMAIL_HOST 'localhost'
DATE_FORMAT 'N j, Y'
MEDIA_ROOT ''
ADMINS (('your name', '383243143@'),)
FORMAT_MODULE_PATH None
DEFAULT_FROM_EMAIL 'webmaster@localhost'
STATICFILES_DIRS ()
MEDIA_URL ''
DATETIME_FORMAT 'N j, Y, P'
EMAIL_SUBJECT_PREFIX '[Django] '
SITE_ID 1
DISALLOWED_USER_AGENTS ()
ALLOWED_INCLUDE_ROOTS ()
DECIMAL_SEPARATOR '.'
SHORT_DATE_FORMAT 'm/d/Y'
DATABASE_USER ''
TEST_RUNNER 'django.test.simple.DjangoTestSuiteRunner'
TIME_ZONE 'America/Chicago'
FILE_UPLOAD_MAX_MEMORY_SIZE 2621440
EMAIL_BACKEND 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_TABLESPACE ''
TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.contrib.messages.context_processors.messages')
SESSION_COOKIE_AGE 1209600
SETTINGS_MODULE 'project_template.settings'
USE_ETAGS False
LANGUAGES_BIDI ('he', 'ar', 'fa')
DEFAULT_INDEX_TABLESPACE ''
INTERNAL_IPS ()
STATIC_URL '/static/'
EMAIL_PORT 25
SHORT_DATETIME_FORMAT 'm/d/Y P'
ABSOLUTE_URL_OVERRIDES {}
DATABASE_OPTIONS {}
CACHE_MIDDLEWARE_SECONDS 600
BANNED_IPS ()
DATETIME_INPUT_FORMATS ('%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M',
'%m/%d/%y')
DATABASE_PASSWORD '********************'
ADMIN_FOR ()
COMMENTS_BANNED_USERS_GROUP None
EMAIL_HOST_USER ''
PROFANITIES_LIST '********************'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
将DEBUG = True 改为False后又出现如下错误:
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\django\core\servers\basehttp.py", line 283, in run
self.result = application(self.environ, self.start_response)
File "C:\Python25\Lib\site-packages\django\core\handlers\wsgi.py", line 272, in __call__
response = self.get_response(request)
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py", line 169, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py", line 214, in handle_uncaught_exception
if resolver.urlconf_module is None:
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py", line 274, in _get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python25\Lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
ImportError: No module named {{ project_name }}.urls