1 |
e0d858ba
|
Serghei MIHAI
|
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, rss
|
9 |
|
|
|
10 |
|
|
from manage_urls import urlpatterns as manage_urls
|
11 |
|
|
|
12 |
|
|
urlpatterns = patterns('',
|
13 |
|
|
url(r'^$', homepage, name='home'),
|
14 |
|
|
url(r'^rss$', rss, name='rss'),
|
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 |
700b2afb
|
Serghei MIHAI
|
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 |
e0d858ba
|
Serghei MIHAI
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
33 |
|
|
urlpatterns += staticfiles_urlpatterns()
|