Skip to Content
Menu
This question has been flagged
1 Odpoveď
1190 Zobrazenia

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
Zrušiť
Best Answer

Hi,

You can use constraints for this,

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


Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
jún 25
1918
3
júl 25
3514
1
máj 25
1633
1
máj 25
1884
4
máj 25
3005