Project

General

Profile

Download (1.06 KB) Statistics
| Branch: | Tag: | Revision:

root / corbo / urls.py @ b51a06ed

1
from django.conf import settings
2
from django.conf.urls import patterns, include, url
3
from django.conf.urls.static import static
4
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
5
from django.contrib import admin
6

    
7
from .urls_utils import decorated_includes, manager_required
8
from .views import homepage, atom
9

    
10
from manage_urls import urlpatterns as manage_urls
11

    
12
urlpatterns = patterns('',
13
    url(r'^$', homepage, name='home'),
14
    url(r'^atom$', atom, name='atom'),
15
    url(r'^manage/', decorated_includes(manager_required,
16
                    include(manage_urls))),
17
    url(r'^ckeditor/', include('ckeditor.urls')),
18
    url(r'^admin/', include(admin.site.urls))
19
)
20

    
21
if 'mellon' in settings.INSTALLED_APPS:
22
    # authentication with django-mellon
23
    urlpatterns += patterns('',
24
        url(r'^accounts/mellon/', include('mellon.urls')),
25
    )
26
else:
27
    urlpatterns += patterns('',
28
        url('^accounts/', include('django.contrib.auth.urls')),
29
    )
30

    
31

    
32
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
33
urlpatterns += staticfiles_urlpatterns()
(8-8/11)