Skip to Content
Menú
This question has been flagged
1 Respondre
1193 Vistes

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
Descartar
Best Answer

Hi,

You can use constraints for this,

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


Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 25
1919
3
de jul. 25
3514
1
de maig 25
1635
1
de maig 25
1884
4
de maig 25
3007