summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--papillon/local_settings.py.sample9
-rw-r--r--papillon/settings.py2
-rw-r--r--papillon/templates/500.html6
-rw-r--r--papillon/urls.py4
5 files changed, 15 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 39de9ea..1f83aff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,5 @@
*.db
*.swp
*.mo
-papillon/settings.py
+papillon/local_settings.py
docs/build/*
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/'}),
)