diff options
Diffstat (limited to 'papillon')
-rw-r--r-- | papillon/local_settings.py.sample | 9 | ||||
-rw-r--r-- | papillon/settings.py | 2 | ||||
-rw-r--r-- | papillon/templates/500.html | 6 | ||||
-rw-r--r-- | papillon/urls.py | 4 |
4 files changed, 14 insertions, 7 deletions
diff --git a/papillon/local_settings.py.sample b/papillon/local_settings.py.sample index 8070842..e2b181b 100644 --- a/papillon/local_settings.py.sample +++ b/papillon/local_settings.py.sample @@ -11,8 +11,13 @@ PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) # Make this unique, and don't share it with anybody. SECRET_KEY = 'replace_this_with_something_else' -# if you have set an EXTRA_URL set the full path -EXTRA_URL = '' +# URL that handles the media served from MEDIA_ROOT. +# Example: "http://media.lawrence.com" +MEDIA_URL = '/static/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +ADMIN_MEDIA_PREFIX = '/static/admin/' TINYMCE_URL = 'http://localhost/tinymce/' MAX_COMMENT_NB = 10 # max number of comments by poll - 0 to disable comments diff --git a/papillon/settings.py b/papillon/settings.py index 49b46c5..0f3dd65 100644 --- a/papillon/settings.py +++ b/papillon/settings.py @@ -10,7 +10,7 @@ TEMPLATE_DEBUG = DEBUG import os PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) -EXTRA_URL = 'papillon/' +EXTRA_URL = '' TINYMCE_URL = 'http://localhost/tinymce/' MAX_COMMENT_NB = 10 # max number of comments by poll - 0 to disable comments diff --git a/papillon/templates/500.html b/papillon/templates/500.html new file mode 100644 index 0000000..8196c56 --- /dev/null +++ b/papillon/templates/500.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<p>{% trans "An error has occurred. A system administrator has been informed and will probably fix it soon." %}</p> +{% endblock %} diff --git a/papillon/urls.py b/papillon/urls.py index 0f28b45..25a62c2 100644 --- a/papillon/urls.py +++ b/papillon/urls.py @@ -49,8 +49,4 @@ urlpatterns = patterns('', url(base + r'poll/(?P<poll_url>\w+)/vote/$', 'papillon.polls.views.poll', name='vote'), url(base + r'feeds/poll/(?P<poll_url>\w+)$', PollLatestEntries(), name='feed'), - (base + r'static/(?P<path>.*)$', 'django.views.static.serve', - {'document_root': settings.PROJECT_PATH + '/static'}), - (base + r'media/(?P<path>.*)$', 'django.views.static.serve', - {'document_root': settings.PROJECT_PATH + '/media/'}), ) |