diff --git a/app/app/fixtures/grants.json b/app/app/fixtures/grants.json index 73a3c604850..57b9f7bb9e0 100644 --- a/app/app/fixtures/grants.json +++ b/app/app/fixtures/grants.json @@ -28,7 +28,6 @@ "required_gas_price": "0", "admin_profile": 17, "image_css": "", - "clr_matching": "0.00", "activeSubscriptions": "[]", "hidden": false, "team_members": [33] @@ -63,7 +62,6 @@ "required_gas_price": "0", "admin_profile": 33, "image_css": "", - "clr_matching": "0.00", "activeSubscriptions": "[]", "hidden": false, "team_members": [33] @@ -98,7 +96,6 @@ "required_gas_price": "0", "admin_profile": 33, "image_css": "", - "clr_matching": "0.00", "activeSubscriptions": "[]", "hidden": false, "team_members": [33] diff --git a/app/dashboard/templates/dashboard/hackathon/hackathons.html b/app/dashboard/templates/dashboard/hackathon/hackathons.html index 057f735bcf1..4aefaf1a005 100644 --- a/app/dashboard/templates/dashboard/hackathon/hackathons.html +++ b/app/dashboard/templates/dashboard/hackathon/hackathons.html @@ -155,12 +155,14 @@

{{ event.summary }}

-
- Sponsored by - {% for sponsor in event.sponsor_profiles %} - - {% endfor %} -
+ {% if event.sponsor_profiles %} +
+ Sponsored by + {% for sponsor in event.sponsor_profiles %} + + {% endfor %} +
+ {% endif %}
{% if event.end_date|timesince_fromisoformat <= "1 min" %} diff --git a/app/grants/admin.py b/app/grants/admin.py index 13ec451850d..a3cd8788941 100644 --- a/app/grants/admin.py +++ b/app/grants/admin.py @@ -93,7 +93,7 @@ class GrantAdmin(GeneralAdmin): 'token_address', 'contract_address', 'contract_version', 'network', 'required_gas_price', 'logo_svg_asset', 'logo_asset', 'created_on', 'modified_on', 'team_member_list', 'subscriptions_links', 'contributions_links', 'logo', 'logo_svg', 'image_css', - 'link', 'clr_matching', 'clr_prediction_curve', 'hidden', 'grant_type', 'next_clr_calc_date', 'last_clr_calc_date', + 'link', 'clr_prediction_curve', 'hidden', 'grant_type', 'next_clr_calc_date', 'last_clr_calc_date', 'metadata', 'categories', 'twitter_handle_1', 'twitter_handle_2', 'view_count', 'is_clr_eligible', 'in_active_clrs' ] readonly_fields = [ diff --git a/app/grants/migrations/0073_remove_grant_clr_matching.py b/app/grants/migrations/0073_remove_grant_clr_matching.py new file mode 100644 index 00000000000..422b7d82c50 --- /dev/null +++ b/app/grants/migrations/0073_remove_grant_clr_matching.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.4 on 2020-08-27 11:17 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('grants', '0072_grant_in_active_clrs'), + ] + + operations = [ + migrations.RemoveField( + model_name='grant', + name='clr_matching', + ), + ] diff --git a/app/grants/models.py b/app/grants/models.py index fa99663d02e..5a1fb359b12 100644 --- a/app/grants/models.py +++ b/app/grants/models.py @@ -284,12 +284,6 @@ class Meta: help_text=_('The team members contributing to this Grant.'), ) image_css = models.CharField(default='', blank=True, max_length=255, help_text=_('additional CSS to attach to the grant-banner img.')) - clr_matching = models.DecimalField( - default=0, - decimal_places=2, - max_digits=20, - help_text=_('The TOTAL CLR matching amount across all rounds'), - ) amount_received_with_phantom_funds = models.DecimalField( default=0, decimal_places=2, diff --git a/app/grants/templates/grants/card/clr_estimate_prev.html b/app/grants/templates/grants/card/clr_estimate_prev.html deleted file mode 100644 index 5daf4e95984..00000000000 --- a/app/grants/templates/grants/card/clr_estimate_prev.html +++ /dev/null @@ -1,10 +0,0 @@ -{% load i18n static humanize grants_extra %} -{% if grant.clr_matching %} -
-

- inc {{ grant.clr_matching|floatformat:0 }} DAI (CLR 1 / 2) -

-
-{% else %} -
-{% endif %} diff --git a/app/grants/templates/grants/card/clr_match.html b/app/grants/templates/grants/card/clr_match.html index 2b6cf554059..069189fb26c 100644 --- a/app/grants/templates/grants/card/clr_match.html +++ b/app/grants/templates/grants/card/clr_match.html @@ -1,7 +1,7 @@ {% load i18n static humanize grants_extra %}
-

+

{{round_num}} MATCH ROUND

diff --git a/app/grants/templates/grants/card/front.html b/app/grants/templates/grants/card/front.html index ef681358ad9..1d427826ee9 100644 --- a/app/grants/templates/grants/card/front.html +++ b/app/grants/templates/grants/card/front.html @@ -97,9 +97,9 @@

{% else %}

- {{ grant.monthly_amount_subscribed|floatformat:0|intcomma }} DAI + {{ grant.amount_received|floatformat:0|intcomma }} DAI

-

MONTHLY RECURRING

+

All Time Funding

{% endif %}
diff --git a/app/grants/templates/grants/detail/funding.html b/app/grants/templates/grants/detail/funding.html index d736d38ebcf..232d3fefa46 100644 --- a/app/grants/templates/grants/detail/funding.html +++ b/app/grants/templates/grants/detail/funding.html @@ -21,28 +21,22 @@
-
- {% if grant.is_clr_eligible and round_num %} + {% if grant.is_clr_eligible and round_num %} +
{% include 'grants/card/clr_match.html' %} - {% else %} -

MONTHLY RECURRING

-

- {{ grant.monthly_amount_subscribed|floatformat:0|intcomma }} DAI -

- {% endif %} -
+
+ {% endif %}

- ROUND {{ clr_round }} + ALL TIME FUNDING +

+

+ {{grant.amount_received|floatformat:0|intcomma}} DAI +

+

+ {{grant.contributor_count}} CONTRIBUTORS

-

- - {{grant.amount_received_in_round|floatformat:0|intcomma}} DAI - -
- {{grant.positive_round_contributor_count}} contributors -

diff --git a/app/grants/views.py b/app/grants/views.py index 605280bcd7d..40f784eff1b 100644 --- a/app/grants/views.py +++ b/app/grants/views.py @@ -389,7 +389,7 @@ def grants_by_grant_type(request, grant_type): grant.clr_round_num = clr_round.round_num else: grant.is_clr_active = False - grant.clr_round_num = 'LAST' if grant.clr_matching > 0 else None + grant.clr_round_num = 'LAST' # populate active round info @@ -649,7 +649,7 @@ def grant_details(request, grant_id, grant_slug): clr_round_num = clr_round.round_num else: is_clr_active = False - clr_round_num = 'LAST' if grant.clr_matching > 0 else None + clr_round_num = 'LAST' is_clr_active = True if clr_round else False title = grant.title + " | Grants" diff --git a/scripts/debug/update_grant_clr_amounts.py b/scripts/debug/update_grant_clr_amounts.py deleted file mode 100644 index dd2d430c66c..00000000000 --- a/scripts/debug/update_grant_clr_amounts.py +++ /dev/null @@ -1,12 +0,0 @@ -from grants.models import Grant - -eles = 'Prysm by Prysmatic Labs $4,306.03','MolochDAO $2,839.74','Uniswap $2,121.57','Cryptoeconomics.study - Free, Open-Source Blockchain Course $2,071.84','Lodestar (eth2.0 client) $1,702.61','ZoKrates $1,604.32','Plasma Group $1,572.80','Lighthouse: Ethereum 2.0 Client $1,460.16','EthHub - Ethereum Information Hub $1,407.90','ethers.js - Complete, Simple and Tiny $1,357.51','The Gitcoin Open Source Support Fund $999.87','Burner Wallet $984.69','Connext Network $738.26','Implement support for asyncio using Web3.py $542.66','Zero Knowledge Podcast $374.30','Gossipsub and Eth 2 / Shasper Development $344.54','ETH2.0 Implementers Call Notes $202.83','Yeeth $145.38','FISSION Codes $85.66','Vipnode $83.44','Whiteblock Testing $22.94','Ethereum All Core Devs community project management $17.11','Peepeth: social network for a better world $6.73','GrantOps $6.42','EVM Evolution $0.64','ChainID Network $0.06' -for ele in eles: - arr = ele.split('$') - title = arr[0].strip() - amount = float(arr[1].replace(",", '').strip()) - - grant = Grant.objects.filter(title=title, active=True).first() - print(title,grant.pk, amount) - grant.clr_matching = amount - grant.save()