1. Colin Copeland
  2. django-eventbrite

Commits

glassresistor  committed 1a3fa16

Fixed model problem and added management cmds

  • Participants
  • Parent commits 72c0ed3
  • Branches default

Comments (0)

Files changed (6)

File eventbrite/management/__init__.py

  • Ignore whitespace
Empty file added.

File eventbrite/management/commands/__init__.py

  • Ignore whitespace
Empty file added.

File eventbrite/management/commands/update_contacts.py

View file
  • Ignore whitespace
+from optparse import make_option
+from django.core.management.base import BaseCommand, CommandError
+from eventbrite.utils import update_contacts
+
+class Command(BaseCommand):
+    help = 'Help text goes here'
+
+    def handle(self, **options):
+        return update_contacts()

File eventbrite/management/commands/update_events.py

View file
  • Ignore whitespace
+from optparse import make_option
+from django.core.management.base import BaseCommand, CommandError
+from eventbrite.utils import update_events
+
+class Command(BaseCommand):
+    help = 'Help text goes here'
+
+    def handle(self, **options):
+        return update_events()

File eventbrite/models.py

View file
  • Ignore whitespace
     end_date = models.DateTimeField(blank=False)
     status = models.CharField(max_length=15, blank=False)
     timezone = models.CharField(max_length=15, blank=False)
-    title = models.CharField(max_length=30, blank=False)
+    title = models.CharField(max_length=60, blank=False)
     url = models.URLField(blank=False)
     tags = models.CharField(max_length=30, blank=True)
     venue = models.ForeignKey('Venue', null=True)

File eventbrite/utils.py

View file
  • Ignore whitespace
 from django.db.models.aggregates import Count
 api = API()
 
-def update_event(events=None):
+def update_events(events=None):
     if not events:
         events = api.call('user_list_events',)['events']
     for event in events: