edgware/edgware/urls.py
2011-03-31 18:03:50 +05:30

55 lines
2.1 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'^sandbox$', 'main.views.home'),
(r'^sandbox/contact$', 'main.views.contact'),
(r'^sandbox/archive$', 'main.views.archive'),
(r'^sandbox/publish$', 'main.views.publish'),
(r'^sandbox/faq$', 'main.views.faq'),
(r'^sandbox/help$', 'main.views.help'),
(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'files/', include('files.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,
})
)