[Answered ]-If statement for a specific field in django template

1👍

The first Problem as I understand it You want to have this check box and when it will true the Field of max_size will appear this problem needs to solve with javascript

Why ?

Because if You use the Django template you will need to refresh the page when the user changes something and this will overload the server So you need to create an event with js when the use click on the checkbox it will disappear

Also, last thing, if I have both names the exact same (i.e., (‘Sundays’, ‘Sundays’), is it necessary to have both? Or can Django figure it out?

This part … You need to know that the first value is the value will be stored in the database and the second value is the human-readable value this what will be displayed for the user in the form Read This

You must know you can’t put widgets into your model if you want to add it add it to your from in Your admin or form files … You will override the AdminModel in your admin file and change the formvalue Read This

👤Ayman

Leave a comment