//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
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
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
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
4 matches
Mail list logo