Merge pull request #322 from Gluejar/fix_b2u_calculator

Fix b2u calculator
pull/1/head
Raymond Yee 2014-04-09 12:32:51 -07:00
commit 3a7cc09ebf
2 changed files with 6 additions and 1 deletions

View File

@ -98,6 +98,9 @@
</li>
<li><a href="{% url supporter user %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
<li><a href="{% url manage_account %}"><span>Account &amp; Pledges</span></a></li>
{% if user.rights_holder.all %}
<li><a href="{{ rhtoolsurl }}">Rights Holder Tools</a></li>
{% endif %}
<li><a href="{% url auth_logout %}"><span>Sign Out</span></a></li>
</ul>
</div>

View File

@ -663,6 +663,7 @@ def manage_campaign(request, id, action='manage'):
form= getManageCampaignForm(instance=campaign, data=request.POST)
if form.is_valid():
form.save()
campaign.dollar_per_day = None
campaign.set_dollar_per_day()
if campaign.type in {BUY2UNGLUE,THANKS} :
offers= campaign.work.create_offers()
@ -2153,8 +2154,9 @@ class FAQView(FormView):
def form_valid(self, form):
form.instance._current_total=form.cleaned_data['revenue']
form.instance.status='DEMO'
form.instance.update_left()
form.instance.type=BUY2UNGLUE
form.instance.set_dollar_per_day()
form.instance.update_left()
return self.render_to_response(self.get_context_data(form=form))
def get_initial(self):