Hi

Models always do belong to app. All apps do have AppConfig (one or more)

So when adding app (and thus models) to INSTALLED_APPS you need to point to
which AppConfig you use (defined in apps.py)


to 4. heinäk. 2019 klo 11.58 pastrufazio <pastrufa...@gmail.com> kirjoitti:

> Hi!
>
> I've read some examples about custom User Model. In all of them, it's
> suggested implement the class AbtractUser (in this case the app is called
> *users*)
>
> For instance, in this example
> https://wsvincent.com/django-custom-user-model-tutorial/ they do
>
>
>  users/models.pyfrom django.contrib.auth.models import AbstractUserfrom 
> django.db import models
> class CustomUser(AbstractUser):
>
>
>
> but then they say to include *users.apps.UserConfig*. Why? Where does it
> come from? Why not  the class *users.apps.CustomUser* ?
>
>
>
> # djauth/settings.pyINSTALLED_APPS = [
>
> ...
>
> 'users.apps.UsersConfig', ]
>
>
>
> Thank you very much
>
>
>
> --
> 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/5bcb0c0a-c83f-4a67-97a7-325ef6ecc87b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5bcb0c0a-c83f-4a67-97a7-325ef6ecc87b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CAHn91oem_UNNqrvPFiYOS6zn1tJjU9wVmCk5T%2B0wdnHaEFVCGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to