Skip to content

Commit

Permalink
Merge pull request #6560 from gitcoinco/kevin/toolbox
Browse files Browse the repository at this point in the history
removes tools/ from app
  • Loading branch information
thelostone-mc authored May 3, 2020
2 parents 6531400 + b164bd7 commit 81c1c6a
Show file tree
Hide file tree
Showing 34 changed files with 16 additions and 501 deletions.
16 changes: 0 additions & 16 deletions app/app/tests/test_app_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,3 @@ def test_uniterested_reverse(self):
def test_uniterested_resolve(self):
"""Test the uninterested url and check the resolution"""
self.assertEqual(resolve('/actions/bounty/1/interest/2/uninterested/').view_name, 'uninterested')

def test_vote_up_reverse(self):
"""Test the vote up url and check the reverse"""
self.assertEqual(reverse('vote_tool_up', args=[1]), '/actions/tool/1/voteUp')

def test_vote_up_resolve(self):
"""Test the vote up url and check the resolution"""
self.assertEqual(resolve('/actions/tool/1/voteUp').view_name, 'vote_tool_up')

def test_vote_down_reverse(self):
"""Test the vote down url and check the reverse"""
self.assertEqual(reverse('vote_tool_down', args=[1]), '/actions/tool/1/voteDown')

def test_vote_down_resolve(self):
"""Test the vote down url and check the resolution"""
self.assertEqual(resolve('/actions/tool/1/voteDown').view_name, 'vote_tool_down')
4 changes: 0 additions & 4 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,6 @@
# Alpha functionality
re_path(r'^profile/(.*)/(.*)?', dashboard.views.profile, name='profile_by_tab'),
re_path(r'^profile/(.*)?', dashboard.views.profile, name='profile'),
re_path(r'^toolbox/?', dashboard.views.toolbox, name='toolbox'),
path('actions/tool/<int:tool_id>/voteUp', dashboard.views.vote_tool_up, name='vote_tool_up'),
path('actions/tool/<int:tool_id>/voteDown', dashboard.views.vote_tool_down, name='vote_tool_down'),
re_path(r'^tools/?', dashboard.views.toolbox, name='tools'),
re_path(r'^labs/?', dashboard.views.labs, name='labs'),

# gas views
Expand Down
5 changes: 2 additions & 3 deletions app/assets/v2/css/gitcoin.css
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,6 @@ textarea.status-textarea {
color: var(--townsquare-link-color);
}


.dark-mode .bg-light {
background-color: var(--bg-shade-0)!important;
}
background-color: var(--bg-shade-0)!important;
}
125 changes: 0 additions & 125 deletions app/assets/v2/css/toolbox.css

This file was deleted.

Binary file removed app/assets/v2/images/tools/activity.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/api.jpg
Binary file not shown.
Binary file removed app/assets/v2/images/tools/browser_extension.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/codefund.jpg
Binary file not shown.
Binary file removed app/assets/v2/images/tools/colorado.jpg
Binary file not shown.
Binary file removed app/assets/v2/images/tools/comingsoon.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/community1.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/community2.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/crosshairs.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/ens.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/ethos.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/ethwallpaper.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/gas_calc.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/gashistory.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/iOS.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/leaderboard.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/livegas.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/profiles.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/science.png
Binary file not shown.
Binary file removed app/assets/v2/images/tools/tools.jpg
Binary file not shown.
Binary file removed app/assets/v2/images/tools/tools_noborder.jpg
Binary file not shown.
Binary file removed app/assets/v2/images/tools/widget.png
Binary file not shown.
78 changes: 0 additions & 78 deletions app/assets/v2/js/toolbox.js

This file was deleted.

23 changes: 5 additions & 18 deletions app/dashboard/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
from django.utils.safestring import mark_safe

