Passing values

15 views
Skip to first unread message

Ivan Martić

unread,
Feb 13, 2019, 5:15:46 AM2/13/19
to Django users
Hi all,

where can i find more info regarding passing values in views/forms/url.
What I need is to pass value from form in previous url page to the form in next url page(also prefilling with data like timezone.now, request,user)

Thank you in advance.
Ivan

Mohammad Etemaddar

unread,
Feb 13, 2019, 5:47:45 AM2/13/19
to Django users
Dear Ivan,
If I get you right, You have a page with form, and you want to post it to another page. so, fill the "action" part of html form with the second page's url.

Also the timezone.now is allways available in any python file you are working on it, and also request and request.user

What do you want to do exactly?

Ivan Martić

unread,
Feb 13, 2019, 6:06:41 AM2/13/19
to django...@googlegroups.com
In first page(form), i want to search for vendor. Afterwords when i click on one we go into another page. On this page we have performance form where we need to give ratings from 1 to 5 for that particular vendor. 
So when I rate all the fields and press save, i want to store all rating data in sql together with vendor name, timestamp and username who saved tha data.

That was all working fine in for loop(except vendor part, needed to enter data in input field myself), but when i divide performance form into separate fields in HTML all crashed. Please see txt enclosed.
Thank you for your response.
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5eb3df26-ae0d-44c7-8f4b-e7b0b6e5e01e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
model.txt
forms.txt
view.txt
Reply all
Reply to author
Forward
0 new messages