Permalink
Browse files

Simple URLs list attempt

  • Loading branch information...
1 parent e9506fa commit 7eb657571355c2cedbca47dca15b1575eb38ed81 @lmorchard committed Jan 15, 2013
Showing with 49 additions and 0 deletions.
  1. +49 −0 badger/urls_simple.py
View
@@ -0,0 +1,49 @@
+"""
+This is a simplified URLs list that omits any of the multiplayer features,
+assuming that all badges will be managed from the admin interface, and most
+badges will be awarded in badges.py
+"""
+from django.conf.urls.defaults import *
+
+from django.conf import settings
+from django.views.generic.list_detail import object_list
+from django.views.generic.simple import direct_to_template
+
+from .feeds import (AwardsRecentFeed, AwardsByUserFeed, AwardsByBadgeFeed,
+ BadgesRecentFeed, BadgesByUserFeed)
+from . import views
+
+
+urlpatterns = patterns('badger.views',
+ url(r'^$', 'badges_list', name='badger.badges_list'),
+ url(r'^tag/(?P<tag_name>.+)/?$', 'badges_list',
+ name='badger.badges_list'),
+ url(r'^awards/?', 'awards_list',
+ name='badger.awards_list'),
+ url(r'^badge/(?P<slug>[^/]+)/awards/?$', 'awards_list',
+ name='badger.awards_list_for_badge'),
+ url(r'^badge/(?P<slug>[^/]+)/awards/(?P<id>[^\.]+)\.json$', 'award_detail',
+ kwargs=dict(format="json"),
+ name='badger.award_detail_json'),
+ url(r'^badge/(?P<slug>[^/]+)/awards/(?P<id>[^/]+)/?$', 'award_detail',
+ name='badger.award_detail'),
+ url(r'^badge/(?P<slug>[^/]+)/awards/(?P<id>[^/]+)/delete$', 'award_delete',
+ name='badger.award_delete'),
+ url(r'^badge/(?P<slug>[^\.]+)\.json$', 'detail',
+ kwargs=dict(format="json"),
+ name='badger.detail_json'),
+ url(r'^badge/(?P<slug>[^/]+)/?$', 'detail',
+ name='badger.detail'),
+ url(r'^badge/(?P<slug>[^/]+)/awards/?$', 'awards_by_badge',
+ name='badger.awards_by_badge'),
+ url(r'^users/(?P<username>[^/]+)/awards/?$', 'awards_by_user',
+ name='badger.awards_by_user'),
+ url(r'^feeds/(?P<format>[^/]+)/badges/?$', BadgesRecentFeed(),
+ name="badger.feeds.badges_recent"),
+ url(r'^feeds/(?P<format>[^/]+)/awards/?$',
+ AwardsRecentFeed(), name="badger.feeds.awards_recent"),
+ url(r'^feeds/(?P<format>[^/]+)/badge/(?P<slug>[^/]+)/awards/?$',
+ AwardsByBadgeFeed(), name="badger.feeds.awards_by_badge"),
+ url(r'^feeds/(?P<format>[^/]+)/users/(?P<username>[^/]+)/awards/?$',
+ AwardsByUserFeed(), name="badger.feeds.awards_by_user"),
+)

0 comments on commit 7eb6575

Please sign in to comment.