Найти - Пользователи
Полная версия: Python installation doesn't support that type of template loading.
Начало » Django » Python installation doesn't support that type of template loading.
1
qman
Всем привет,
из документации на Django-1.1.1 запустил код приложения - голосование. В окне запуска получил сообщение:
c:\djproject\mysite>manage.py runserver
Validating models...
0 errors found

Django version 1.1.1, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[21/Oct/2009 08:07:50] "GET / HTTP/1.1" 404 2199
C:\Python25\lib\site-packages\django\template\loader.py:64: UserWarning: Your TE
MPLATE_LOADERS setting includes 'django.template.loaders.eggs.load_template_sour
ce', but your Python installation doesn't support that type of template loading.
Consider removing that line from TEMPLATE_LOADERS.
warnings.warn("Your TEMPLATE_LOADERS setting includes %r, but your Python inst
allation doesn't support that type of template loading. Consider removing that l
ine from TEMPLATE_LOADERS." % path)
[21/Oct/2009 08:08:01] "GET /admin/ HTTP/1.1" 200 1737
код
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
# (r'^mysite/', include('mysite.foo.urls')),

# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'),
(r'^polls/(?P<poll_id>\d+)/results/$', 'mysite.polls.views.results'),
(r'^polls/(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
(r'^admin/', include(admin.site.urls)),
(r'^(?P<poll_id>\d+)/vote/$', 'vote'),

)
Часть файла settings.py
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
'django.template.loaders.eggs.load_template_source',
)
админка работает, но что делать с сообщением об ошибке?
PooH
ну если все работает, то просто уберите из settings вот эту строчку
'django.template.loaders.eggs.load_template_source',
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB