From c59755eebe378fd2a85a6999577e212aac5bb729 Mon Sep 17 00:00:00 2001 From: Owocki Date: Thu, 21 Feb 2019 20:09:07 -0700 Subject: [PATCH 01/51] stopgap for https://github.com/gitcoinco/web/issues/3809 --- app/app/settings.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/app/settings.py b/app/app/settings.py index ac42f2b9a2d..ba3680e2afa 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -294,7 +294,7 @@ 'handlers': { 'console': { 'level': 'DEBUG', - 'class': 'logging.StreamHandler', + 'class': 'loggging.StreamHandler', 'formatter': 'verbose', }, 'watchtower': { @@ -336,19 +336,7 @@ LOGGING = {} if SENTRY_DSN: - if LOGGING: - LOGGING['handlers']['sentry'] = { - 'level': 'ERROR', # To capture more than ERROR, change to WARNING, INFO, etc. - 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', - } - LOGGING['loggers']['root']['handlers'].append('sentry'); - for logger in ['raven', 'sentry.errors']: - LOGGING['loggers'][logger] = { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, - } - else: + if ENV == 'prod': LOGGING = { 'version': 1, 'disable_existing_loggers': True, From 6fd8ddbdaaaa8b6c636b96ccd3deac6b163db62e Mon Sep 17 00:00:00 2001 From: Owocki Date: Thu, 21 Feb 2019 21:17:03 -0700 Subject: [PATCH 02/51] more avatar options --- app/assets/v2/images/avatar/Wallpaper/city.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/city2.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/flowers.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/mountains.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/mountains2.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/trees.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/trees2.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/trees3.svg | 10 ++++++++++ app/avatar/utils.py | 2 +- 9 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 app/assets/v2/images/avatar/Wallpaper/city.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/city2.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/flowers.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/mountains.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/mountains2.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/trees.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/trees2.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/trees3.svg diff --git a/app/assets/v2/images/avatar/Wallpaper/city.svg b/app/assets/v2/images/avatar/Wallpaper/city.svg new file mode 100644 index 00000000000..f313b299eb2 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/city.svg @@ -0,0 +1,10 @@ + + + + Untitled 7 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/city2.svg b/app/assets/v2/images/avatar/Wallpaper/city2.svg new file mode 100644 index 00000000000..5320749d070 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/city2.svg @@ -0,0 +1,10 @@ + + + + Untitled 5 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/flowers.svg b/app/assets/v2/images/avatar/Wallpaper/flowers.svg new file mode 100644 index 00000000000..4bf5e5342ba --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/flowers.svg @@ -0,0 +1,10 @@ + + + + beautiful-bloom-blooming-414160 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/mountains.svg b/app/assets/v2/images/avatar/Wallpaper/mountains.svg new file mode 100644 index 00000000000..e99da2e8c4f --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/mountains.svg @@ -0,0 +1,10 @@ + + + + adventure-alps-cold-1298533 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/mountains2.svg b/app/assets/v2/images/avatar/Wallpaper/mountains2.svg new file mode 100644 index 00000000000..be7c9bab1aa --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/mountains2.svg @@ -0,0 +1,10 @@ + + + + breathtaking-calm-color-36478 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/trees.svg b/app/assets/v2/images/avatar/Wallpaper/trees.svg new file mode 100644 index 00000000000..02c8d5d9d89 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/trees.svg @@ -0,0 +1,10 @@ + + + + Untitled 6 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/trees2.svg b/app/assets/v2/images/avatar/Wallpaper/trees2.svg new file mode 100644 index 00000000000..c8509a2b91e --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/trees2.svg @@ -0,0 +1,10 @@ + + + + fern-frond-green-1907054 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/trees3.svg b/app/assets/v2/images/avatar/Wallpaper/trees3.svg new file mode 100644 index 00000000000..2bcb2741be9 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/trees3.svg @@ -0,0 +1,10 @@ + + + + blurred-background-colors-daylight-1424108 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/avatar/utils.py b/app/avatar/utils.py index c03668fe383..a4386f6b82f 100644 --- a/app/avatar/utils.py +++ b/app/avatar/utils.py @@ -197,7 +197,7 @@ def get_avatar_context(): 'anchors', 'circuit', 'jigsaw', 'lines', 'gears', 'clouds', 'signal', 'polka_dots', 'polka_dots_black', 'squares', 'shapes', 'sunburst', 'sunburst_pastel', 'rainbow', 'portal', 'space', 'bokeh', 'bokeh2', 'bokeh3', 'bokeh4', 'bokeh5', - 'fire' + 'fire', 'trees', 'trees2', 'trees3', 'flowers', 'city', 'city2', 'mountains' ), 'paid_options': { 'sunburst_pastel': 0.01, From 4c78226d2858c9f3c5926bd35b4411b507d125fd Mon Sep 17 00:00:00 2001 From: Owocki Date: Thu, 21 Feb 2019 21:24:55 -0700 Subject: [PATCH 03/51] do not try to recreate avatar upon save --- app/avatar/admin.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/avatar/admin.py b/app/avatar/admin.py index b5747a2203b..c2e8c699068 100644 --- a/app/avatar/admin.py +++ b/app/avatar/admin.py @@ -73,11 +73,6 @@ class CustomAvatarAdmin(GeneralAdmin): list_display = ['svg_asset', 'created_on', '__str__'] raw_id_fields = ['profile'] - def save_model(self, request, obj, form, change): - custom_avatar = CustomAvatar.create(None, json.loads(request.POST.get('config'))) - custom_avatar.recommended_by_staff = request.POST.get('recommended_by_staff') == 'on' - custom_avatar.save() - admin.site.register(BaseAvatar, BaseAvatarAdmin) admin.site.register(CustomAvatar, CustomAvatarAdmin) From ee7a9c85dcbff591f1e0ef4958c6321d83d70770 Mon Sep 17 00:00:00 2001 From: Owocki Date: Thu, 21 Feb 2019 21:53:51 -0700 Subject: [PATCH 04/51] adds code avatar items --- app/assets/v2/images/avatar/Wallpaper/abstract.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/bokeh6.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/code.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/code2.svg | 10 ++++++++++ app/assets/v2/images/avatar/Wallpaper/code3.svg | 10 ++++++++++ app/avatar/utils.py | 5 +++-- 6 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 app/assets/v2/images/avatar/Wallpaper/abstract.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/bokeh6.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/code.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/code2.svg create mode 100644 app/assets/v2/images/avatar/Wallpaper/code3.svg diff --git a/app/assets/v2/images/avatar/Wallpaper/abstract.svg b/app/assets/v2/images/avatar/Wallpaper/abstract.svg new file mode 100644 index 00000000000..2744f1fcc31 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/abstract.svg @@ -0,0 +1,10 @@ + + + + abstract + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/bokeh6.svg b/app/assets/v2/images/avatar/Wallpaper/bokeh6.svg new file mode 100644 index 00000000000..9eb7dc446d3 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/bokeh6.svg @@ -0,0 +1,10 @@ + + + + bokeh4 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/code.svg b/app/assets/v2/images/avatar/Wallpaper/code.svg new file mode 100644 index 00000000000..319ebc66f3d --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/code.svg @@ -0,0 +1,10 @@ + + + + code + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/code2.svg b/app/assets/v2/images/avatar/Wallpaper/code2.svg new file mode 100644 index 00000000000..97853636e1b --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/code2.svg @@ -0,0 +1,10 @@ + + + + code2 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/avatar/Wallpaper/code3.svg b/app/assets/v2/images/avatar/Wallpaper/code3.svg new file mode 100644 index 00000000000..355668221c0 --- /dev/null +++ b/app/assets/v2/images/avatar/Wallpaper/code3.svg @@ -0,0 +1,10 @@ + + + + code3 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/app/avatar/utils.py b/app/avatar/utils.py index a4386f6b82f..248d777187e 100644 --- a/app/avatar/utils.py +++ b/app/avatar/utils.py @@ -194,10 +194,11 @@ def get_avatar_context(): 'name': 'Wallpaper', 'title': 'Pick some swag for your back', 'options': ( + 'portal', 'space', 'bokeh', 'bokeh2', 'bokeh3', 'bokeh4', 'bokeh5', + 'fire', 'trees', 'trees2', 'trees3', 'flowers', 'city', 'city2', 'mountains', + 'code', 'code2', 'code3', 'bokeh3', 'bokeh6', 'abstract', 'anchors', 'circuit', 'jigsaw', 'lines', 'gears', 'clouds', 'signal', 'polka_dots', 'polka_dots_black', 'squares', 'shapes', 'sunburst', 'sunburst_pastel', 'rainbow', - 'portal', 'space', 'bokeh', 'bokeh2', 'bokeh3', 'bokeh4', 'bokeh5', - 'fire', 'trees', 'trees2', 'trees3', 'flowers', 'city', 'city2', 'mountains' ), 'paid_options': { 'sunburst_pastel': 0.01, From 9a8162ad55b4e3132ecabe44349c00918acb71c7 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 08:37:54 -0700 Subject: [PATCH 05/51] new batch of kudi --- .../v2/images/kudos/ShowMeWhatYouGot.svg | 1 + app/assets/v2/images/kudos/logical_spock.svg | 215 ++++++++++++++ app/assets/v2/images/kudos/nyan.svg | 278 ++++++++++++++++++ app/kudos/kudos.yaml | 40 +++ 4 files changed, 534 insertions(+) create mode 100644 app/assets/v2/images/kudos/ShowMeWhatYouGot.svg create mode 100644 app/assets/v2/images/kudos/logical_spock.svg create mode 100644 app/assets/v2/images/kudos/nyan.svg diff --git a/app/assets/v2/images/kudos/ShowMeWhatYouGot.svg b/app/assets/v2/images/kudos/ShowMeWhatYouGot.svg new file mode 100644 index 00000000000..8e5e65cc28f --- /dev/null +++ b/app/assets/v2/images/kudos/ShowMeWhatYouGot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/kudos/logical_spock.svg b/app/assets/v2/images/kudos/logical_spock.svg new file mode 100644 index 00000000000..640c08c52e7 --- /dev/null +++ b/app/assets/v2/images/kudos/logical_spock.svg @@ -0,0 +1,215 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/kudos/nyan.svg b/app/assets/v2/images/kudos/nyan.svg new file mode 100644 index 00000000000..97086e6761f --- /dev/null +++ b/app/assets/v2/images/kudos/nyan.svg @@ -0,0 +1,278 @@ + + + + nyan + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/kudos/kudos.yaml b/app/kudos/kudos.yaml index 11b82a8c8ed..df501ee7915 100644 --- a/app/kudos/kudos.yaml +++ b/app/kudos/kudos.yaml @@ -3066,6 +3066,46 @@ - alchemy - code image: alchemist.svg +- name: logical_spock + to_address: 0xb9c4668CEf8B52b1A0751Dcf14605Cd90F8c9Fce + artist: mehul0698 + description: For those who have a very good logic in solving the problem/issue in hand. + priceFinney: 50 + numClonesAllowed: 100 + tags: + - programming + - lanugages + - c++ + - javascript + - python + - java + - php + - go + - ruby + - algorithms + - compliments + image: logical_spock.svg +- name: nyan_cat + to_address: 0x4b00a17a8A4c7dC2f71777207B1C1Bd6C132D394 + artist: cryptodesign + description: Everywhere you go, you leave a rainbow trail of great work behind you. + priceFinney: 4 + numClonesAllowed: 150 + tags: + - nyan + - cat + - rainbow + image: nyan.svg +- name: show_me_what_you_got + artist: emiwatanabe422 + description: You showed me what you got! + priceFinney: 20 + platform: gitcoin + numClonesAllowed: 500 + tags: + - just for fun + - meme + image: ShowMeWhatYouGot.svg From 3486d4201dda330a283f3edb5c84f363649f13a3 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 09:12:25 -0700 Subject: [PATCH 06/51] migrations fixes for grants --- .../migrations/0012_auto_20190222_1611.py | 28 +++++++++++++++++++ app/grants/models.py | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 app/grants/migrations/0012_auto_20190222_1611.py diff --git a/app/grants/migrations/0012_auto_20190222_1611.py b/app/grants/migrations/0012_auto_20190222_1611.py new file mode 100644 index 00000000000..8e84f58c391 --- /dev/null +++ b/app/grants/migrations/0012_auto_20190222_1611.py @@ -0,0 +1,28 @@ +# Generated by Django 2.1.2 on 2019-02-22 16:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('grants', '0011_auto_20190221_2050'), + ] + + operations = [ + migrations.AlterField( + model_name='grant', + name='clr_matching', + field=models.DecimalField(decimal_places=2, default=0, help_text='The CLR matching amount', max_digits=20), + ), + migrations.AlterField( + model_name='subscription', + name='contributor_signature', + field=models.CharField(blank=True, default='', help_text="The contributor's signature.", max_length=255), + ), + migrations.AlterField( + model_name='subscription', + name='subscription_hash', + field=models.CharField(blank=True, default='', help_text="The contributor's Subscription hash.", max_length=255), + ), + ] diff --git a/app/grants/models.py b/app/grants/models.py index 72fa54bee42..4fb70591ced 100644 --- a/app/grants/models.py +++ b/app/grants/models.py @@ -188,7 +188,7 @@ class Meta: 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=0, + decimal_places=2, max_digits=20, help_text=_('The CLR matching amount'), ) From 5155843ce70b074db57ad8ca4def345bba50ae9f Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 09:36:19 -0700 Subject: [PATCH 07/51] fix for https://gitcoincore.slack.com/archives/CBDTKB59A/p1550853225010000 --- app/grants/admin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/grants/admin.py b/app/grants/admin.py index 16c26d3f51f..acaab5cb773 100644 --- a/app/grants/admin.py +++ b/app/grants/admin.py @@ -66,9 +66,12 @@ def team_member_list(self, instance): return mark_safe(" , ".join(items)) def link(self, instance): - html = f"{instance.url}" + try: + html = f"{instance.url}" - return mark_safe(html) + return mark_safe(html) + except: + return "N/A" def logo_asset(self, instance): """Define the logo image tag to be displayed in the admin.""" From dec130469b6b0467a91508872eeb9ea0865659e9 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 10:39:11 -0700 Subject: [PATCH 08/51] stopgap for https://github.com/gitcoinco/web/issues/3812 --- app/assets/v2/js/grants/new.js | 9 +++++++-- app/grants/views.py | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/assets/v2/js/grants/new.js b/app/assets/v2/js/grants/new.js index a47229bce1c..f5a5b2e496f 100644 --- a/app/assets/v2/js/grants/new.js +++ b/app/assets/v2/js/grants/new.js @@ -21,11 +21,16 @@ function saveGrant(grantData, isFinal) { headers: {'X-CSRFToken': csrftoken}, success: json => { if (isFinal) { - document.suppress_loading_leave_code = true; - window.location = json.url; + if(json.url){ + document.suppress_loading_leave_code = true; + window.location = json.url; + } else { + console.error("Grant failed to save"); + } } }, error: () => { + console.error("Grant failed to save"); _alert({ message: gettext('Your grant failed to save. Please try again.') }, 'error'); } }); diff --git a/app/grants/views.py b/app/grants/views.py index 897e132d635..71ef16b5456 100644 --- a/app/grants/views.py +++ b/app/grants/views.py @@ -242,6 +242,13 @@ def grant_new(request): if 'contract_address' in request.POST: tx_hash = request.POST.get('transaction_hash', '') + if not tx_hash: + return JsonResponse({ + 'success': False, + 'info': 'no tx hash', + 'url': None, + }) + grant = Grant.objects.filter(deploy_tx_id=tx_hash).first() grant.contract_address = request.POST.get('contract_address', '') print(tx_hash, grant.contract_address) From 1e587d77eacbf4113f2e2ed4dfb1e13816c55ecb Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 10:41:44 -0700 Subject: [PATCH 09/51] make fix and readonly field list --- app/assets/v2/js/grants/fund.js | 4 ++-- app/assets/v2/js/grants/new.js | 6 +++--- app/avatar/utils.py | 7 +++---- app/grants/admin.py | 3 +-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/assets/v2/js/grants/fund.js b/app/assets/v2/js/grants/fund.js index 613a7f81743..aedd3d16066 100644 --- a/app/assets/v2/js/grants/fund.js +++ b/app/assets/v2/js/grants/fund.js @@ -84,8 +84,8 @@ $(document).ready(function() { deployedToken = new web3.eth.Contract(compiledToken.abi, data.denomination); $('#token_symbol').val($('#js-token option:selected').text()); } - if(!selected_token){ - _alert("Please select a token", 'error'); + if (!selected_token) { + _alert('Please select a token', 'error'); return; } diff --git a/app/assets/v2/js/grants/new.js b/app/assets/v2/js/grants/new.js index f5a5b2e496f..7638f843050 100644 --- a/app/assets/v2/js/grants/new.js +++ b/app/assets/v2/js/grants/new.js @@ -21,16 +21,16 @@ function saveGrant(grantData, isFinal) { headers: {'X-CSRFToken': csrftoken}, success: json => { if (isFinal) { - if(json.url){ + if (json.url) { document.suppress_loading_leave_code = true; window.location = json.url; } else { - console.error("Grant failed to save"); + console.error('Grant failed to save'); } } }, error: () => { - console.error("Grant failed to save"); + console.error('Grant failed to save'); _alert({ message: gettext('Your grant failed to save. Please try again.') }, 'error'); } }); diff --git a/app/avatar/utils.py b/app/avatar/utils.py index 248d777187e..5005175268c 100644 --- a/app/avatar/utils.py +++ b/app/avatar/utils.py @@ -194,10 +194,9 @@ def get_avatar_context(): 'name': 'Wallpaper', 'title': 'Pick some swag for your back', 'options': ( - 'portal', 'space', 'bokeh', 'bokeh2', 'bokeh3', 'bokeh4', 'bokeh5', - 'fire', 'trees', 'trees2', 'trees3', 'flowers', 'city', 'city2', 'mountains', - 'code', 'code2', 'code3', 'bokeh3', 'bokeh6', 'abstract', - 'anchors', 'circuit', 'jigsaw', 'lines', 'gears', 'clouds', 'signal', 'polka_dots', + 'portal', 'space', 'bokeh', 'bokeh2', 'bokeh3', 'bokeh4', 'bokeh5', 'fire', 'trees', 'trees2', + 'trees3', 'flowers', 'city', 'city2', 'mountains', 'code', 'code2', 'code3', 'bokeh3', 'bokeh6', + 'abstract', 'anchors', 'circuit', 'jigsaw', 'lines', 'gears', 'clouds', 'signal', 'polka_dots', 'polka_dots_black', 'squares', 'shapes', 'sunburst', 'sunburst_pastel', 'rainbow', ), 'paid_options': { diff --git a/app/grants/admin.py b/app/grants/admin.py index acaab5cb773..0ff8de26589 100644 --- a/app/grants/admin.py +++ b/app/grants/admin.py @@ -44,8 +44,7 @@ class GrantAdmin(GeneralAdmin): ] readonly_fields = [ 'logo_svg_asset', 'logo_asset', 'created_on', 'modified_on', 'token_address', 'contract_address', - 'deploy_tx_id', 'cancel_tx_id', 'token_symbol', - 'network', 'amount_goal', 'amount_received', 'team_member_list', + 'network', 'team_member_list', 'subscriptions_links', 'contributions_links', 'link', ] raw_id_fields = ['admin_profile'] From 2ca130feaa23f05b87a748c228b8b036c6382022 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 10:52:52 -0700 Subject: [PATCH 10/51] sort on gitcoin.co/grants --- app/grants/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/grants/views.py b/app/grants/views.py index 71ef16b5456..67e8c502c03 100644 --- a/app/grants/views.py +++ b/app/grants/views.py @@ -61,7 +61,7 @@ def grants(request): """Handle grants explorer.""" limit = request.GET.get('limit', 6) page = request.GET.get('page', 1) - sort = request.GET.get('sort_option', '-created_on') + sort = request.GET.get('sort_option', '-clr_matching') network = request.GET.get('network', 'mainnet') keyword = request.GET.get('keyword', '') state = request.GET.get('state', 'active') From 405c6b37ad0c9a188e54918e00aa5550c864634d Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 11:51:59 -0700 Subject: [PATCH 11/51] new roundUP --- app/retail/emails.py | 47 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/app/retail/emails.py b/app/retail/emails.py index d261be1363d..89dbca1831a 100644 --- a/app/retail/emails.py +++ b/app/retail/emails.py @@ -875,21 +875,23 @@ def render_start_work_applicant_expired(interest, bounty): # ROUNDUP_EMAIL def render_new_bounty_roundup(to_email): from dashboard.models import Bounty - subject = "Last Week of CLR Matching | Glen Weyl Joins Livestream" - new_kudos_pks = [1404, 1401, 1368] + subject = "$40K To OSS | Gitcoin's ETHDenver " + new_kudos_pks = [1839, 1838, 1837] new_kudos_size_px = 150 intro = '''

