콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1228 화면

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


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

아바타
취소
베스트 답변

Hi,

You can use constraints for this,

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


아바타
취소
관련 게시물 답글 화면 활동
1
9월 25
1971
1
6월 25
1998
3
7월 25
3579
1
5월 25
1701
4
5월 25
3050