Hi,
everytime I am selecting only one object from my Product from all my
Products available in my Cart.
It saves and includes all Products to the model.ManyToManyField(Product) in
my Cart model.
I dont know what is wrong with my code here.
Can somebody help me please?
--
You received this me
The first solution works like this:
If you create a foreign key from ModelA to ModelB, Django automatically
create something like B.modela_set that works just like the objects
attribute, but just for the A objects that are related to B, right?
That's why you can du stuff like attore.film_set.all()
I think it is the first solution that you have proposed, but I can't figure
out how to use it. Also, is there a way to make sure that the ID is
automatically taken? With a proper publisher for loop I would like all the
lists of movies for each actor.
This is my urls.py
from django.conf.urls.de
I think it is the first solution that you have proposed, but I can't figure
out how to use it. Also, is there a way to make sure that the ID is
automatically taken? With a proper publisher for loop I would like all the
lists of movies for each actor.
This is my urls.py
from django.conf.urls.de
Hey,
I didn't quite understand what you're trying to do, so I'm covering both
interpretations.
1- If you're trying to, for instance, get all the films an actor was in you
can, as explained here
https://docs.djangoproject.com/en/1.5/topics/db/queries/#many-to-many-relationships(the
link is for Dja
th=1000 )
locandina = models.CharField( max_length=100 )
copertina = models.CharField( max_length=100 )
trailer = models.ForeignKey( Trailer )
data_inserimento = models.DateField( null=True, verbose_name="data
d'inserimento" )
anno = models.ForeignKey( Anno )
Well... Problem closed. I was trying to override things that I
shouldn't. Now I got the idea of returning manager by __get__ and
everything is just fine :)
On Jun 27, 11:13 pm, Vladimir Shulyak wrote:
> Hello,
>
> I am trying to develop sublcass of models.ManyToManyField. This
Hello,
I am trying to develop sublcass of models.ManyToManyField. This class
should return text representations of objects to forms.TextField (like
TagField from django-tagging). The reason to make my own
representation is because:
- I don't need content types
- I need "fron
i persist in models.ManyToManyField so much so that i forgot this
method.
thank you Ivan.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
hoamon wrote:
> Course|Trainee|Company
> C1| T1 | Com1
> C1| T2 | Com1
> C1| T3 | Com1
> C2| T1 | Com2
> C2| T3 | Com1
> C2| T4 | Com2
> C3| T1 | Com2
You really can't do it using standard ManyToManyField. The common way is
to create this r
to C2,C3.
how can i implement this relation in Couse Model, i cann't use the
syntax like
trainee = models.ManyToManyField(Trainee)
company = models.ManyToManyField(Company)
that makes two relation tables not one.
thank you for your patience.
--~--~-~--~~~---~--
11 matches
Mail list logo