Skip to content

acuglar/musicfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

musicfy 006_custom-user

Authentication
Permissions

extendendo comportamento de User

rel 1:1 com User na classe Artist (idealmente no início do projeto)

Redefinindo User padrão:

# app.settings
AUTH_USER_MODEL = 'accounts.CustomUser''

# redefinir User para CustomUser nas views
# VER dbeaver

mudando definições de user no meio do proejeto

  • solução gosseira: deletar database e refazer migrations, ou;
  1. deletar dados django_migrations
  2. $ ./manage.py migrate --fake
  3. $ ./manage.py makemigrations
  4. $ ./manage.py migrate

https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages