2011-08-31 03:46:55 +00:00
|
|
|
from django.conf.urls.defaults import *
|
2011-09-29 01:54:50 +00:00
|
|
|
from django.views.generic.simple import direct_to_template
|
2011-09-29 06:23:50 +00:00
|
|
|
from django.views.generic.base import TemplateView
|
2011-10-11 17:03:40 +00:00
|
|
|
from django.views.generic import ListView, DetailView
|
2011-10-29 22:40:00 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2012-01-18 17:08:34 +00:00
|
|
|
from django.conf import settings
|
2011-10-11 17:03:40 +00:00
|
|
|
|
2012-03-10 00:05:24 +00:00
|
|
|
from regluit.core.feeds import SupporterWishlistFeed
|
2011-10-11 17:03:40 +00:00
|
|
|
from regluit.core.models import Campaign
|
2012-03-19 23:32:37 +00:00
|
|
|
from regluit.frontend.views import CampaignFormView, GoodreadsDisplayView, LibraryThingView, PledgeView, PledgeCompleteView, PledgeModifyView, PledgeCancelView, FAQView
|
2012-03-08 03:06:30 +00:00
|
|
|
from regluit.frontend.views import CampaignListView, DonateView, WorkListView, UngluedListView, InfoPageView
|
2011-08-31 03:46:55 +00:00
|
|
|
|
|
|
|
urlpatterns = patterns(
|
|
|
|
"regluit.frontend.views",
|
|
|
|
url(r"^$", "home", name="home"),
|
2012-03-13 20:57:42 +00:00
|
|
|
url(r"^next/$", "next", name="next"),
|
2012-03-10 00:05:24 +00:00
|
|
|
url(r"^supporter/(?P<supporter_username>[^/]+)/$", "supporter", {'template_name': 'supporter.html'}, name="supporter"),
|
2011-09-29 01:36:47 +00:00
|
|
|
url(r"^search/$", "search", name="search"),
|
2011-09-29 06:23:50 +00:00
|
|
|
url(r"^privacy/$", TemplateView.as_view(template_name="privacy.html"),
|
2011-09-29 01:54:50 +00:00
|
|
|
name="privacy"),
|
2011-12-16 22:19:59 +00:00
|
|
|
url(r"^terms/$", TemplateView.as_view(template_name="terms.html"),
|
|
|
|
name="terms"),
|
2011-11-20 02:12:18 +00:00
|
|
|
url(r"^rightsholders/$", "rh_tools", name="rightsholders"),
|
2011-11-21 03:23:51 +00:00
|
|
|
url(r"^rightsholders/campaign/(?P<id>\d+)/$", "manage_campaign", name="manage_campaign"),
|
2011-11-16 05:22:22 +00:00
|
|
|
url(r"^rightsholders/claim/$", "claim", name="claim"),
|
2011-12-20 22:42:06 +00:00
|
|
|
url(r"^rh_admin/$", "rh_admin", name="rh_admin"),
|
|
|
|
url(r"^campaign_admin/$", "campaign_admin", name="campaign_admin"),
|
2012-01-06 15:42:17 +00:00
|
|
|
url(r"^faq/$", FAQView.as_view(), {'location':'faq', 'sublocation':'all'}, name="faq"),
|
|
|
|
url(r"^faq/(?P<location>\w*)/$", FAQView.as_view(), {'sublocation':'all'}),
|
|
|
|
url(r"^faq/(?P<location>\w*)/(?P<sublocation>\w*)/$", FAQView.as_view()),
|
2011-09-29 06:23:50 +00:00
|
|
|
url(r"^wishlist/$", "wishlist", name="wishlist"),
|
2011-10-25 01:29:01 +00:00
|
|
|
url(r"^campaigns/(?P<pk>\d+)/$",CampaignFormView.as_view(), name="campaign_by_id"),
|
2011-12-01 18:17:33 +00:00
|
|
|
url(r"^campaigns/(?P<facet>\w*)$", CampaignListView.as_view(), name='campaign_list'),
|
2011-12-03 00:29:23 +00:00
|
|
|
url(r"^lists/(?P<facet>\w*)$", WorkListView.as_view(), name='work_list'),
|
2012-01-15 21:48:26 +00:00
|
|
|
url(r"^unglued/(?P<facet>\w*)$", UngluedListView.as_view(), name='unglued_list'),
|
2011-11-16 22:16:57 +00:00
|
|
|
url(r"^goodreads/auth/$", "goodreads_auth", name="goodreads_auth"),
|
2011-10-25 01:29:01 +00:00
|
|
|
url(r"^goodreads/auth_cb/$", "goodreads_cb", name="goodreads_cb"),
|
2011-11-01 00:26:05 +00:00
|
|
|
url(r"^goodreads/flush/$","goodreads_flush_assoc", name="goodreads_flush_assoc"),
|
|
|
|
url(r"^goodreads/load_shelf/$","goodreads_load_shelf", name="goodreads_load_shelf"),
|
2012-01-24 17:36:45 +00:00
|
|
|
url(r"^goodreads/shelves/$","goodreads_calc_shelves", name="goodreads_calc_shelves"),
|
2011-11-06 19:02:29 +00:00
|
|
|
url(r"^stub/", "stub", name="stub"),
|
2011-11-06 23:54:48 +00:00
|
|
|
url(r"^work/(?P<work_id>\d+)/$", "work", name="work"),
|
2011-12-05 05:56:24 +00:00
|
|
|
url(r"^work/(?P<work_id>\d+)/librarything/$", "work_librarything", name="work_librarything"),
|
|
|
|
url(r"^work/(?P<work_id>\d+)/goodreads/$", "work_goodreads", name="work_goodreads"),
|
|
|
|
url(r"^work/(?P<work_id>\d+)/openlibrary/$", "work_openlibrary", name="work_openlibrary"),
|
2011-11-22 01:12:13 +00:00
|
|
|
url(r"^googlebooks/(?P<googlebooks_id>.+)/$", "googlebooks", name="googlebooks"),
|
2011-11-21 03:23:51 +00:00
|
|
|
#may want to deprecate the following
|
2011-11-06 23:54:48 +00:00
|
|
|
url(r"^setup/work/(?P<work_id>\d+)/$", "work", {'action':'setup_campaign'}, name="setup_campaign"),
|
2012-01-04 17:03:50 +00:00
|
|
|
url(r"^pledge/(?P<work_id>\d+)/$", login_required(PledgeView.as_view()), name="pledge"),
|
2012-01-10 23:26:04 +00:00
|
|
|
url(r"^pledge/cancel/$", login_required(PledgeCancelView.as_view()), name="pledge_cancel"),
|
2012-03-19 23:32:37 +00:00
|
|
|
url(r"^pledge/complete/$", login_required(PledgeCompleteView.as_view()), name="pledge_complete"),
|
|
|
|
url(r"^pledge/modify/(?P<work_id>\d+)$", login_required(PledgeModifyView.as_view()), name="pledge_modify"),
|
2011-11-16 18:20:10 +00:00
|
|
|
url(r"^subjects/$", "subjects", name="subjects"),
|
2011-11-16 19:58:39 +00:00
|
|
|
url(r"^librarything/$", LibraryThingView.as_view(), name="librarything"),
|
2011-11-17 00:47:29 +00:00
|
|
|
url(r"^librarything/load/$","librarything_load", name="librarything_load"),
|
2011-11-18 20:11:17 +00:00
|
|
|
url('^404testing/$', direct_to_template, {'template': '404.html'}),
|
|
|
|
url('^500testing/$', direct_to_template, {'template': '500.html'}),
|
2012-01-15 23:21:47 +00:00
|
|
|
url('^robots.txt$', direct_to_template, {'template': 'robots.txt', 'mimetype': 'text/plain'}),
|
2011-12-29 01:43:52 +00:00
|
|
|
url(r"^emailshare/$", "emailshare", name="emailshare"),
|
2012-01-09 20:53:09 +00:00
|
|
|
url(r"^feedback/$", "feedback", name="feedback"),
|
|
|
|
url(r"^feedback/thanks/$", TemplateView.as_view(template_name="thanks.html")),
|
2012-01-10 16:10:27 +00:00
|
|
|
url(r"^press/$", TemplateView.as_view(template_name="press.html"),
|
|
|
|
name="press"),
|
2012-01-15 18:19:35 +00:00
|
|
|
url(r"^about/$", TemplateView.as_view(template_name="about.html"),
|
|
|
|
name="about"),
|
2012-02-03 15:22:53 +00:00
|
|
|
url(r"^comments/$", "comment", name="comment"),
|
2012-03-08 03:06:30 +00:00
|
|
|
url(r"^info/(?P<template_name>[\w\.]*)$", InfoPageView.as_view()),
|
2012-03-10 00:05:24 +00:00
|
|
|
url(r"^info/(?P<template_name>[\w\.]*)$", InfoPageView.as_view()),
|
|
|
|
url(r'^supporter/(?P<supporter>[^/]+)/feed/$', SupporterWishlistFeed()),
|
2011-08-31 03:46:55 +00:00
|
|
|
)
|
2012-01-18 17:08:34 +00:00
|
|
|
|
|
|
|
if not settings.IS_PREVIEW:
|
|
|
|
urlpatterns += patterns(
|
2012-01-18 19:34:23 +00:00
|
|
|
"regluit.frontend.views",
|
2012-01-18 17:08:34 +00:00
|
|
|
url(r"^goodreads/$", login_required(GoodreadsDisplayView.as_view()), name="goodreads_display"),
|
|
|
|
url(r"^goodreads/clear_wishlist/$","clear_wishlist", name="clear_wishlist"),
|
|
|
|
url(r"^donate/$", DonateView.as_view(), name="donate"),
|
|
|
|
url(r"^celery/clear/$","clear_celery_tasks", name="clear_celery_tasks"),
|
2012-03-10 00:05:24 +00:00
|
|
|
)
|