Exemple #1
0
    def save(self, *args, **kwargs):
        # Strip whitespace from langs before save
        # Also confirm_message or welcome
        self.languages = self.languages.replace(" ", "")
        self.welcome = self.welcome.strip()
        self.confirm_message = self.confirm_message.strip()
        super(Newsletter, self).save(*args, **kwargs)

        # Cannot import earlier due to circular import
        from news.newsletters import clear_newsletter_cache

        # Newsletter data might have changed, forget our cached version of it
        clear_newsletter_cache()
Exemple #2
0
    def save(self, *args, **kwargs):
        # Strip whitespace from langs before save
        # Also confirm_message or welcome
        self.languages = self.languages.replace(" ", "")
        self.welcome = self.welcome.strip()
        self.confirm_message = self.confirm_message.strip()
        super(Newsletter, self).save(*args, **kwargs)

        # Cannot import earlier due to circular import
        from news.newsletters import clear_newsletter_cache

        # Newsletter data might have changed, forget our cached version of it
        clear_newsletter_cache()
Exemple #3
0
 def handle(self, *args, **options):
     sync_data(url='https://{}/news/sync/'.format(options['domain']),
               clean=options['clean'],
               api_token=options['key'])
     clear_newsletter_cache()
     clear_sms_cache()
Exemple #4
0
def post_newsletter_delete(sender, **kwargs):
    # Cannot import earlier due to circular import
    from news.newsletters import clear_newsletter_cache
    clear_newsletter_cache()
Exemple #5
0
def post_newsletter_delete(sender, **kwargs):
    # Cannot import earlier due to circular import
    from news.newsletters import clear_newsletter_cache
    clear_newsletter_cache()
Exemple #6
0
 def handle(self, *args, **options):
     sync_data(url='https://{}/news/sync/'.format(options['domain']),
               clean=options['clean'],
               api_token=options['key'])
     clear_newsletter_cache()
     clear_sms_cache()