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
Anonymous
So you are using an API
Anonymous
Like restful API?
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?
Anonymous
Rahul
?
Put method
Rahul
?
Yes
Anonymous
I mean is it the same view that is serving the form and is it also recieving the form data?
Anonymous
Cool
Anonymous
So, first you can make a variable named as insuranceType
Anonymous
And set it equal to the before update insurance type
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?
Rahul
Thanku so much got it
Rahul
Let me tru
Rahul
Try
Anonymous
I hope it solved your problem...
Anonymous
Try
Sure
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...
Doragonsureiyā
I was helping him...
Read the rules before any activity: @PythonRules
Anonymous
Do so
Why?
Anonymous
I will be removed...
Anonymous
No issue
Anyways, i hope this will help you.
π
I will be removed...
Didn't know that
Anonymous
Is there any way to do with model also.?
I don't see a way in your current situation
Doragonsureiyā
Didn't know that
Read the rules before any activity: @PythonRules
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 ????
S
In django
Gil
In django
You are dealing with UI , js
S
Can't we do this inside modelforms or models itself
Gil
Can't we do this inside modelforms or models itself
Yes you can, but you need to undersand that UI is js. Like https://stackoverflow.com/a/35990815
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?
Priyanshu
Should i learn libraries too
Priyanshu
Ok
Priyanshu
This group is lot faster than Google
b
I don't think so
Doragonsureiyā
so nobody's gonna help me, right.
You are not entitled to help. Being nice is probably going to be to your benefit. If someone wants to answer, they will.
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.