Hi Gitcoiners,

-This week marks the last week of our Radical Experiment for funding ETH 2.0 projects. -For one more week (until February 15th), we'll be matching any contributions you make to these 20 Ethereum projects with $25,000 in funding. -Because we are using Liberal Radicalism as the mechanism, small contributions (even $5!) can go a long way. +This week we announced the results of our Radical Experiment. +From 2/1 - 2/15, we matched $13K in contributions across 25 Ethereum projects with $25,000 in funding. +We used Liberal Radicalism matching as the mechanism, which made small contributions (less than $5!) go a long way. To learn more about the match, check out our interview with Glen Weyl, +who co-wrote the Liberal Radicalism paper.

-To continue the discussion, we're hosting Glen Weyl, author of Radical Markets, on the Gitcoin Livestream today. Join us at 5PM ET today -and add any questions you have to the Slido with code D842! +Aside from CLR, we're catching up from a fantastic weekend at ETHDenver. Gitcoin was involved via CLR, +Kudos (Trophies), the Burner Wallet, and of course - a massive Plinko Board. Read more here to learn +about what's likely to be the biggest crypto hackathon of 2019.

Happy Kudos Friday!

@@ -911,34 +913,34 @@ def render_new_bounty_roundup(to_email): ''' highlights = [{ - 'who': 'luiserebii', + 'who': 'charlie4biz', 'who_link': True, - 'what': 'Completed work on a Plasma bounty!', - 'link': 'https://gitcoin.co/issue/plasma-group/plasma-core/60/2266', + 'what': 'Worked with W3F on a PolkaDot post!', + 'link': 'https://gitcoin.co/issue/w3f/Web3-collaboration/63/2437', 'link_copy': 'View more', }, { - 'who': 'dbrettrobertson', + 'who': 'stevenjnpearce', 'who_link': True, - 'what': 'Helped with Core Dev call notes!', - 'link': 'https://gitcoin.co/issue/ethereum/pm/75/2242', + 'what': 'Created an Under Maintenance website for MyBitFoundation', + 'link': 'https://gitcoin.co/issue/MyBitFoundation/MyBit.website/72/2431', 'link_copy': 'View more', }, { - 'who': 'lazaridis-com', + 'who': 'eswarasai', 'who_link': True, - 'what': 'Completed work on a Goerli bounty.', - 'link': 'https://gitcoin.co/issue/goerli/parity-goerli/46/2210', + 'what': 'Compile Precise-Proofs to Web Assembly.', + 'link': 'https://gitcoin.co/issue/centrifuge/precise-proofs/63/2383', 'link_copy': 'View more', }, ] bounties_spec = [{ - 'url': 'https://github.com/trailofbits/manticore/issues/1343', - 'primer': 'Work with Trail of Bits on manticore!', + 'url': 'https://github.com/TrustWallet/wallet-core/issues/3', + 'primer': 'Add Cosmos support to TrustWallet!', }, { - 'url': 'https://github.com/dannovikov/crypto-lending/issues/1', - 'primer': 'Help build a Multi-Sig ETH Wallet.', + 'url': 'https://github.com/status-im/status-react/issues/7472', + 'primer': 'Continue work on Status-React with Hutch.', }, { - 'url': 'https://github.com/textileio/textile-explore/issues/1', - 'primer': 'Build a Flickr import/export tool.', + 'url': 'https://github.com/Giveth/giveth-dapp/issues/342', + 'primer': 'Work on Giveth milestones with Griff / Scott.', }, ] num_leadboard_items = 5 @@ -1003,7 +1005,6 @@ def render_new_bounty_roundup(to_email): return response_html, response_txt, subject - # DJANGO REQUESTS From 5b15591eed2970b3f4d2d379b835a1795ce3b217 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 14:44:25 -0700 Subject: [PATCH 12/51] cached view removal as it causes issues with logins showing up for wrong ppl --- app/dashboard/gas_views.py | 5 ----- app/grants/views.py | 1 - app/marketing/views.py | 1 - app/retail/views.py | 4 +--- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/dashboard/gas_views.py b/app/dashboard/gas_views.py index 3ce9eb34c48..e5ac834bf7f 100644 --- a/app/dashboard/gas_views.py +++ b/app/dashboard/gas_views.py @@ -47,7 +47,6 @@ } -@cached_view(timeout=60*16) def gas(request): _cts = conf_time_spread() recommended_gas_price = recommend_min_gas_price_to_confirm_in_time(confirm_time_minutes_target) @@ -78,7 +77,6 @@ def gas_intro(request): return TemplateResponse(request, 'gas_intro.html', context) -@cached_view(timeout=60*16) def gas_heatmap(request): gas_histories = {} mins = request.GET.get('mins', 60) @@ -118,7 +116,6 @@ def gas_faucet_list(request): return TemplateResponse(request, 'gas_faucet_list.html', context) -@cached_view(timeout=60*16) def gas_calculator(request): recommended_gas_price = recommend_min_gas_price_to_confirm_in_time(confirm_time_minutes_target) _cts = conf_time_spread() @@ -171,7 +168,6 @@ def gas_calculator(request): return TemplateResponse(request, 'gas_calculator.html', context) -@cached_view_as(GasGuzzler, timeout=60*3) def gas_guzzler_view(request): breakdown = request.GET.get('breakdown', 'hourly') breakdown_ui = breakdown.replace('ly', '') if breakdown != 'daily' else 'day' @@ -221,7 +217,6 @@ def gas_guzzler_view(request): return TemplateResponse(request, 'gas_guzzler.html', context) -@cached_view(timeout=60*16) def gas_history_view(request): breakdown = request.GET.get('breakdown', 'hourly') granularity_options = ['hourly', 'daily', 'weekly'] diff --git a/app/grants/views.py b/app/grants/views.py index 67e8c502c03..b5ee97e3f7a 100644 --- a/app/grants/views.py +++ b/app/grants/views.py @@ -557,7 +557,6 @@ def quickstart(request): return TemplateResponse(request, 'grants/quickstart.html', params) -@cached_view(timeout=60) def leaderboard(request): """Display leaderboard.""" params = { diff --git a/app/marketing/views.py b/app/marketing/views.py index 76f6facc503..3de750faef3 100644 --- a/app/marketing/views.py +++ b/app/marketing/views.py @@ -659,7 +659,6 @@ def _leaderboard(request): return leaderboard(request, '') -@cached_view(timeout=60*16) def leaderboard(request, key=''): """Display the leaderboard for top earning or paying profiles. diff --git a/app/retail/views.py b/app/retail/views.py index 87818c200ca..c7460b4a664 100644 --- a/app/retail/views.py +++ b/app/retail/views.py @@ -373,7 +373,6 @@ def funder_bounties(request): return TemplateResponse(request, 'bounties/funder.html', context) -@cached_view(timeout=60 * 10) def contributor_bounties(request, tech_stack): slides = [ @@ -880,10 +879,9 @@ def results(request, keyword=None): return TemplateResponse(request, 'results.html', context) -@cached_view_as(Activity.objects.all().order_by('-created')) def activity(request): """Render the Activity response.""" - page_size = 300 + page_size = 30 activities = Activity.objects.all().order_by('-created') p = Paginator(activities, page_size) page = request.GET.get('page', 1) From 4f8321c33b916dda79b0da381938f8f65e0c5a2b Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 14:50:26 -0700 Subject: [PATCH 13/51] fixes https://sentry.io/organizations/gitcoin/issues/903458022/?project=1398424&referrer=slack --- app/dashboard/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dashboard/views.py b/app/dashboard/views.py index 5e83b3fe400..27821ceae4c 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -448,7 +448,7 @@ def cancel_reason(request): is_funder = bounty.is_funder(user.username.lower()) if user else False if is_funder: - canceled_bounty_reason = request.POST.get('canceled_bounty_reason') + canceled_bounty_reason = request.POST.get('canceled_bounty_reason', '') bounty.canceled_bounty_reason = canceled_bounty_reason bounty.save() From 911f7c23f9e1970e4f71f2b93f9f40591daa0c57 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 14:50:52 -0700 Subject: [PATCH 14/51] fixes https://sentry.io/organizations/gitcoin/issues/903553824/?project=1398424&referrer=slack --- app/dashboard/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/dashboard/views.py b/app/dashboard/views.py index 27821ceae4c..f4e14561be4 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -496,6 +496,7 @@ def uninterested(request, bounty_id, profile_id): status=401) slashed = request.POST.get('slashed') + interest = None try: interest = Interest.objects.get(profile_id=profile_id, bounty=bounty) bounty.interested.remove(interest) From 52563c063523c69704672b60b63a29061db546a1 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 14:56:19 -0700 Subject: [PATCH 15/51] fix for https://sentry.io/organizations/gitcoin/issues/903731319/?project=1398424&referrer=slack --- app/dashboard/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dashboard/views.py b/app/dashboard/views.py index f4e14561be4..0cfdf4c1d37 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -1810,10 +1810,10 @@ def change_bounty(request, bounty_id): bounty_changed = False new_reservation = False for key in keys: - value = params.get(key, '') + value = params.get(key, 0) if key == 'featuring_date': value = timezone.make_aware( - timezone.datetime.fromtimestamp(value), + timezone.datetime.fromtimestamp(int(value)), timezone=UTC) old_value = getattr(bounty, key) if value != old_value: From 83c8ab81ca934cae8683a1735bc5666191a65c11 Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 15:00:58 -0700 Subject: [PATCH 16/51] fix for https://gitcoincore.slack.com/archives/CC24APWGN/p1550863626008800 --- app/dashboard/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/dashboard/views.py b/app/dashboard/views.py index 0cfdf4c1d37..ab4372a8862 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -1851,6 +1851,7 @@ def change_bounty(request, bounty_id): result = {} for key in keys: result[key] = getattr(bounty, key) + del result['featuring_date'] params = { 'title': _('Change Bounty Details'), From afca7b378e3be291f8e4974cc3b91ff34c608cec Mon Sep 17 00:00:00 2001 From: Owocki Date: Fri, 22 Feb 2019 15:14:58 -0700 Subject: [PATCH 17/51] suppress non gitcoiners on grants lookups --- app/assets/v2/js/grants/detail.js | 4 ++-- app/assets/v2/js/grants/new.js | 2 +- app/assets/v2/js/user-search.js | 8 ++++++-- app/dashboard/views.py | 5 +++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/assets/v2/js/grants/detail.js b/app/assets/v2/js/grants/detail.js index 22af64e5316..03f4fdaf90c 100644 --- a/app/assets/v2/js/grants/detail.js +++ b/app/assets/v2/js/grants/detail.js @@ -21,8 +21,8 @@ $(document).ready(function() { ); }, 1000); - userSearch('#grant-admin'); - userSearch('#grant-members'); + userSearch('#grant-admin', false, undefined, false, false, true); + userSearch('#grant-members', false, undefined, false, false, true); $('.select2-selection__rendered').removeAttr('title'); $('#form--input__description').height($('#form--input__description').prop('scrollHeight')); $('#form--input__title').height($('#form--input__title').prop('scrollHeight')); diff --git a/app/assets/v2/js/grants/new.js b/app/assets/v2/js/grants/new.js index 7638f843050..a133a6f9455 100644 --- a/app/assets/v2/js/grants/new.js +++ b/app/assets/v2/js/grants/new.js @@ -57,7 +57,7 @@ const init = () => { $('#js-token').append("