Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1e13dfcd1a
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (25 sloc) 1.216 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
import os

from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from django.contrib import admin
from django.views.static import serve

from django.conf.urls.defaults import *

from home import views

admin.autodiscover()

urlpatterns = patterns('', # pylint: disable=C0103
    url(r'^$', views.home, name='index'),
    url(r'^meps/', include('meps.urls', namespace='meps', app_name='meps')),
    url(r'^mps/', include('mps.urls', namespace='mps', app_name='mps')),
    url(r'^votes/', include('votes.urls', namespace='votes', app_name='votes')),
    url(r'^list/', include('queries.urls', namespace='queries', app_name='queries')),
    url(r'^trends/', include('trends.urls', namespace='trends', app_name='trends')),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
)

# hack to autodiscover static files location in dev mode
if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^static/(.*)$', serve, {'document_root': os.path.join(settings.PROJECT_PATH, 'static')}),
    )
# TODO: static files location in production
# should never be served by django, settings.MEDIA_URL is the right way to do
Something went wrong with that request. Please try again.