Oto błąd mam:Konfigurowanie ustawień django do pracy z 1.4.1. Błąd wczytywania szablonu
ImproperlyConfigured: Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
Oto moja ładowarka kod szablonu:
if DEBUG:
TEMPLATE_LOADERS = [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
]
else:
TEMPLATE_LOADERS = [
('django.template.loaders.cached.Loader',(
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
'forum.modules.template_loader.module_templates_loader',
'forum.skins.load_template_source',
)),
]
cały ten kod był tam, kiedy pobrać projekt z internetu. Próbuję skonfigurować OSQA przy użyciu these instructions. Mam zainstalowany MS SQL Server i zainstalowałem Python 2.6. Każda pomoc, jak naprawić ten błąd (znaleziono, gdy próbuję uruchomić manage.py
uruchomić serwer i hit http link, gdzie moje rzeczy jest setup.uper pojawia się w wierszu polecenia). Jestem nowy w Django i Python, więc nie wiem, jak zdiagnozować, co się dzieje.
Porównaj dwa TEMPLATE_LOADERS w szczegółach. Prawdziwy problem polegał na próbie użycia starego pliku * .filesystem.load_template_source i * .app_directories.load_template_source ... powinien być * .filesystem.Loader. Jakkolwiek wspaniała odpowiedź @girasquid –