Hello
You can do it in your views.py
#If request method is get you can use
val2 = request.GET.get('val1')
#if method is get you can use
val2 = request.POST.get('val1')

#then you can use val2 to in sert it in the dB
Model.objects.create(val1=request.GET['val1'], val2=val2)

Regards

Ammar Mohammed
Tel: 249113075979
On 28 Jan 2022, 21:52 +0200, Feroz Ahmed <feroz.r...@gmail.com>, wrote:
> Hi,
> I am new to django,
> I have field1 as dropdown with mentioned months name
> filed2 is none and excluded in forms
>
> I want while inserting the data , if I select month , it should insert the 
> same value in field2
>
> request your support
> Ex:
> field1 .value('JAN')
>
> field2 is excluded from froms.py
> want the value to be inserted in field2  from field 1 in db
>
> update / delete /insert functions are fine, no issues  but field2 is not 
> getting value from field 1 Thank You --
> 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/61f44948.1c69fb81.9ac1a.ad93%40mx.google.com.

-- 
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/51d615fc-43dd-4250-8d04-101c06ad3bf8%40Spark.

Reply via email to