From 17f2d1ab9b3344d1880a7f7e98c972b8c599976b Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 21 Apr 2011 00:03:52 -0400 Subject: some basic progress on models etc --- piccast/urls.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'piccast/urls.py') diff --git a/piccast/urls.py b/piccast/urls.py index 5dfdaa3..c1e9917 100644 --- a/piccast/urls.py +++ b/piccast/urls.py @@ -1,17 +1,26 @@ from django.conf.urls.defaults import * +from django.contrib import databrowse +from piccast.feeds.models import * # Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() +from django.contrib import admin +admin.autodiscover() + +databrowse.site.register(PicFeed) +databrowse.site.register(PicSet) +#databrowse.site.register(Pic) +#databrowse.site.register(Category) urlpatterns = patterns('', - # Example: - # (r'^piccast/', include('piccast.foo.urls')), + (r'^admin/doc/', include('django.contrib.admindocs.urls')), + (r'^admin/', include(admin.site.urls)), + (r'^browse/(.*)', databrowse.site.root), - # 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')), + # not using this subdirectory scheme; I like to have it all at the toplevel + # (r'^piccast/', include('piccast.foo.urls')), - # Uncomment the next line to enable the admin: - # (r'^admin/', include(admin.site.urls)), + (r'^json/feeds/', 'feeds.views.newest_feeds'), + (r'^json/pics_by_set/(\d+)/', 'feeds.views.pics_by_set'), + (r'^json/sets_by_feed/(\d+)/', 'feeds.views.sets_by_feed'), + (r'^json/sets_by_feed/([-\w]+)/', 'feeds.views.sets_by_feedslug'), ) -- cgit v1.2.3