Answer the question
In order to leave comments, you need to log in
How to make a table field able to store one unique value (True) and many others (False)?
Hello!
Prompt ways to implement the following logic:
I have a table, rules. Each entry is a separate set of rules, among which there is an activity flag field. If True, the rules are active, if False, respectively, no
Rules are specified in django-admin. And I understand that I can crutch this situation in other places. but I want it at the level of the model. Challenge: Only One set of rules can be active at a time. In other words, if the field value is True, it must be unique, if the value is False, uniqueness is not checked
How to implement this in Django
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question