SEESenv/web/hgbook/urls.py~
changeset 6 1ce9b33fb6ff
parent 5 c9c9819cd5e5
child 7 e9bf8b47a809
equal deleted inserted replaced
5:c9c9819cd5e5 6:1ce9b33fb6ff
     1 import os, sys
       
     2 from django.conf.urls.defaults import *
       
     3 import hgbook.comments.feeds as feeds
       
     4 from django.contrib import admin
       
     5 
       
     6 admin.autodiscover()
       
     7 
       
     8 feeds = {
       
     9     'comments': feeds.Comments,
       
    10     }
       
    11 
       
    12 urlpatterns = patterns('',
       
    13     (r'^comments/', include('hgbook.comments.urls')),
       
    14 
       
    15     (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
       
    16      {'feed_dict': feeds}),          
       
    17     (r'^/$', 'hgbook.comments.views.index'), 
       
    18 
       
    19     (r'^search/', 'hgbook.comments.views.search'), 
       
    20 
       
    21     # Only uncomment this for local testing without Apache.
       
    22      (r'^html/(?P<path>.*)$', 'django.views.static.serve',
       
    23      {'document_root': os.path.realpath(os.path.dirname(
       
    24         sys.modules[__name__].__file__) + '/../html/')}),
       
    25      (r'^support/(?P<path>.*)$', 'django.views.static.serve',
       
    26      {'document_root': os.path.realpath(os.path.dirname(
       
    27         sys.modules[__name__].__file__) + '/../support/')}),
       
    28 
       
    29     # Uncomment this for admin:
       
    30     (r'^admin/(.*)', admin.site.root),
       
    31 )