From 212c45aedce9b4c2c3ee8c31bb2afdec78647d4d Mon Sep 17 00:00:00 2001 From: Tim Schultz Date: Wed, 16 Feb 2022 22:22:20 -0700 Subject: [PATCH] 9987 kill quadratic lands w migrations (#10137) * added redirect to decentralized app * deleted app files and created migration * keep local.env * removed QD trust score * removed player field from trust calculation * update migration to use original field * reverted updates to model * chore: address feedback comments Co-authored-by: Tim Schultz Co-authored-by: Aditya Anand M C --- app/app/urls.py | 7 +- app/app/views.py | 4 + app/assets/v2/js/pages/profile-trust.js | 70 - app/dashboard/tasks.py | 6 - .../templates/profiles/trust-vue.html | 7 - app/dashboard/views.py | 13 - app/quadraticlands/admin.py | 60 - app/quadraticlands/apps.py | 5 - app/quadraticlands/forms.py | 1 - app/quadraticlands/helpers.py | 275 ---- .../migrations/0010_auto_20220209_1850.py | 76 ++ app/quadraticlands/models.py | 459 ------- app/quadraticlands/router.py | 39 - app/quadraticlands/scripts/ingest_coupons.py | 36 - app/quadraticlands/scripts/ingest_faq.py | 101 -- app/quadraticlands/scripts/ingest_stewards.py | 55 - app/quadraticlands/scripts/intial_dist.py | 41 - app/quadraticlands/scripts/stewards.csv | 40 - app/quadraticlands/serializer.py | 15 - .../quadraticlands/_inlinesvg/arrow.svg | 3 - .../quadraticlands/_inlinesvg/arrow_down.svg | 1 - .../quadraticlands/_inlinesvg/arrow_up.svg | 1 - .../quadraticlands/_inlinesvg/burger.svg | 2 - .../quadraticlands/_inlinesvg/close.svg | 1 - .../quadraticlands/_inlinesvg/disconnect.svg | 1 - .../quadraticlands/_inlinesvg/done.svg | 3 - .../_inlinesvg/footersocial/discord.svg | 1 - .../_inlinesvg/footersocial/email.svg | 1 - .../_inlinesvg/footersocial/facebook.svg | 1 - .../_inlinesvg/footersocial/github.svg | 1 - .../_inlinesvg/footersocial/twitter.svg | 1 - .../_inlinesvg/footersocial/youtube.svg | 1 - .../quadraticlands/_inlinesvg/gtctoken.svg | 4 - .../quadraticlands/_inlinesvg/hero-about.svg | 205 --- .../_inlinesvg/hero-diplomacy.svg | 86 -- .../_inlinesvg/hero-workstream.svg | 94 -- .../quadraticlands/_inlinesvg/hero_town.svg | 1171 ----------------- .../quadraticlands/_inlinesvg/logo_arrow.svg | 3 - .../_inlinesvg/logo_gitcoin.svg | 4 - .../quadraticlands/_inlinesvg/ql.svg | 50 - .../quadraticlands/_inlinesvg/rhombus.svg | 3 - .../quadraticlands/_inlinesvg/spinner.svg | 8 - .../quadraticlands/_inlinesvg/town.svg | 927 ------------- .../quadraticlands/_inlinesvg/wallet.svg | 1 - .../templates/quadraticlands/about.html | 209 --- .../quadraticlands/components/base.html | 77 -- .../quadraticlands/components/cookielaw.html | 16 - .../components/flashmessage.html | 1 - .../quadraticlands/components/footer.html | 11 - .../components/footer_scripts.html | 85 -- .../components/footersocial.html | 42 - .../quadraticlands/components/fullscreen.html | 8 - .../quadraticlands/components/head.html | 109 -- .../quadraticlands/components/nav.html | 92 -- .../components/wallet-provider.html | 79 -- .../quadraticlands/dashboard/governance.html | 96 -- .../quadraticlands/dashboard/index.html | 41 - .../quadraticlands/dashboard/mission.html | 85 -- .../dashboard/mission_item.html | 27 - .../quadraticlands/dashboard/proposals.html | 49 - .../quadraticlands/dashboard/wallet.html | 38 - .../templates/quadraticlands/error.html | 31 - .../templates/quadraticlands/faq.html | 42 - .../templates/quadraticlands/index.html | 147 --- .../quadraticlands/mission/card.html | 47 - .../mission/diplomacy/index.html | 138 -- .../mission/diplomacy/room.html | 293 ----- .../quadraticlands/mission/index.html | 124 -- .../quadraticlands/mission/lore/index.html | 101 -- .../mission/postcard/postcard.html | 150 --- .../quadraticlands/mission/schwag/index.html | 86 -- .../templates/quadraticlands/stewards.html | 98 -- .../workstream/decentralization.html | 58 - .../quadraticlands/workstream/index.html | 157 --- .../quadraticlands/workstream/labs.html | 57 - .../quadraticlands/workstream/nav.html | 31 - .../workstream/publicgoods.html | 64 - .../quadraticlands/workstream/sybil.html | 57 - app/quadraticlands/tests.py | 3 - app/quadraticlands/urls.py | 72 - app/quadraticlands/views.py | 408 ------ 81 files changed, 84 insertions(+), 7029 deletions(-) create mode 100644 app/app/views.py delete mode 100644 app/quadraticlands/admin.py delete mode 100644 app/quadraticlands/apps.py delete mode 100644 app/quadraticlands/forms.py delete mode 100644 app/quadraticlands/helpers.py create mode 100644 app/quadraticlands/migrations/0010_auto_20220209_1850.py delete mode 100644 app/quadraticlands/router.py delete mode 100644 app/quadraticlands/scripts/ingest_coupons.py delete mode 100644 app/quadraticlands/scripts/ingest_faq.py delete mode 100644 app/quadraticlands/scripts/ingest_stewards.py delete mode 100644 app/quadraticlands/scripts/intial_dist.py delete mode 100644 app/quadraticlands/scripts/stewards.csv delete mode 100644 app/quadraticlands/serializer.py delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/arrow.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/arrow_down.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/arrow_up.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/burger.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/close.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/disconnect.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/done.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/footersocial/discord.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/footersocial/email.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/footersocial/facebook.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/footersocial/github.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/footersocial/twitter.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/footersocial/youtube.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/gtctoken.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/hero-about.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/hero-diplomacy.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/hero-workstream.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/hero_town.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/logo_arrow.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/logo_gitcoin.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/ql.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/rhombus.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/spinner.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/town.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/_inlinesvg/wallet.svg delete mode 100644 app/quadraticlands/templates/quadraticlands/about.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/base.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/cookielaw.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/flashmessage.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/footer.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/footer_scripts.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/footersocial.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/fullscreen.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/head.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/nav.html delete mode 100644 app/quadraticlands/templates/quadraticlands/components/wallet-provider.html delete mode 100644 app/quadraticlands/templates/quadraticlands/dashboard/governance.html delete mode 100644 app/quadraticlands/templates/quadraticlands/dashboard/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/dashboard/mission.html delete mode 100644 app/quadraticlands/templates/quadraticlands/dashboard/mission_item.html delete mode 100644 app/quadraticlands/templates/quadraticlands/dashboard/proposals.html delete mode 100644 app/quadraticlands/templates/quadraticlands/dashboard/wallet.html delete mode 100644 app/quadraticlands/templates/quadraticlands/error.html delete mode 100644 app/quadraticlands/templates/quadraticlands/faq.html delete mode 100644 app/quadraticlands/templates/quadraticlands/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/card.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/diplomacy/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/diplomacy/room.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/lore/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/postcard/postcard.html delete mode 100644 app/quadraticlands/templates/quadraticlands/mission/schwag/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/stewards.html delete mode 100644 app/quadraticlands/templates/quadraticlands/workstream/decentralization.html delete mode 100644 app/quadraticlands/templates/quadraticlands/workstream/index.html delete mode 100644 app/quadraticlands/templates/quadraticlands/workstream/labs.html delete mode 100644 app/quadraticlands/templates/quadraticlands/workstream/nav.html delete mode 100644 app/quadraticlands/templates/quadraticlands/workstream/publicgoods.html delete mode 100644 app/quadraticlands/templates/quadraticlands/workstream/sybil.html delete mode 100644 app/quadraticlands/tests.py delete mode 100644 app/quadraticlands/urls.py delete mode 100644 app/quadraticlands/views.py diff --git a/app/app/urls.py b/app/app/urls.py index 75406531758..6a679001c29 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -57,6 +57,7 @@ from kudos.router import router as kdrouter from .sitemaps import sitemaps +from .views import redirect_view urlpatterns = [ @@ -770,9 +771,9 @@ url(r'^blocknative', perftools.views.blocknative, name='blocknative'), # quadratic lands - path('quadraticlands/', include('quadraticlands.urls', namespace='quadraticlands')), - re_path(r'^quadraticlands/?', include('quadraticlands.urls', namespace='ql_catchall_')), - re_path(r'^quadraticland/?', include('quadraticlands.urls', namespace='ql_catchall')), + path('quadraticlands/', redirect_view), + re_path(r'^quadraticlands/?', redirect_view), + re_path(r'^quadraticland/?', redirect_view), # for robots url(r'^robots.txt/?', retail.views.robotstxt, name='robotstxt'), diff --git a/app/app/views.py b/app/app/views.py new file mode 100644 index 00000000000..f0b6c8d85be --- /dev/null +++ b/app/app/views.py @@ -0,0 +1,4 @@ +from django.shortcuts import redirect + +def redirect_view(request): + return redirect('http://decentralized.quadraticlands.com/') diff --git a/app/assets/v2/js/pages/profile-trust.js b/app/assets/v2/js/pages/profile-trust.js index 397727451d9..8fa857a0121 100644 --- a/app/assets/v2/js/pages/profile-trust.js +++ b/app/assets/v2/js/pages/profile-trust.js @@ -2065,76 +2065,6 @@ Vue.component('facebook-verify-modal', { } }); -Vue.component('qd-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - validationError: '', - forceStep: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - }, - goToVerification() { - window.open('/quadraticlands/mission/diplomacy', '_blank'); - this.dismissVerification(); - } - } -}); if (document.getElementById('gc-trust-manager-app')) { diff --git a/app/dashboard/tasks.py b/app/dashboard/tasks.py index 456260b1b57..c64f1ac38f1 100644 --- a/app/dashboard/tasks.py +++ b/app/dashboard/tasks.py @@ -281,12 +281,6 @@ def update_trust_bonus(self, pk): tb += 0.15 # if profile.is_duniter_verified: # tb *= 1.001 - qd_tb = 0 - for player in profile.players.all(): - new_score = 0 - if player.tokens_in: - new_score = min(player.tokens_in / 100, 0.20) - qd_tb = max(qd_tb, new_score) # cap the trust_bonus score at 1.5 tb = min(1.5, tb) diff --git a/app/dashboard/templates/profiles/trust-vue.html b/app/dashboard/templates/profiles/trust-vue.html index e252823abf7..cba6c2a89b5 100644 --- a/app/dashboard/templates/profiles/trust-vue.html +++ b/app/dashboard/templates/profiles/trust-vue.html @@ -75,13 +75,6 @@