Skip to content

Commit 8a01f29

Browse files
committed
Enable Django admin for user profiles app
1 parent dc94b7b commit 8a01f29

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

profiles_api/admin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from django.contrib import admin
2+
from profiles_api import models
23

34
# Register your models here.
5+
admin.site.register(models.UserProfile)

profiles_api/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
3939
is_active = models.BooleanField(default=True)
4040
is_staff = models.BooleanField(default=False)
4141

42-
# Django need to have custom model manager for the models
42+
# Django need to have custom model manager for its models
4343
objects = UserProfileManager()
4444

45-
USERNAME_FIELD = 'email' # class unoque identifier
45+
USERNAME_FIELD = 'email' # class unique identifier
4646
REQUIRED_FIELDS = ['name']
4747

4848
def get_full_name():

0 commit comments

Comments
 (0)