Hello,

You need to start from the urls.py file and define a path that looks close 
this   

your_path/<int: variable_data> or your_path/<str: variable_data>

Then change your view to handle the new parameter

def form_view(request, variable_data):

Within your view you can now manipulate this parameter through a 
variable/function/class

Hope this is of help.

The backend is the easy part, front-end needs to be stitched right to 
generate pass variable data accurately with minimal user input for data 
sanity.



On Monday, January 23, 2023 at 4:08:43 AM UTC+3 stumblin...@gmail.com wrote:

> I am trying to pass initial values to my form set via URL Query
> ex) Localhost:8000?/First_name_id_0=Samuel
> [image: forms.py.png]
>
> I was told to use the initial parameter and not the instance in my view 
> first
>
> "An inline formset is related to one instance of the parent model. You 
> identify *which* instance the formset is related to by the “instance” 
> parameter. The “initial” parameter has a different usage, which is defined 
> in the docs."
>
> But I can't seem to find an examples in the docs
> [image: Views.py.png]
>
> How do I change my view so that that it initialize my form set with URL 
> Query?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b4708907-6549-4959-bb3d-3e7a1b5c5535n%40googlegroups.com.

Reply via email to