Hello,

Sorry for the beginner's question, but I have a behaviour which looks like
a bug to me and wanted to know if someone could advise me on this.

*Error*

I have added a models.ForeignKey('self', blank=True) to my model and now I
cannot see any row in the admin page, even if the filter shows that there
is 0 of 30 selected. Would someone know why?

*In more details*

I have added "related_prod = models.ForeignKey('self', blank=True)" to my
product model and also added the related_prod to the admin fields list.
When going into the list of products in the admin page, all products have
disappeared. I can still access to the individual product by going to the
specific product page (something like admin/product/3) and everything seems
to work correctly here, including the new related_prod. Also, I can get the
list of products in the shell by doing product.objects.all().

*What I'm trying to achieve*

What I'm trying to achieve is to have a related product to another one but
only in one direction. For instance, I want product A referring to product
B, product B referring to product C and product Z refering to product B.
The usual ManyToManyField doesn't seems to work here as if I set product A
referring to product B, product B will also refer to product A and this is
not what I want.

*Environment*

I'm using Django 1.4 with the latest Satchmo e-commerce platform. I beleive
the question isn't really related to Satchmo as it is very specific to
Foreignkey.

Regards,
Olivier

-- 
[image: Equalitea_logo] <http://www.equalitea.co.uk/>
<http://facebook.com/equalitea>
<https://twitter.com/equalitea_uk>  <http://gplus.to/EqualiTea>
<http://www.pinterest.com/equalitea>  <http://equalitea-uk.tumblr.com>
<http://steepster.com/equalitea>   <http://www.equalitea.co.uk/>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to