Re: checkng for uniqueness of a field in django Admin

2019-01-28 Thread 'Amitesh Sahay' via Django users
If that field has unique values, probably you can use that fileld as primary 
key. 


Regards,
Amitesh Sahay91-750 797 8619 

On Monday, 28 January, 2019, 7:18:35 PM IST, 'Odile Lambert' via Django 
users  wrote:  
 
   
Hello
 
In django admin, I have a model with a model fiel "tech_number" which must be 
unique across the table. If I do not check the uniqueness, it raises a Django 
integrity error. According to the documentation it sounds normal.
 
I checked the uniqueness of the" tech_number" in the clean of the model form. 
but now it raises a validation error even in the change form. In fact it should 
ask if I needs to erase the existing one.
 
What did I miss?
 
Piscvau
 
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8bf1dd1b-f42c-8d31-3331-9b112d7ca888%40laposte.net.
For more options, visit https://groups.google.com/d/optout.
  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1252135655.2156351.1548683386362%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


checkng for uniqueness of a field in django Admin

2019-01-28 Thread 'Odile Lambert' via Django users

  
  
Hello
In django admin, I have a model with a model fiel "tech_number"
  which must be unique across the table. If I do not check the
  uniqueness, it raises a Django integrity error. According to the
  documentation it sounds normal.
I checked the uniqueness of the" tech_number" in the clean of the
  model form. but now it raises a validation error even in the
  change form. In fact it should ask if I needs to erase the
  existing one.
What did I miss?
Piscvau

  




-- 
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8bf1dd1b-f42c-8d31-3331-9b112d7ca888%40laposte.net.
For more options, visit https://groups.google.com/d/optout.