Hello,

I have the following model :

class Trombi(models.Model):
        first_name = models.CharField("Prénom", maxlength=40)
        last_name = models.CharField("Nom", maxlength=40)
        photo = models.ImageField("Photo", height_field="80",
width_field="80", upload_to="photos")
        url = models.SlugField(prepopulate_from=("first_name", "last_name"))

        class Admin:
                list_display = ['first_name', 'last_name']
                list_filter = ['last_name']
                search_fields = ['last_name']

        class Meta:
                verbose_name = "Photo"
                verbose_name_plural = "Photos"

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

        def get_absolute_url(self):
                return "/people/%s" % (self.url,)

In Django admin (0.96), when I save data, I have :

L'objet Photo "first_name last_name" a été modifié avec succès

Instead of :

L'objet Photo "John Doe" a été modifié avec succès, if I set John as
first_name and Doe as last_name.

What's wrong ? Is it a conflict with User object ?

Regards,
Nicolas


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to