diff options
| author | Bobby <[email protected]> | 2022-07-29 23:01:55 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-07-29 23:01:55 +0530 |
| commit | b14dc2abc25e59e66237fef8d9c2b55ad9592dcf (patch) | |
| tree | 0ca5d60d97970ae143fc7221cfeb2020b60ed758 /users/models.py | |
| parent | 88057646dbd4876e0658e2e1ee35756c73db607a (diff) | |
| download | thatcomputerscientist-b14dc2abc25e59e66237fef8d9c2b55ad9592dcf.tar.xz thatcomputerscientist-b14dc2abc25e59e66237fef8d9c2b55ad9592dcf.zip | |
Account Page with Fetched Information from the database
Diffstat (limited to 'users/models.py')
| -rw-r--r-- | users/models.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/users/models.py b/users/models.py index 71a83623..b67b1274 100644 --- a/users/models.py +++ b/users/models.py @@ -1,3 +1,18 @@ +from django.conf import settings from django.db import models -# Create your models here. +# User Profile Model +class UserProfile(models.Model): + user = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.CASCADE, + ) + location = models.CharField(max_length=50, blank=True) + bio = models.TextField(blank=True) + gravatar_email = models.EmailField(blank=True) + is_public = models.BooleanField(default=False) + email_public = models.BooleanField(default=False) + + def __str__(self): + return self.user.username + |
