summaryrefslogtreecommitdiff
path: root/app/syndication/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/syndication/models.py')
-rw-r--r--app/syndication/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/syndication/models.py b/app/syndication/models.py
index 6e4fd1c..d1ba135 100644
--- a/app/syndication/models.py
+++ b/app/syndication/models.py
@@ -40,6 +40,7 @@ def post_save_events(sender, update_fields, created, instance, **kwargs):
if instance.status == "1":
print("---------calling-----------")
for item in instance.syndicate.all():
+ print(item.name)
if item.name == "Medium":
instance.rel_link = post_to_medium(instance.content_object)
instance.status = 2
@@ -47,11 +48,13 @@ def post_save_events(sender, update_fields, created, instance, **kwargs):
build_facebook_feed()
instance.status = 2
if item.name == "Twitter":
- if instance.content_type.name == "LuxPhoto":
+ if instance.content_type.name == "lux image":
+ print("calling function")
post_photo_to_twitter(instance.content_object)
if item.name == "Flickr":
if instance.content_type.name == "LuxPhoto":
post_photo_to_flickr(instance.content_object)
post_save.disconnect(post_save_events, sender=SyndicatedItem)
+ instance.status = "2"
instance.save()
post_save.connect(post_save_events, sender=SyndicatedItem)