Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1217 Prikazi

how to cancel that option when one field have 1 information in specific.


for example, if field1 = lalalala, the user cant duplicate the document

Avatar
Opusti
Best Answer

Hi,

You can use constraints for this,

_sql_constraints = [
        ('name_uniq', 'UNIQUE (field_name)',  'The name must be unique !')
    ]


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jun. 25
1943
3
jul. 25
3534
1
maj 25
1653
1
maj 25
1892
4
maj 25
3026