edgware/edgware/urls.py
2010-03-26 18:13:34 +05:30

48 lines
1.8 KiB
Python

# Redndant comment
from django.conf.urls.defaults import *
import settings
# uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^edge/', include('edge.foo.urls')),
(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/slider/'}),
(r'^robots.txt(?P<path>)$', 'django.views.static.serve', { 'document_root' : "/home/itf/soc/edgware/static/txt/robots.txt" } ),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^comments/', include('django.contrib.comments.urls')),
(r'^edit/', include('editor.urls')),
(r'^gallery/', 'files.views.gallery'),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
(r'slider/(?P<id>\d+)/$', 'editor.views.show_slide'),
(r'slider/', 'editor.views.show_slide2'),
)
urlpatterns += patterns('django.views.generic.simple',
(r'^audioDemo/$', 'direct_to_template', {'template': 'demo/audioDemo.html'}),
(r'^padmaDemo/$', 'direct_to_template', {'template': 'demo/padmaDemo.html'}),
(r'^mockup/article/$', 'direct_to_template', {'template': 'demo/articleDemo.html'}),
(r'^mockup/home/$', 'direct_to_template', {'template': 'demo/homeDemo.html'}),
)
urlpatterns += patterns('editor.views',
(r'test/editor/$', 'editor'),
(r'category/json/$', 'category_json'),
(r'testthumb/$', 'test_thumb'),
)
if settings.LOCAL_DEVELOPMENT:
urlpatterns += patterns("django.views",
url(r"%s(?P<path>.*)$" % settings.MEDIA_URL[1:], "static.serve", {
"document_root": settings.MEDIA_ROOT,
})
)