Add Last.fm importing
This commit is contained in:
@ -5,7 +5,10 @@ from django.db import models
|
||||
from django_extensions.db.models import TimeStampedModel
|
||||
from profiles.constants import PRETTY_TIMEZONE_CHOICES
|
||||
|
||||
from encrypted_field import EncryptedField
|
||||
|
||||
User = get_user_model()
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
class UserProfile(TimeStampedModel):
|
||||
@ -15,6 +18,8 @@ class UserProfile(TimeStampedModel):
|
||||
timezone = models.CharField(
|
||||
max_length=255, choices=PRETTY_TIMEZONE_CHOICES
|
||||
)
|
||||
lastfm_username = models.CharField(max_length=255, **BNULL)
|
||||
lastfm_password = EncryptedField(**BNULL)
|
||||
|
||||
def __str__(self):
|
||||
return f"User profile for {self.user}"
|
||||
|
||||
Reference in New Issue
Block a user