Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small tip tweaks #2111

Merged
merged 3 commits into from
Sep 4, 2018
Merged

small tip tweaks #2111

merged 3 commits into from
Sep 4, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Aug 28, 2018

  • stores user agent
  • makes searchable by ip and metadata

@@ -77,7 +77,7 @@ class TipAdmin(admin.ModelAdmin):
raw_id_fields = ['recipient_profile', 'sender_profile']
ordering = ['-id']
readonly_fields = ['resend', 'claim']
search_fields = ['tokenName', 'comments_public', 'comments_priv', 'from_name', 'username', 'network', 'github_url', 'url', 'emails', 'from_address', 'receive_address']
search_fields = ['tokenName', 'comments_public', 'comments_priv', 'from_name', 'username', 'network', 'github_url', 'url', 'emails', 'from_address', 'receive_address', 'ip', 'metadata']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (189 > 120 characters)

@codecov
Copy link

codecov bot commented Aug 28, 2018

Codecov Report

Merging #2111 into master will decrease coverage by <.01%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2111      +/-   ##
==========================================
- Coverage   27.91%   27.91%   -0.01%     
==========================================
  Files         136      136              
  Lines       11130    11132       +2     
  Branches     1499     1499              
==========================================
  Hits         3107     3107              
- Misses       7913     7915       +2     
  Partials      110      110
Impacted Files Coverage Δ
app/dashboard/tip_views.py 20.93% <0%> (-0.25%) ⬇️
app/dashboard/admin.py 67% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3cfa17...5e92baf. Read the comment docs.

mbeacom
mbeacom previously approved these changes Aug 28, 2018
@@ -290,6 +290,10 @@ def send_tip_3(request):
to_emails = list(set(to_emails))
expires_date = timezone.now() + timezone.timedelta(seconds=params['expires_date'])

# metadata
metadata = params['metadata']
metadata['user_agent'] = request.META['HTTP_USER_AGENT']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 - HTTP_USER_AGENT should always be present in the META. This shouldn't be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants