List Info

Thread: Edit inline problems




Edit inline problems
country flaguser name
United States
2007-06-28 00:25:56
Hi! It's been a while since I posted to this list, but I
have a little 
problem and would like to ask for some help.

I have the following 2 models:


class Personnel(models.Model):
    report                  = models.ForeignKey(Report,
unique = True)

    class Admin:
        pass


    def __str__(self):
        return 'Personnel list from (%s)' % self.report


class Person(models.Model):
    personnel = models.ForeignKey(
              		Personnel,
                        core = True,
                        edit_inline = models.TABULAR,
                        min_num_in_admin = 1,
                        max_num_in_admin = 10,
                )
    first_name = models.CharField('F. Name', maxlength = 25,
core = True)
    middle_name = models.CharField('M. Name', maxlength =
25, blank = 
True)
    last_name = models.CharField('L. Name', maxlength = 50)
    date_born = models.DateField()
    time_added = models.DateTimeField()


    def __str__(self):
        return '%s %s' % (self.first_name, self.last_name)


I validate the models and I can see the forms in the Admin,
but every 
time I try to add a Person (while adding a new Personnel
list or editing 
an existing one), none of the Persons get saved. What could
be wrong with 
my model?

I'd appreciate your look at it and pointing any errors I
might have in my 
code. Thank you!

Patrick



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )