From cf2d36b584d6b5470d27100cd0960e1905ee8e16 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sat, 9 Feb 2008 19:27:28 +0100 Subject: [PATCH] * Remove some old stuff from the events app (such as the "Person" model). --- events/models.py | 15 ++------------- events/views/__init__.py | 0 events/views/event.py | 23 ----------------------- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 events/views/__init__.py delete mode 100644 events/views/event.py 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('') -- 2.30.2