from .models import (
Activity, BlockedURLFilter, BlockedUser, Bounty, BountyEvent, BountyFulfillment, BountyInvites, BountySyncRequest,
CoinRedemption, CoinRedemptionRequest, Coupon, Earning, FeedbackEntry, HackathonEvent, HackathonProject,
HackathonRegistration, HackathonSponsor, Interest, LabsResearch, PortfolioItem, Profile, ProfileView,
SearchHistory, Sponsor, Tip, TipPayout, TokenApproval, Tool, ToolVote, TribeMember, UserAction,
UserVerificationModel, Poll, Question, Option, Answer, FundRequest
Activity, Answer, BlockedURLFilter, BlockedUser, Bounty, BountyEvent, BountyFulfillment, BountyInvites,
BountySyncRequest, CoinRedemption, CoinRedemptionRequest, Coupon, Earning, FeedbackEntry, FundRequest,
HackathonEvent, HackathonProject, HackathonRegistration, HackathonSponsor, Interest, LabsResearch, Option, Poll,
PortfolioItem, Profile, ProfileView, Question, SearchHistory, Sponsor, Tip, TipPayout, TokenApproval, TribeMember,
UserAction, UserVerificationModel,
)


Expand Down Expand Up @@ -82,12 +82,6 @@ class EarningAdmin(admin.ModelAdmin):
search_fields = ['from_profile__handle', 'to_profile__handle']


class ToolAdmin(admin.ModelAdmin):
ordering = ['-id']
list_display = ['created_on', '__str__']
raw_id_fields = ['votes']


class ActivityAdmin(admin.ModelAdmin):
ordering = ['-id']
raw_id_fields = ['bounty', 'profile', 'tip', 'kudos', 'grant', 'subscription', 'other_profile', 'kudos_transfer', 'hackathonevent']
Expand Down Expand Up @@ -118,11 +112,6 @@ class TokenApprovalAdmin(admin.ModelAdmin):
search_fields = ['profile__handle', 'token_name', 'token_address']


class ToolVoteAdmin(admin.ModelAdmin):
raw_id_fields = ['profile']
ordering = ['-id']


class BountyInvitesAdmin(admin.ModelAdmin):
raw_id_fields = ['bounty', 'inviter', 'invitee']
ordering = ['-id']
Expand Down Expand Up @@ -483,8 +472,6 @@ class AnswersAdmin(admin.ModelAdmin):
admin.site.register(TokenApproval, TokenApprovalAdmin)
admin.site.register(CoinRedemption, GeneralAdmin)
admin.site.register(CoinRedemptionRequest, GeneralAdmin)
admin.site.register(Tool, ToolAdmin)
admin.site.register(ToolVote, ToolVoteAdmin)
admin.site.register(Sponsor, SponsorAdmin)
admin.site.register(HackathonEvent, HackathonEventAdmin)
admin.site.register(HackathonSponsor, HackathonSponsorAdmin)
Expand Down
6 changes: 3 additions & 3 deletions app/dashboard/management/commands/send_bulk_tips.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
from django.core import management
from django.core.management.base import BaseCommand
from django.utils import timezone
from dashboard.views import record_user_action

from dashboard.abi import erc20_abi as abi
from dashboard.models import Activity, Earning, Profile, Tip, TipPayout
from dashboard.notifications import maybe_market_tip_to_email, maybe_market_tip_to_github, maybe_market_tip_to_slack
from dashboard.tip_views import record_tip_activity
from dashboard.utils import get_tx_status, get_web3, has_tx_mined
from dashboard.views import record_user_action
from gas.utils import recommend_min_gas_price_to_confirm_in_time
from marketing.mails import (
grant_match_distribution_final_txn, grant_match_distribution_kyc, grant_match_distribution_test_txn,
)
from townsquare.models import Comment
from web3 import HTTPProvider, Web3
from dashboard.notifications import maybe_market_tip_to_email, maybe_market_tip_to_github, maybe_market_tip_to_slack
from dashboard.tip_views import record_tip_activity

WAIT_TIME_BETWEEN_PAYOUTS = 15

Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from django.contrib.postgres.fields import ArrayField, JSONField
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import connection, models
from django.db.models import Count, F, Q, Sum, Subquery
from django.db.models import Count, F, Q, Subquery, Sum
from django.db.models.signals import m2m_changed, post_delete, post_save, pre_save
from django.dispatch import receiver
from django.forms.models import model_to_dict
Expand Down
Loading

0 comments on commit 81c1c6a

Please sign in to comment.