1. timger K
  2. guowee

Commits

timger K  committed 9a19ed3

modified: account/urls.py
modified: urls.py

  • Participants
  • Parent commits b57fe23
  • Branches master

Comments (0)

Files changed (2)

File account/urls.py

View file
  • Ignore whitespace
 
 
 urlpatterns = patterns('',
-     (r'^test$', test),
-     (r'^login$', login),
-     (r'^logout$', logout),
-     (r'^register$', register),
-     (r'^actmail/(?P<user_id>\d+)$', send_mail),
-     (r'^activate/(?P<user_id>.*?)/(?P<code>.*)$', activate),
-     (r'^reset$', reset_password),
-     (r'^find-password$', find_password),
-     (r'^upload$', upload),
-     (r'^save_avatars$', save_avatars),
-     (r'^avatars$', avatars),
+     (r'^test/{0,1}$', test),
+     (r'^login/{0,1}$', login),
+     (r'^logout/{0,1}$', logout),
+     (r'^register/{0,1}$', register),
+     (r'^actmail/(?P<user_id>\d+)/{0,1}$', send_mail),
+     (r'^activate/(?P<user_id>.*?)/(?P<code>.*)/{0,1}$', activate),
+     (r'^reset/{0,1}$', reset_password),
+     (r'^find-password/{0,1}$', find_password),
+     (r'^upload/{0,1}$', upload),
+     (r'^save_avatars/{0,1}$', save_avatars),
+     (r'^avatars/{0,1}$', avatars),
      (r'^$', set_info),
 )

File urls.py

View file
  • Ignore whitespace
      (r'^sitemap.xml$',include('appstore.sitemap')),
      #(r'^comment/',include('comments.urls')),
      (r'^$', 'appstore.views.view_index'),
-     (r'^register$', 'account.views.register'),
-     (r'^login$', 'account.views.login'),
+     (r'^register/{0,1}$', 'account.views.register'),
+     (r'^login/{0,1}$', 'account.views.login'),
      (r'^posturl/$','appstore.views.view_post_appurl'),
-     (r'^top$','appstore.views.view_rebang'),
+     (r'^top/{0,1}$','appstore.views.view_rebang'),
      #(r'^top/$',cache_page(view_rebang,60)),
-     (r'^None$','appstore.views.view_redirect'),
-     (r'^updatedb$','appstore.views.updatedb'),
-     (r'^new','appstore.views.view_new_app'),
-     (r'^app/(?P<item_id>\d{0,})$','appstore.views.view_item_detail'),
-     (r'^app/(?P<item_id>\d{0,})/(?P<preference>.*?)$','appstore.views.view_app_like'),
-     (r'^(?P<author_id>\d{0,})/(?P<preference>.*?)/applist$','appstore.views.view_user_likeapp'),
+     (r'^None/{0,1}$','appstore.views.view_redirect'),
+     (r'^updatedb/{0,1}$','appstore.views.updatedb'),
+     (r'^new/{0,1}','appstore.views.view_new_app'),
+     (r'^app/(?P<item_id>\d{0,})/{0,1}$','appstore.views.view_item_detail'),
+     (r'^app/(?P<item_id>\d{0,})/(?P<preference>.*?)/{0,1}$','appstore.views.view_app_like'),
+     (r'^(?P<author_id>\d{0,})/(?P<preference>.*?)/applist/{0,1}$','appstore.views.view_user_likeapp'),
      (r'^user/\S{0,30}','appstore.views.view_user_home'),
-     (r'^post/(?P<post_id>\d{0,})$','appstore.views.view_app_detail'),
-     (r'^cron$','appstore.views.view_cron'),
-     (r'^myshare','appstore.views.view_myshare'),
-     (r'^(?P<author_id>\d{0,})$','appstore.views.view_myshare'),
-     (r'^rate/(?P<flag>\S{0,4})/(?P<item_id>\d*?)$','appstore.views.view_post_rating_new'),
-     (r'^check/(?P<flag>\S{0,4})/(?P<item_id>\d*?)/(?P<author_id>.*?)$','appstore.views.view_checklike'),
+     (r'^post/(?P<post_id>\d{0,})/{0,1}$','appstore.views.view_app_detail'),
+     (r'^cron/{0,1}$','appstore.views.view_cron'),
+     (r'^myshare/{0,1}','appstore.views.view_myshare'),
+     (r'^(?P<author_id>\d{0,})/{0,1}$','appstore.views.view_myshare'),
+     (r'^rate/(?P<flag>\S{0,4})/(?P<item_id>\d*?)/{0,1}$','appstore.views.view_post_rating_new'),
+     (r'^check/(?P<flag>\S{0,4})/(?P<item_id>\d*?)/(?P<author_id>.*?)/{0,1}$','appstore.views.view_checklike'),
      (r'^del/comment/(?P<post_id>\d*?)/(?P<comment_id>\d*?)/(?P<page>\d{0,})','appstore.views.view_delete_comment'),
      #(r'^site_media/(?P<path>.*)$', cache_page(djangostatic,60*60*2),{'document_root': settings.STATIC_PATH},),
-     (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.STATIC_PATH},),
-     (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/'}),
-     (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT}),
+     (r'^site_media/(?P<path>.*)/{0,1}$', 'django.views.static.serve',{'document_root': settings.STATIC_PATH},),
+     (r'^media/(?P<path>.*)/{0,1}$', 'django.views.static.serve', {'document_root': '/usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/'}),
+     (r'^static/(?P<path>.*)/{0,1}$', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT}),
 )