Re: Can anybody answe how i can access infromation from the parent modell i my HTML template in Django?

2020-06-30 Thread The Sha
27;ContactFormset':ContactFormset, 'Address Formset':AddressFormset, > 'customuser': > customuser }) > > Regards, > > Andréas > > > Den tis 30 juni 2020 kl 11:06 skrev The Sha >: > >> Ok i understand, how du i put the CustomUser in the r

Re: Can anybody answe how i can access infromation from the parent modell i my HTML template in Django?

2020-06-30 Thread The Sha
you need to add that to the dictionary. > > Med vänliga hälsningar, > > Andréas > > Den tis 30 juni 2020 kl 10:38 skrev The Sha >: > >> >> >> >> >> <https://stackoverflow.com/posts/62653247/timeline> >> >> I have a two formsets r

Re: Can anybody answe how i can access infromation from the parent modell i my HTML template in Django?

2020-06-30 Thread The Sha
that you can get in the template itself. So if you want to add something > called object you need to add that to the dictionary. > > Med vänliga hälsningar, > > Andréas > > Den tis 30 juni 2020 kl 10:38 skrev The Sha >: > >> >> >> >> >> <

Re: Two models one form, or use generic CreateView

2020-06-09 Thread The Sha
Ok intressant, i cant find any good exemplen. Thank you for the reply. Im new to django can you maybe be more specific with som examples or point me in the right direktion? thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Re: Custom template tags - instance.templatetag

2020-06-09 Thread The Sha
Den tisdag 2 juni 2020 kl. 22:53:06 UTC+2 skrev Jan Gregorczyk: > > Hi! How to change my template tag? > from django import template > > register = template.Library() > > @register.simple_tag > def votes_up_exists(answer, user_id): > pass > > how I use it - {% votes_up_exists answer request.user.

Two models one form, or use generic CreateView

2020-06-09 Thread The Sha
Hi I hava a problem in django, i have to models one is a CustomUser Model and the other is a Address model. The problem is that when i create a generic CreateView for the Address model and use a pk: url the address form wont get the instance of the users PK for adding a new address. my mode