Hi, i have this error when i edit the data, is similar error the next link

http://stackoverflow.com/questions/19741314/multivaluedictkeyerror-in-django-admin

but the only different is i use generic relation, this is my models.py

class Photos(models.Model):
name = models.CharField(max_length=150)
 imagen = ImageField(upload_to='photos', blank=True, null=True)

content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey('content_type', 'object_id')


def __unicode__(self):
return self.name
 class Meta:
verbose_name_plural = "Photos"

and here my other models.py use the model generic Photos

class Portfolio(models.Model):
    service = models.CharField('Nombre del servicio', max_length=250)
    date = models.DateField()
    link = models.URLField(blank=True)

    photos = generic.GenericRelation(Photos)

    def __unicode__(self):
        return self.service

and this my admin.py

class PhotosAdminInline(generic.GenericTabularInline):
    model = Photos
    extra = 1

class PortfolioAdmin(admin.ModelAdmin):
    inlines = [PhotosAdminInline]

.....

when i save the portfolio the fist time only 1 pic or 2 or 3 etc NOT have
error
but when i need edit and add new photo i have this error

MultiValueDictKeyError at /admin/portfolio/portfolio/6/


"u'photos-photos-content_type-object_id-0-id'"


maybe this is a bug in Django?


Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-7rO3TsZof_Q8Ri6rMg9S%3DcPYq%2BRnk1wujbCrfx3BJ8ubGyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to