Commit 340d8c6d authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Added static path to urls plus context processors to settings

parent 3ebd3d33
......@@ -28,7 +28,14 @@ DATABASES = {
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'
TIME_ZONE = 'Europe/Athens'
_ = lambda s: s
LANGUAGES = (
('el', _('Greek')),
('en', _('English')),
)
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
......@@ -48,6 +55,8 @@ USE_L10N = True
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
STATIC_URL = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
......@@ -68,6 +77,16 @@ TEMPLATE_LOADERS = (
# 'django.template.loaders.eggs.Loader',
)
TEMPLATE_CONTEXT_PROCESSORS = (
# Required so that RequestContext is passed into
# template
'django.core.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.request',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
......
......@@ -14,3 +14,10 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
# (r'^admin/', include(admin.site.urls)),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)', 'django.views.static.serve',\
{'document_root': settings.STATIC_URL}),
)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment