Ticket #8130: urls.py

File urls.py, 772 bytes (added by alperkanat, 7 years ago)

root urls.py file

Line 
1from django.conf.urls.defaults import *
2from django.conf import settings
3from django.contrib import admin
4from raptiye.blog.feeds import LatestEntries
5
6admin.autodiscover()
7
8feeds = {
9        'latest': LatestEntries,
10}
11
12urlpatterns = patterns('',
13        # admin page
14        url(r'^admin/(.*)', admin.site.root, name='admin_page'),
15
16        # main page in Turkish
17        (r'^tr/', include('raptiye.tr-urls')),
18
19        # main page in English
20        (r'^en/', include('raptiye.en-urls')),
21
22        # feed related stuff
23        url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}, name='rss_feed'),
24)
25
26# should be deleted in the production phase
27if settings.DEBUG:
28        urlpatterns += patterns('',
29                (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
30        )
Back to Top