Rahul
When he wil try then i will send error msg
Anonymous
So you want to see if the user is trying to update the insurance type and accordingly throw an error
Rahul
Except insurance type if user will update anything it will get update
Anonymous
Okay cool
Rahul
Yes
Anonymous
Okay
Anonymous
That's easy
Rahul
Anonymous
So you are using an API
Anonymous
Like restful API?
Rahul
Rahul
Anonymous
Okay
Anonymous
So, what type of view are you using, function or class based?
Anonymous
Yes
And are you using the same view for get and post method?
Rahul
Anonymous
Anonymous
Rahul
Rahul
Anonymous
I mean is it the same view that is serving the form and is it also recieving the form data?
Rahul
Anonymous
Cool
Anonymous
So, first you can make a variable named as insuranceType
Rahul
Anonymous
And set it equal to the before update insurance type
Rahul
Anonymous
And then check what is the current insurance type that the user wants.
Anonymous
And using if, check if both of them are sams
Anonymous
Same*
Anonymous
If they are, then the user has not changed anything
Anonymous
And you can save the form
Rahul
If same then fine and if not same then send error msg right?
Anonymous
Rahul
Thanku so much got it
Rahul
Let me tru
Rahul
Try
Anonymous
I hope it solved your problem...
Anonymous
Rahul
Is there any way to do with model also.?
Rahul
Thanku
Anonymous
And i cant send links in this group
Rahul
No issue
Anonymous
I was helping him...
π
Anonymous
Anonymous
I will be removed...
Anonymous
No issue
Anyways, i hope this will help you.
π
S
Guys , how can i make a radio button in a model form , which when get selected creates a drop-down list of the selected field. Anyone ????
Gil
S
In django
S
Can't we do this inside modelforms or models itself
S
Ok
S
Thanks
Priyanshu
Hlw should i learn flask before starting django?
محمد دلشاد
not neccesary
Priyanshu
Ok
Priyanshu
How much Python should i know to start Django?
Mirco
Priyanshu
Should i learn libraries too
Mirco
b
Priyanshu
Ok
Priyanshu
This group is lot faster than Google
b
I don't think so
b
b
explaining in more clear way, the UserRel is fine, it's being generated and working, but how to relate other model fields to the user profile, so the user won't able to see the data from admin and other user and can see only data that the particular user has saved
Sobha
https://stackoverflow.com/questions/62295008/after-successfull-payment-i-am-getting-anonymous-user-error
Sobha
Please help me to solve this error
Sobha
Thanks in advance
jam
Hi guys, a need a help.
I need use two forms for one Page.
Anonymous