On Fri, Oct 7, 2011 at 9:02 AM, Tsung-Hsien wrote:
> I give the item a Instance and use item.photo_set.all()
> , but it shows error
>
> AttributeError: 'ForeignRelatedObjectsDescriptor' object has no
> attribute 'all'
>
> I check the item has attribute of photo_set, but item.photo_set has no
> att
I give the item a Instance and use item.photo_set.all()
, but it shows error
AttributeError: 'ForeignRelatedObjectsDescriptor' object has no
attribute 'all'
I check the item has attribute of photo_set, but item.photo_set has no
attribute of all()
How to solve this?
thanks!
On Oct 6, 11:50 pm, k
On Thu, 2011-10-06 at 23:31 -0700, Tsung-Hsien wrote:
> class Item(models.Model):
> name = models.CharField(max_length=250)
> description = models.TextField()
>
> class Meta:
> ordering = ["name"]
>
> def __unicode__(self):
> return self.name
>
> c
3 matches
Mail list logo