Short answer: because you'll know when you need it. And unless that's the
case - there's no good reason to do it.
Long answer:
Because there's really no reason to do it except for when you have unique
constraint on that column. It's just a convention. When you have a
`CharField`, you expect retur
Looks like you have a typo somewhere.
Exception says that it can't find a module `polss` while it should be
`polls`. Check your settings and imports
On Mon, Apr 30, 2018 at 11:29 PM Avitab Ayan Sarmah
wrote:
> The code I am using for the models is:
>
> from django.db import models
>
> class Que
File "/raid3/build/comprosloco/oil/models.py", line 172, in __str__
self.accepted
What is inside this __str__ method? `self.accepted` field name sounds like it
could be a date. Return type of __str__ must be a string.
--
You received this message because you are subscribed to the Google G
If the data is not important, try to delete migration files from `migrations`
package, drop the database tables and reference M2M relationship using strings:
tags = models.ManyToManyField('Tag')
Or if the Tag model is in another app:
tags = models.ManyToManyField('app_name.Tag')
Then run `make
If the data is not important, try to delete migration files from
`migrations` package, drop the database tables and reference M2M
relationship using strings like so:
tags = models.ManyToManyField(`Tag`)
Or if the Tag model is in another app, like so:
tags = models.ManyToManyField(`app_name.Tag`)
Django permissions are only enforced in Admin interface by default. You
have to enforce them in your views by using `has_perm` method of `user`
instance - `user.has_perm('.')`
Here's the documentation for permissions
-
https://docs.djangoproject.com/en/dev/topics/auth/default/#permissions-and-
Changes in 2.0 that are backwards incompatible are mostly low-level things. As
a beginner, you won't have to deal with them for some time. So you can grab any
book that is relevant for 1.11 and you'll be fine.
I would actually advise to start your training project using Django 1.11
instead of 2
7 matches
Mail list logo