From b89668b319f0db96f194a2e6ee0da162a85f8768 Mon Sep 17 00:00:00 2001 From: Ken Schwencke Date: Tue, 18 Feb 2014 18:06:09 -0800 Subject: [PATCH] Add the ability to override content_item_defaults again This ability got lost in the shuffle. Could just create options for content_item_type_code and state_code so we can do non-blurb / non-live items, but overriding content_item_defaults was how it was set up previously. --- p2p/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p2p/__init__.py b/p2p/__init__.py index 94c91a4..00ee96b 100644 --- a/p2p/__init__.py +++ b/p2p/__init__.py @@ -98,6 +98,7 @@ class P2P(object): def __init__(self, url, auth_token, debug=False, cache=NoCache(), image_services_url=None, + content_item_defaults=None, product_affiliate_code='chinews', source_code='chicagotribune', webapp_name='tRibbit'): @@ -122,7 +123,7 @@ def __init__(self, url, auth_token, 'filter': self.default_filter } - self.content_item_defaults = { + self.content_item_defaults = content_item_defaults or { "content_item_type_code": "blurb", "product_affiliate_code": self.product_affiliate_code, "source_code": self.source_code,