Unverified Commit a1ee738b authored by Thom Wiggers's avatar Thom Wiggers

Merge remote-tracking branch 'origin/fix/profile-image-save-location' into fix-thumnailer-collision

parents 1935743f 7d6db1c4
...@@ -191,6 +191,10 @@ class Member(User): ...@@ -191,6 +191,10 @@ class Member(User):
return reverse('members:profile', args=[str(self.pk)]) return reverse('members:profile', args=[str(self.pk)])
def _profile_image_path(instance, filename):
return f'public/avatars/{instance.pk}'
class Profile(models.Model): class Profile(models.Model):
"""This class holds extra information about a member""" """This class holds extra information about a member"""
...@@ -365,7 +369,7 @@ class Profile(models.Model): ...@@ -365,7 +369,7 @@ class Profile(models.Model):
photo = models.ImageField( photo = models.ImageField(
verbose_name=_('Photo'), verbose_name=_('Photo'),
upload_to='public/avatars/', upload_to=_profile_image_path,
null=True, null=True,
blank=True, blank=True,
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment