edgware/edgware/urls.py
2011-07-07 21:30:11 +05:30

77 lines
2.9 KiB
Python

# Redndant comment
from django.conf.urls.defaults import *
import settings
from django.contrib.auth.views import login
from django.contrib.auth.views import logout
# 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'^debug/$', 'main.views.debug'),
(r'^error/$', 'main.views.error'),
(r'^home$', 'main.views.home'),
(r'^contact$', 'main.views.contact'),
(r'^archive$', 'files.views.browse'),
(r'^publish$', 'main.views.publish'),
(r'^browse$', 'main.views.browse'),
(r'^upload$', 'files.views.upload_files'),
(r'^faq$', 'main.views.faq'),
(r'^help$', 'main.views.help'),
(r'^account$', login),
(r'^logout$', logout),
(r'^sandbox/home$', 'main.views.home'),
(r'^sandbox/contact$', 'main.views.contact'),
(r'^sandbox/archive$', 'files.views.browse'),
(r'^sandbox/publish$', 'main.views.publish'),
(r'^sandbox/browse$', 'main.views.browse'),
(r'^sandbox/upload$', 'files.views.upload_files'),
(r'^sandbox/faq$', 'main.views.faq'),
(r'^sandbox/help$', 'main.views.help'),
(r'^sandbox/account$', login),
(r'^sandbox/logout$', logout),
# (r'^$', 'django.views.generic.simple.redirect_to', {'url': '/slider/'}),
(r'^$', 'main.views.comingsoon'),
(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,
})
)