Re: Choice fields not validated while saving to database

2016-05-30 Thread Vinayak Kaniyarakkal
//docs.djangoproject.com/en/1.9/ref/models/instances/#validating-objects> > If we put unique=True, django validate that the field doesn't repeat. If we don't put null=True, django validate that the field is filled. So isn't it good to validate that the value is one

Choice fields not validated while saving to database

2016-05-30 Thread Vinayak Kaniyarakkal
The following code is "failing silently" > class MyModel(models.Model): > CHOICES = ((0, 'Inactive'), (1, 'Active'),) > my_field = models.PositiveIntegerField(choices=ACTIVE_CHOICES, > default=2) > > obj = MyModel.objects.all()[0] > obj.my_field=100 > obj.save() Should I raise a bug i

Re: Instructions from Django to run under Python don't work.

2015-01-18 Thread Vinayak Kaniyarakkal
On Sunday, 18 January 2015 07:53:25 UTC+5:30, Lisa Jennings wrote: > > I have been trying for two days to install django with Python 3.4 > operating in windows 7. Everything I try according to your instructions, > fails. > > The command "import django" seems to work > That means django is

Re: ChoiceInline field giving name error

2015-01-14 Thread Vinayak Kaniyarakkal
On Wednesday, 14 January 2015 18:33:59 UTC+5:30, sanjeet kaur wrote: > > Hi, > I am working on django ap in which I have two apps in a single project > but while using inline option, I get the error > > NameError: name 'ChoiceInline' is not defined > > I have searched this error and all sa