[Migration] Merge Episodes in PostgreSQL
[mygpo.git] / mygpo / urls.py
blob885e77b3268d9c70da711e7ce2d5b5117e4bda9d
2 # This file is part of my.gpodder.org.
4 # my.gpodder.org is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or (at your
7 # option) any later version.
9 # my.gpodder.org is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
12 # License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with my.gpodder.org. If not, see <http://www.gnu.org/licenses/>.
18 import os.path
19 from django.conf.urls import include, url, patterns
20 from django.contrib import admin
21 from django.conf import settings
23 # strip the leading "/"
24 static_prefix = settings.STATIC_URL[1:]
26 # This URLs should be always be served, even during maintenance mode
27 urlpatterns = patterns('',
28 (r'^%s(?P<path>.*)$' % static_prefix, 'django.contrib.staticfiles.views.serve')
32 # Check for maintenace mode
33 from django.conf import settings
34 if settings.MAINTENANCE:
35 urlpatterns += patterns('mygpo.web.utils',
36 (r'', 'maintenance'),
40 # URLs are still registered during maintenace mode because we need to
41 # build links from them (eg login-link).
42 urlpatterns += patterns('',
43 (r'^', include('mygpo.web.urls')),
44 (r'^', include('mygpo.directory.urls')),
45 (r'^', include('mygpo.api.urls')),
46 (r'^', include('mygpo.userfeeds.urls')),
47 (r'^', include('mygpo.share.urls')),
48 (r'^accounts/', include('django_couchdb_utils.registration.backends.default.urls')),
49 (r'^publisher/', include('mygpo.publisher.urls')),
50 (r'^administration/', include('mygpo.administration.urls')),
51 (r'^pubsub/', include('mygpo.pubsub.urls')),
52 url(r'^admin/', include(admin.site.urls)),