From: Matthijs Kooijman Date: Sat, 9 Feb 2008 18:27:28 +0000 (+0100) Subject: * Remove some old stuff from the events app (such as the "Person" model). X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=cf2d36b584d6b5470d27100cd0960e1905ee8e16;p=matthijs%2Fprojects%2Fxerxes.git * Remove some old stuff from the events app (such as the "Person" model). --- diff --git a/events/models.py b/events/models.py index eccab09..a283adf 100644 --- a/events/models.py +++ b/events/models.py @@ -1,4 +1,5 @@ from django.db import models +from django.contrib.auth.models import User # Create your models here. class Event(models.Model): @@ -18,18 +19,6 @@ class Event(models.Model): ('Registrations', {'fields' : ('slots',)} ), ) -class Person(models.Model): - first_name = models.CharField(max_length=255) - last_name = models.CharField(max_length=255) - - def __str__(self): - return self.first_name + ' ' + self.last_name - - class Admin: - list_display = ('first_name', 'last_name') - list_filter = ['last_name'] - search_fields = ['first_name', 'last_name'] - class Registration(models.Model): - person = models.ForeignKey(Person, edit_inline=models.STACKED, num_in_admin=3) + person = models.ForeignKey(User, edit_inline=models.STACKED, num_in_admin=3) event = models.ForeignKey(Event, core=True) diff --git a/events/views/__init__.py b/events/views/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/events/views/event.py b/events/views/event.py deleted file mode 100644 index fc06909..0000000 --- a/events/views/event.py +++ /dev/null @@ -1,23 +0,0 @@ -#from django.template import Context, loader -#from django.http import HttpResponse -from ee.events.models import Event -from django.shortcuts import render_to_response -from django.http import Http404 - - - -def detail(request, event_id): - try: - event = Event.objects.get(id=event_id) - #t = loader.get_template('events/event/detail.html') - #c = Context({ - # 'event' : event, - #}) - #return HttpResponse(t.render(c)) - return render_to_response('events/event/detail.html', {'event' : event}) - except Event.DoesNotExist: - raise Http404 - -def regs(request, event_id): - pass - #return HttpResponse('')