Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
oritwoen authored Oct 14, 2019
2 parents 2323f43 + 04ee493 commit 6ad57fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions app/app/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def preprocess(request):
record_visit = not profile.last_visit or profile.last_visit < (
timezone.now() - timezone.timedelta(seconds=RECORD_VISIT_EVERY_N_SECONDS)
)

if record_visit:
ip_address = get_ip(request)
profile.last_visit = timezone.now()
Expand All @@ -69,7 +68,11 @@ def preprocess(request):
profile.save()
except Exception as e:
logger.exception(e)
metadata = {'useragent': request.META['HTTP_USER_AGENT'], }
metadata = {
'useragent': request.META['HTTP_USER_AGENT'],
'referrer': request.META.get('HTTP_REFERER', None),
'path': request.META.get('PATH_INFO', None),
}
UserAction.objects.create(
user=request.user,
profile=profile,
Expand Down
2 changes: 1 addition & 1 deletion app/avatar/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def get_temp_image_file(image):
return temp_io


def svg_to_png(svg_content, width=100, height=100, scale=1, index=None, prefer=None):
def svg_to_png(svg_content, width=100, height=100, scale=1, index=None, prefer=None, extra_flags=''):
print('creating svg with pyvips')
png = None
if not prefer or prefer == 'pyvips':
Expand Down
8 changes: 4 additions & 4 deletions app/dashboard/templates/profiles/activity_stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
</li>
<li>
Reliability: <b>{{profile.reliability}}</b>
<a href="#" style="color: black; text-decoration: underline; font-size: 12px;" data-toggle="collapse" data-target="#reliability_details">( Details )
</a>
<div id="tooltip" class="float-right">
<div id="tooltip" style="display: inline-block;">
<i class='fa fa-info-circle' data-placement="bottom" data-toggle="tooltip" data-html="true" title="
<p>Gitcoin's perception of how reliable this user is.</p>
<p>Reliability on Gitcoin is calculated by looking at the number of attempts <br>
Expand All @@ -23,6 +21,8 @@
">
</i>
</div>
<a href="#" style="color: black; text-decoration: underline; font-size: 12px;" data-toggle="collapse" data-target="#reliability_details">Details
</a>
</li>
<div id="reliability_details" class="collapse">
<li>
Expand Down Expand Up @@ -53,10 +53,10 @@
</div>
{% if profile.avg_hourly_rate %}
<li class=''>
Avg Hourly Rate <b>${{profile.avg_hourly_rate|floatformat:2}}</b>
<label id="tooltip">
<i class='fa fa-info-circle' title="The average hourly rate of bounties that this user has been involved in."></i>
</label>
Avg Hourly Rate <b>${{profile.avg_hourly_rate|floatformat:2}}</b>
</li>
{% endif %}
{% endif %}

0 comments on commit 6ad57fe

Please sign in to comment.