Skip to Content
Menu
This question has been flagged
1 Atsakyti
1213 Rodiniai

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


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

Portretas
Atmesti
Best Answer

Hi,

You can use constraints for this,

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


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
birž. 25
1931
3
liep. 25
3519
1
geg. 25
1640
1
geg. 25
1889
4
geg. 25
3011