remove unnecessary imports
[mygpo.git] / mygpo / publisher / management / commands / make-publisher.py
blob20297cef23f967555733dcc230eed962bb235394
1 from django.core.management.base import BaseCommand
2 from mygpo.api.models import Podcast
3 from django.contrib.auth.models import User
4 from mygpo.publisher.models import PodcastPublisher
6 class Command(BaseCommand):
7 def handle(self, *args, **options):
9 username = args[0]
10 podcast_url = args[1]
12 user = User.objects.get(username=username)
13 podcast = Podcast.objects.get(url=podcast_url)
15 PodcastPublisher.objects.create(user=user, podcast=podcast)