2 from django
.conf
.urls
import include
, url
3 from django
.contrib
import admin
4 from django
.conf
import settings
5 from django
.contrib
.staticfiles
.views
import serve
7 # strip the leading "/"
8 static_prefix
= settings
.STATIC_URL
[1:]
10 # This URLs should be always be served, even during maintenance mode
12 url(r
'^%s(?P<path>.*)$' % static_prefix
, serve
)
16 # Check for maintenace mode
17 from django
.conf
import settings
18 if settings
.MAINTENANCE
:
19 from mygpo
.web
import utils
21 url(r
'', utils
.maintenance
),
25 # URLs are still registered during maintenace mode because we need to
26 # build links from them (eg login-link).
28 url(r
'^', include('mygpo.web.urls')),
29 url(r
'^', include('mygpo.podcasts.urls')),
30 url(r
'^', include('mygpo.directory.urls')),
31 url(r
'^', include('mygpo.api.urls')),
32 url(r
'^', include('mygpo.userfeeds.urls')),
33 url(r
'^', include('mygpo.share.urls')),
34 url(r
'^', include('mygpo.history.urls')),
35 url(r
'^', include('mygpo.subscriptions.urls')),
36 url(r
'^', include('mygpo.users.urls')),
37 url(r
'^', include('mygpo.podcastlists.urls')),
38 url(r
'^suggestions/', include('mygpo.suggestions.urls')),
39 url(r
'^publisher/', include('mygpo.publisher.urls')),
40 url(r
'^administration/', include('mygpo.administration.urls')),
41 url(r
'^pubsub/', include('mygpo.pubsub.urls')),
42 url(r
'^admin/', include(admin
.site
.urls
)),