Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/t/e/tendenci-5.1.333/tendenci/addons/campaign_monitor/views.py   tendenci(Download)
from tendenci.addons.campaign_monitor.forms import TemplateForm, CampaignForm
from tendenci.addons.campaign_monitor.utils import temporary_id, extract_files
from tendenci.addons.campaign_monitor.utils import sync_campaigns, sync_templates
from tendenci.addons.campaign_monitor.utils import apply_template_media
from tendenci.core.site_settings.utils import get_setting
def campaign_sync(request):
    if not has_perm(request.user,'campaign_monitor.add_campaign'):
        raise Http403
 
    sync_campaigns()

src/t/e/tendenci-5.1.333/tendenci/addons/campaign_monitor/management/commands/sync_campaign_monitor.py   tendenci(Download)
    def handle(self, *args, **options):
        from tendenci.apps.user_groups.models import Group
        from tendenci.apps.profiles.models import Profile
        from tendenci.addons.campaign_monitor.models import (ListMap, Campaign, Template, setup_custom_fields)
        from tendenci.addons.campaign_monitor.utils import sync_campaigns, sync_templates
 
        print 'Starting to sync campaigns with campaign monitor...'
        sync_campaigns()
        print "Done"