1 | from django.conf.urls.defaults import *
|
---|
2 | from django.conf import settings
|
---|
3 | from django.contrib import admin
|
---|
4 | from raptiye.blog.feeds import LatestEntries
|
---|
5 |
|
---|
6 | admin.autodiscover()
|
---|
7 |
|
---|
8 | feeds = {
|
---|
9 | 'latest': LatestEntries,
|
---|
10 | }
|
---|
11 |
|
---|
12 | urlpatterns = 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
|
---|
27 | if settings.DEBUG:
|
---|
28 | urlpatterns += patterns('',
|
---|
29 | (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
|
---|
30 | )
|
---|