Delete PromoteLinkFormCpm.

This commit is contained in:
bsimpson63
2013-05-06 19:30:54 -04:00
committed by Brian Simpson
parent e8c6862936
commit 1fa8115963
3 changed files with 0 additions and 95 deletions

View File

@@ -43,7 +43,6 @@ from r2.lib.pages import (
Promote_Graph,
PromotePage,
PromoteLinkForm,
PromoteLinkFormCpm,
PromoteLinkNew,
PromoteReport,
Reddit,
@@ -240,25 +239,6 @@ class PromoteController(ListingController):
page = PromotePage('new_promo', content=form)
return page.render()
# For development. Should eventually replace GET_edit_promo
@validate(VSponsor('link'),
link=VLink('link'))
def GET_edit_promo_cpm(self, link):
if not link or link.promoted is None:
return self.abort404()
rendered = wrap_links(link, wrapper=promote.sponsor_wrapper,
skip=False)
form = PromoteLinkFormCpm(link=link,
listing=rendered,
timedeltatext="")
page = PromotePage('new_promo', content=form)
return page.render()
# admin only because the route might change
@validate(VSponsorAdmin('campaign'),
campaign=VPromoCampaign('campaign'))

View File

@@ -3368,19 +3368,6 @@ class PromoteLinkForm(Templated):
self.min_daily_bid = 0 if c.user_is_admin else g.min_promote_bid
class PromoteLinkFormCpm(PromoteLinkForm):
def __init__(self, sr=None, link=None, listing='', *a, **kw):
self.setup(link, listing)
if not c.user_is_sponsor:
self.now = promote.promo_datetime_now().date()
start_date = self.now
end_date = self.now + datetime.timedelta(60) # two months
self.inventory = promote.get_available_impressions(sr, start_date, end_date)
Templated.__init__(self, *a, **kw)
class PromoAdminTool(Reddit):
def __init__(self, query_type=None, launchdate=None, start=None, end=None, *a, **kw):
self.query_type = query_type

View File

@@ -1,62 +0,0 @@
## The contents of this file are subject to the Common Public Attribution
## License Version 1.0. (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
## License Version 1.1, but Sections 14 and 15 have been added to cover use of
## software over a computer network and provide for limited attribution for the
## Original Developer. In addition, Exhibit A has been modified to be
## consistent with Exhibit B.
##
## Software distributed under the License is distributed on an "AS IS" basis,
## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
## the specific language governing rights and limitations under the License.
##
## The Original Code is reddit.
##
## The Original Developer is the Initial Developer. The Initial Developer of
## the Original Code is reddit Inc.
##
## All portions of the code written by reddit are Copyright (c) 2006-2013
## reddit Inc. All Rights Reserved.
###############################################################################
<%inherit file="promotelinkform.html" />
<%namespace file="utils.html"
import="error_field, checkbox, image_upload, reddit_selector" />
<%namespace name="utils" file="utils.html"/>
<%def name="javascript_setup()">
<script type="text/javascript">
$(function() {
update_bid("*[name=bid]");
/* load available impressions viz */
update_inventory_table();
/* add change handler to radio that will load front-page imps when
user switches from targeted to untargeted */
$("#no_targeting").change(function() {
$("#sr-autocomplete").val("");
update_inventory_table();
});
/* wire sr selector to update inventory viz on selection change */
$("#sr-autocomplete").bind("sr-changed", update_inventory_table);
});
</script>
</%def>
<%def name="right_panel()">
## title and table rows are dynamically generated when user selects a target
%if thing.link and not c.user_is_sponsor:
<div class="bidding-history" style="padding-top: 0px;">
<%utils:line_field id="inventory-title" title="" css_class="rounded">
<table id="inventory" class="bidding-history">
</table>
</%utils:line_field>
</div>
%endif
</%def>