mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 04:09:25 +08:00
Remove comments
This commit is contained in:
parent
c34876fb49
commit
5f4aac696e
1 changed files with 0 additions and 2 deletions
|
@ -19,7 +19,6 @@ class CustomUser(AbstractUser):
|
|||
null=True, upload_to='avatars/')
|
||||
|
||||
def avatar_url(self):
|
||||
# Assuming your media root is set to 'media/'
|
||||
return f'/api/v1/media/avatars/{self.avatar.name}'
|
||||
|
||||
@property
|
||||
|
@ -31,7 +30,6 @@ class CustomUser(AbstractUser):
|
|||
return reverse('admin:users_customuser_change', args=(self.pk,))
|
||||
|
||||
def get_prep_value(self, value):
|
||||
# Get the original filename without the random string
|
||||
original_filename = self.avatar.field.storage.name(self.avatar.path)
|
||||
return original_filename
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue