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+)/goodreads/$", "work_goodreads", name="work_goodreads"),
url(r"^work/(?P<work_id>\d+)/openlibrary/$", "work_openlibrary", name="work_openlibrary"), url(r"^work/(?P<work_id>\d+)/openlibrary/$", "work_openlibrary", name="work_openlibrary"),
url(r"^googlebooks/(?P<googlebooks_id>.+)/$", "googlebooks", name="googlebooks"), 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/(?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/cancel/$", login_required(PledgeCancelView.as_view()), name="pledge_cancel"),
url(r"^pledge/complete/$", login_required(PledgeCompleteView.as_view()), name="pledge_complete"), 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] base_url = request.build_absolute_uri("/")[:-1]
#may want to deprecate the following return render(request, 'work.html', {
if action == 'setup_campaign': 'work': work,
return render(request, 'setup_campaign.html', {'work': work}) 'premiums': premiums,
else: 'ungluers': userlists.supporting_users(work, 5),
return render(request, 'work.html', { 'claimform': claimform,
'work': work, 'wishers': wishers,
'premiums': premiums, 'base_url': base_url,
'ungluers': userlists.supporting_users(work, 5), 'editions': editions,
'claimform': claimform, 'pubdate': pubdate,
'wishers': wishers, 'pledged':pledged,
'base_url': base_url, 'activetab': activetab,
'editions': editions, 'alert':alert
'pubdate': pubdate, })
'pledged':pledged,
'activetab': activetab,
'alert':alert
})
def manage_campaign(request, id): def manage_campaign(request, id):
campaign = get_object_or_404(models.Campaign, id=id) campaign = get_object_or_404(models.Campaign, id=id)