diff options
Diffstat (limited to 'app/syndication/models.py')
-rw-r--r-- | app/syndication/models.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/syndication/models.py b/app/syndication/models.py index 946b5cf..2be7237 100644 --- a/app/syndication/models.py +++ b/app/syndication/models.py @@ -7,7 +7,7 @@ from django.contrib.contenttypes.fields import GenericForeignKey from django.db.models.signals import post_save from django.dispatch import receiver -from .syndicators import post_to_medium, build_facebook_feed, post_to_twitter, post_photo_to_flickr +from .syndicators import post_to_medium, build_facebook_feed, post_to_twitter, post_photo_to_flickr, post_to_facebook class FBOAuthToken(models.Model): @@ -74,10 +74,12 @@ def post_save_events(sender, update_fields, created, instance, **kwargs): instance.status = 2 if item.name == "Twitter": print("calling function") - post_to_twitter(instance.content_object, instance.content_type.name) + #post_to_twitter(instance.content_object, instance.content_type.name) if item.name == "Flickr": if instance.content_type.name == "lux image": post_photo_to_flickr(instance.content_object) + if item.name == "Facebook": + post_to_facebook(instance.content_object, instance.content_type.name) post_save.disconnect(post_save_events, sender=SyndicatedItem) instance.status = "2" instance.save() |