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 @@
{% trans "Funder" %}
[[/if]] - [[else activity_type == 'start_work' || activity_type == 'worker_approved' || activity_type == 'bounty_abandonment_warning' ]] + [[else activity_type == 'start_work' || activity_type == 'worker_approved' || activity_type == 'bounty_abandonment_warning' || activity_type == 'worker_applied']]
[[:text]]
- [[if uninterest_possible]] + [[if can_approve_worker ]] +
+ + + {% trans "Reject worker" %} + + +
+
+ + + {% trans "Approve worker" %} + + +
+ [[else uninterest_possible]]
- Stop work + {% trans "Stop work" %}
@@ -284,35 +299,13 @@
{% trans "Funder" %}
- Stop work + Ding Rep + {% trans "Stop work + Ding Rep" %}
[[/if]] [[/if]]
- [[else activity_type == 'worker_applied']] -
-
- [[:text]] -
- [[if can_approve_worker ]] -
- - - Reject worker - - -
-
- - - Approve worker - - -
- [[/if]] -
[[else activity_type == 'worker_approved' ]]
@@ -334,13 +327,29 @@
{% trans "Funder" %}
[[else activity_type == 'work_submitted']] -
+
[[:text]] [[if fulfiller_github_url]] - [View Work] + [{% trans "View Work" %}] [[/if]]
+ [[if slash_possible]] + + + [[/if]]
[[else activity_type == 'increased_bounty']]
diff --git a/app/dataviz/d3_views.py b/app/dataviz/d3_views.py index b4769c92a59..e9e824c322f 100644 --- a/app/dataviz/d3_views.py +++ b/app/dataviz/d3_views.py @@ -143,9 +143,7 @@ def viz_chord(request, key='bounties_paid'): if request.GET.get('data'): rows = [['creditor', 'debtor', 'amount', 'risk']] network = 'mainnet' - for bounty in Bounty.objects.current().filter( - network=network, web3_type='bounties_network', idx_status='done' - ): + for bounty in Bounty.objects.current().filter(network=network, web3_type='bounties_network', idx_status='done'): weight = bounty.value_in_usdt_then if weight: for fulfillment in bounty.fulfillments.filter(accepted=True): diff --git a/app/dataviz/views.py b/app/dataviz/views.py index b8b4cb8b52d..b5c6ee87a32 100644 --- a/app/dataviz/views.py +++ b/app/dataviz/views.py @@ -273,8 +273,8 @@ def funnel(request): }, { 'title': 'web => bounties_posted => bounties_fulfilled (detail)', 'keys': [ - 'sessions', 'bounties_alltime', 'bounties_started_total', 'bounties_submitted_total', 'bounties_done_total', - 'bounties_expired_total', 'bounties_cancelled_total', + 'sessions', 'bounties_alltime', 'bounties_started_total', 'bounties_submitted_total', + 'bounties_done_total', 'bounties_expired_total', 'bounties_cancelled_total', ], 'data': [] }, { diff --git a/app/marketing/models.py b/app/marketing/models.py index 31917f695be..30ae58896d7 100644 --- a/app/marketing/models.py +++ b/app/marketing/models.py @@ -302,4 +302,3 @@ class EmailSupressionList(SuperModel): def __str__(self): return f"{self.email}" -