AUTH_USER_MODEL = 'authorization.CustomUser'
class CustomUser(AbstractUser):
email = models.EmailField(unique=True, blank=True)
Bio = models.CharField(max_length=1000)
Avatars = models.ImageField(upload_to=upload_to_server)
def __str__(self):
return self.username
from django.contrib import admin
from .models import CustomUser
admin.site.register(CustomUser)
<h2>Log In</h2>
<form method="post">
{% csrf_token %}
<p>{{ form }}</p>
<button type="submit">Log In</button>
</form>
class User(AbstractUser):
Bio = models.CharField(max_length=1000)
Avatars = models.ImageField(upload_to=upload_to_server)
def __str__(self):
return self.username
from config import settings
не работает?