I am porting an app to the latest SVN trunk of Django and am running
into a problem with the admin interface not currectly processing
objects which are subclasses of a more generic model. I've written up a
small testcase model that demonstrates this problem:

from django.db import models
class Ticket(models.Model):
        amount = models.IntegerField()
class MovieTicket(Ticket):
        movie = models.CharField(maxlength=100)
        def __repr__(self):
                return "$%s ticket for %s" % (self.amount, self.movie)
        class Admin:
                pass
class ConcertTicket(Ticket):
        band = models.CharField(maxlength=100)
        venue =  models.CharField(maxlength=100)
        def __repr__(self):
                return "$%s ticket for %s at %s" % (self.amount,
self.band,self.venue)
        class Admin:
                pass

When this model is loaded into the latest (rev 2868) django, I can
create a ConcertTicket with the admin interface with no problem, but
when I select it from the Concert ticket change page
(http://localhost:8000/admin/testcase/concertticket/), the URL that is
traversed (URL: http://localhost:8000/admin/testcase/concertticket/1/)
returns  a 404 error. Additionally, when accessing the objects through
the python prompt, I get an empty list for MovieTicket.objects.all(),
even though the admin index page lists the object and even utilizes the
objects __repr__. Additionally, a look at the database tables will also
show the data. Even in the list recent actions shows the new object,
but selecting the object returns a 404.

This is massivily simplified code, but a more complex object
configuration with similar inheritance pattern *did* work prior to the
unification of the magic removal branch (circa revision 2747).

Any assistance would be appreciated.

  -- William


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to