diff options
Diffstat (limited to 'PythonTBC')
-rw-r--r-- | PythonTBC/settings.py | 51 | ||||
-rw-r--r-- | PythonTBC/urls.py | 16 |
2 files changed, 48 insertions, 19 deletions
diff --git a/PythonTBC/settings.py b/PythonTBC/settings.py index 28eda1d..e73bc25 100644 --- a/PythonTBC/settings.py +++ b/PythonTBC/settings.py @@ -4,7 +4,7 @@ from os.path import * from local import * DEBUG = True -TEMPLATE_DEBUG = DEBUG +#TEMPLATE_DEBUG = DEBUG ADMINS = ( @@ -94,11 +94,11 @@ STATICFILES_FINDERS = ( SECRET_KEY = 'a8zm$)bj&k9p2$1*biby#mo5fga#8$sr4&cmz%h=vum-xkbkme' # List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', +#TEMPLATE_LOADERS = ( +# 'django.template.loaders.filesystem.Loader', +# 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', -) +#) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', @@ -115,15 +115,15 @@ ROOT_URLCONF = 'PythonTBC.urls' # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'PythonTBC.wsgi.application' -TEMPLATE_DIRS = ( +#TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. - join(PROJDIR, '../tbc/templates'), - join(PROJDIR, '../tbc/static/uploads'), - join(PROJDIR, '../comments/templates'), - LOCAL_template_dirs, -) +# join(PROJDIR, '../tbc/templates'), +# join(PROJDIR, '../tbc/static/uploads'), +# join(PROJDIR, '../comments/templates'), +# LOCAL_template_dirs, +#) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', @@ -138,13 +138,40 @@ INSTALLED_APPS = ( # 'django.contrib.admindocs', 'tbc', 'comments', - 'south', + #'south', 'commentingapp', 'tbc_error_page', 'taggit', 'taggit_templatetags2', ) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + 'join(PROJDIR, "../tbc/templates")', + 'join(PROJDIR, "../tbc/static/uploads")', + 'join(PROJDIR, "../comments/templates")', + 'LOCAL_template_dirs', +], + #'APP_DIRS': True, + + 'OPTIONS': { + 'debug': DEBUG, + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + 'loaders': [ + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + +], + }, + }, +] SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' diff --git a/PythonTBC/urls.py b/PythonTBC/urls.py index 34bc0f6..473dad1 100644 --- a/PythonTBC/urls.py +++ b/PythonTBC/urls.py @@ -1,5 +1,7 @@ from django.conf.urls import patterns, include, url - +import tbc_error_page.views +import commentingapp.views +import django.contrib.sitemaps.views # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() @@ -9,7 +11,7 @@ sitemaps = { 'book': TbcBookSitemap, } -urlpatterns = patterns('', +urlpatterns = [ # Examples: # url(r'^$', 'PythonTBC.views.home', name='home'), # url(r'^PythonTBC/', include('PythonTBC.foo.urls')), @@ -20,12 +22,12 @@ urlpatterns = patterns('', # Uncomment the next line to enable the admin: url(r'^admin', include(admin.site.urls)), url(r'^', include('tbc.urls', namespace='tbc')), - url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), + url(r'^sitemap\.xml$', django.contrib.sitemaps.views.sitemap, {'sitemaps': sitemaps}), - url(r'^admin-tools/commenting', 'commentingapp.views.commenting', name = 'commenting'), - url(r'^admin-tools/error_page', 'tbc_error_page.views.error', name = 'error_page'), - url(r'^admin-tools/broken_page', 'tbc_error_page.views.broken', name = 'broken_page'), + url(r'^admin-tools/commenting', commentingapp.views.commenting, name = 'commenting'), + url(r'^admin-tools/error_page', tbc_error_page.views.error, name = 'error_page'), + url(r'^admin-tools/broken_page', tbc_error_page.views.broken, name = 'broken_page'), -) +] |