Re: Charfield variable length

2019-01-25 Thread C. Kirby
https://docs.djangoproject.com/en/2.1/ref/models/fields/#binaryfield -- 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.

Re: Charfield variable length

2019-01-24 Thread 'Odile Lambert' via Django users
Hello thank you very much for your answer. Your answer about the chafield max length is clear. I do not know how to clarify my use case because it is very special : the binary codes (there are 4) in the database will be used to set pushers on a knitting machine!.

Re: Charfield variable length

2019-01-23 Thread Anirudh Jain
If you are sure that values entered will only be 0s and 1s then why not use IntegerField(). But if really want to use CharField() and you know that size won't be larger than 180bits then use CharField(max_lenght=25) On Thu, 24 Jan 2019, 06:23 Mike Dewhirst On 24/01/2019 9:14 am, 'Odile Lambert' v

Re: Charfield variable length

2019-01-23 Thread Mike Dewhirst
On 24/01/2019 9:14 am, 'Odile Lambert' via Django users wrote: Hello I have problems with the Charfield max_length. In the source code, the possibility exists to have max_length = None but it does not pass Django check when  models.py. contains a charfield = None I can understand that there

Charfield variable length

2019-01-23 Thread 'Odile Lambert' via Django users
Hello I have problems with the Charfield max_length. In the source code, the possibility exists to have max_length = None but it does not pass Django check when  models.py. contains a charfield = None I can understand that there is a need for such a max_length fo