yes we should deprecate setup_work

pull/1/head
eric 2012-03-23 11:09:51 -04:00
parent 84411ca6e0
commit 360d11f88a
2 changed files with 13 additions and 19 deletions

View File

@ -44,8 +44,6 @@ urlpatterns = patterns(
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"),
url(r"^googlebooks/(?P<googlebooks_id>.+)/$", "googlebooks", name="googlebooks"),
#may want to deprecate the following
url(r"^setup/work/(?P<work_id>\d+)/$", "work", {'action':'setup_campaign'}, name="setup_campaign"),
url(r"^pledge/(?P<work_id>\d+)/$", login_required(PledgeView.as_view()), name="pledge"),
url(r"^pledge/cancel/$", login_required(PledgeCancelView.as_view()), name="pledge_cancel"),
url(r"^pledge/complete/$", login_required(PledgeCompleteView.as_view()), name="pledge_complete"),

View File

@ -164,23 +164,19 @@ def work(request, work_id, action='display'):
base_url = request.build_absolute_uri("/")[:-1]
#may want to deprecate the following
if action == 'setup_campaign':
return render(request, 'setup_campaign.html', {'work': work})
else:
return render(request, 'work.html', {
'work': work,
'premiums': premiums,
'ungluers': userlists.supporting_users(work, 5),
'claimform': claimform,
'wishers': wishers,
'base_url': base_url,
'editions': editions,
'pubdate': pubdate,
'pledged':pledged,
'activetab': activetab,
'alert':alert
})
return render(request, 'work.html', {
'work': work,
'premiums': premiums,
'ungluers': userlists.supporting_users(work, 5),
'claimform': claimform,
'wishers': wishers,
'base_url': base_url,
'editions': editions,
'pubdate': pubdate,
'pledged':pledged,
'activetab': activetab,
'alert':alert
})
def manage_campaign(request, id):
campaign = get_object_or_404(models.Campaign, id=id)