Thank you for your response. But how would the Orders model field for payment look like?
Should it look like that: payment = models.ForeignKey(CustomerProfile, related_name="order_customer_payment",verbose_name='Zahlungsart') I don't understand how that should work. At the moment I am quite confused about what you mean. Regards On 23 Feb., 16:00, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Feb 23, 11:56 am, django_is <festival.s...@googlemail.com> wrote: > > > > > Hmm ok. Assuming the use case above what would be the correct way to > > solve this problem? Especially to have the possibility to have one > > field in the Orders table that allows me to select one payment method > > of the methods which got added to the one specific user. Adding > > payment methods to each user happens in the CustomerProfile with the > > M2M relationship between the CustomerProfile model and the Payment > > model. > > > Here is the M2M relationship defined in the CustomerProfile: > > > payment = models.ManyToManyField(Payment, verbose_name='Zahlungsart') > > > This M2M relationship is working as expected. I just don't know how to > > get the payment methods inside the Orders model. > > > It would be great if you could help me with this. > > > Thank you very much. > > > Regards > > I don't know how I can make what I said in the previous message it any > clearer: you don't need the to_field. > -- > DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.