diff --git a/r2/r2/controllers/promotecontroller.py b/r2/r2/controllers/promotecontroller.py index f21083ec4..9ad9a08c6 100644 --- a/r2/r2/controllers/promotecontroller.py +++ b/r2/r2/controllers/promotecontroller.py @@ -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')) diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 7c00396df..7b6e364ae 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -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 diff --git a/r2/r2/templates/promotelinkformcpm.html b/r2/r2/templates/promotelinkformcpm.html deleted file mode 100644 index b84797171..000000000 --- a/r2/r2/templates/promotelinkformcpm.html +++ /dev/null @@ -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()"> - - - -<%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: -
- <%utils:line_field id="inventory-title" title="" css_class="rounded"> - -
- - -
- %endif - -