diff --git a/app/avatar/admin.py b/app/avatar/admin.py index 85640cf3352..0347cfb353b 100644 --- a/app/avatar/admin.py +++ b/app/avatar/admin.py @@ -44,8 +44,8 @@ class AvatarAdmin(GeneralAdmin): ordering = ['-id'] fields = [ - 'config', 'use_github_avatar', 'svg_asset', 'custom_png_asset', 'github_svg_asset', - 'png_asset', 'created_on', 'modified_on' + 'config', 'use_github_avatar', 'svg_asset', 'custom_png_asset', 'github_svg_asset', 'png_asset', 'created_on', + 'modified_on' ] readonly_fields = ['svg_asset', 'custom_png_asset', 'github_svg_asset', 'png_asset', 'created_on', 'modified_on'] inlines = [ProfileInline, ] diff --git a/app/avatar/models.py b/app/avatar/models.py index b6d9a28949f..0f44301cfb0 100644 --- a/app/avatar/models.py +++ b/app/avatar/models.py @@ -50,29 +50,17 @@ class Meta: config = JSONField(default=dict, help_text=_('The JSON configuration of the custom avatar.'), ) # Github Avatar github_svg = models.FileField( - upload_to=get_upload_filename, - null=True, - blank=True, - help_text=_('The Github avatar SVG.') + upload_to=get_upload_filename, null=True, blank=True, help_text=_('The Github avatar SVG.') ) png = models.ImageField( - upload_to=get_upload_filename, - null=True, - blank=True, - help_text=_('The Github avatar PNG.'), + upload_to=get_upload_filename, null=True, blank=True, help_text=_('The Github avatar PNG.'), ) # Custom Avatar custom_avatar_png = models.ImageField( - upload_to=get_upload_filename, - null=True, - blank=True, - help_text=_('The custom avatar PNG.'), + upload_to=get_upload_filename, null=True, blank=True, help_text=_('The custom avatar PNG.'), ) svg = models.FileField( - upload_to=get_upload_filename, - null=True, - blank=True, - help_text=_('The custom avatar SVG.'), + upload_to=get_upload_filename, null=True, blank=True, help_text=_('The custom avatar SVG.'), ) use_github_avatar = models.BooleanField(default=True) diff --git a/app/avatar/utils.py b/app/avatar/utils.py index cae81e1d987..33f1c4f0b6d 100644 --- a/app/avatar/utils.py +++ b/app/avatar/utils.py @@ -39,6 +39,7 @@ logger = logging.getLogger(__name__) + def get_avatar_context(): return { 'defaultSkinTone': 'AE7242', @@ -73,27 +74,28 @@ def get_avatar_context(): }, { 'name': 'Hair Style', 'title': 'Pick a hairstyle', - 'options': (['None', '0'], ['None', '1'], ['None', '2'], ['None', '3'], ['None', '4'], ['5', 'None'], - ['6-back', '6-front'], ['7-back', '7-front'], ['8-back', '8-front']) + 'options': (['None', '0'], ['None', '1'], ['None', '2'], ['None', '3'], ['None', '4'], + ['5', 'None'], ['6-back', '6-front'], ['7-back', '7-front'], ['8-back', '8-front']) }, { 'name': 'Facial Hair', 'title': 'Pick a facial hair style', 'options': ( - 'Mustache-0', 'Mustache-1', 'Mustache-2', 'Mustache-3', 'Beard-0', 'Beard-1', 'Beard-2', 'Beard-3' + 'Mustache-0', 'Mustache-1', 'Mustache-2', 'Mustache-3', 'Beard-0', 'Beard-1', 'Beard-2', + 'Beard-3' ) }, { 'name': 'Accessories', 'title': 'Pick your accessories', - 'options': (['Glasses-0'], ['Glasses-1'], ['Glasses-2'], ['Glasses-3'], ['Glasses-4'], [ - 'HatShort-backwardscap' - ], ['HatShort-ballcap'], ['HatShort-headphones'], ['HatShort-shortbeanie'], ['HatShort-tallbeanie'], - ['Earring-0'], ['Earring-1'], ['EarringBack-2', 'Earring-2'], ['Earring-3'], ['Earring-4']) + 'options': (['Glasses-0'], ['Glasses-1'], ['Glasses-2'], ['Glasses-3'], ['Glasses-4'], + ['HatShort-backwardscap'], ['HatShort-ballcap'], ['HatShort-headphones'], + ['HatShort-shortbeanie'], ['HatShort-tallbeanie'], ['Earring-0'], ['Earring-1'], + ['EarringBack-2', 'Earring-2'], ['Earring-3'], ['Earring-4']) }, { 'name': 'Background', 'title': 'Pick a background color', 'options': ( - '25E899', '9AB730', '00A55E', '3FCDFF', '3E00FF', '8E2ABE', 'D0021B', 'F9006C', 'FFCE08', 'F8E71C', - '15003E', 'FFFFFF' + '25E899', '9AB730', '00A55E', '3FCDFF', '3E00FF', '8E2ABE', 'D0021B', 'F9006C', 'FFCE08', + 'F8E71C', '15003E', 'FFFFFF' ) }], } diff --git a/app/dashboard/templates/bounty/details.html b/app/dashboard/templates/bounty/details.html index c7719f907c2..66d2ff220b8 100644 --- a/app/dashboard/templates/bounty/details.html +++ b/app/dashboard/templates/bounty/details.html @@ -267,16 +267,31 @@