Skip to content

Commit

Permalink
Merge pull request #6 from acoollevel/master
Browse files Browse the repository at this point in the history
Thanks for all this. LGTM!
  • Loading branch information
sonus21 committed Jan 29, 2020
2 parents 38b736a + f39ecf9 commit d0843d3
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
File renamed without changes.
@@ -1,4 +1,4 @@
{% extends 'base.html' %}
{% extends 'error_tracker/base.html' %}
{% load error_tracker %}
{% block content_block %}
<style>
Expand Down Expand Up @@ -30,7 +30,7 @@ <h2 class="text-center"><a href="{% url 'view_errors' %}">Errors Seen</a></h2>
<div><strong>Request data: </strong>{{ obj.request_data }}</div>
<hr/>
<div><strong>Exception detail: </strong><br/>
{{ obj.traceback|replace_new_line_with_br|safe }}</div>
{{ obj.traceback|escape|replace_new_line_with_br|safe }}</div>
</div>
{% endif %}
{% endblock %}
@@ -1,4 +1,4 @@
{% extends 'base.html' %}
{% extends 'error_tracker/base.html' %}
{% block content_block %}
{% if error %}
<h1 class="text-center alert alert-danger">{{ error }}</h1>
Expand Down
4 changes: 2 additions & 2 deletions error_tracker/django/utils.py
Expand Up @@ -96,8 +96,8 @@ def notify(self, request, exception,
class DefaultDjangoViewPermission(ViewPermissionMixin):

def __call__(self, request):
if hasattr(request.user, "is_admin"):
return request.user.is_admin()
if hasattr(request.user, "is_superuser"):
return request.user.is_superuser
return False


Expand Down
4 changes: 2 additions & 2 deletions error_tracker/django/views.py
Expand Up @@ -45,7 +45,7 @@ def view_list(request):
prev_url = reverse('view_errors') + "?page=" + str(errors.prev_num) \
if errors.has_prev else None

return render(request, template_name='list.html',
return render(request, template_name='error_tracker/list.html',
context=dict(error=error, title=title, errors=errors,
next_url=next_url, prev_url=prev_url))

Expand Down Expand Up @@ -77,5 +77,5 @@ def detail(request, rhash):
if obj is None:
raise Http404
title = "%s : %s" % (obj.method, obj.path)
return render(request, template_name='detail.html',
return render(request, template_name='error_tracker/detail.html',
context=dict(error=error, title=title, obj=obj))
File renamed without changes.
@@ -1,4 +1,4 @@
{% extends 'base.html' %}
{% extends 'error_tracker/base.html' %}
{% block content_block %}
<style>
hr {
Expand Down
@@ -1,4 +1,4 @@
{% extends 'base.html' %}
{% extends 'error_tracker/base.html' %}
{% block content_block %}
{% if error %}
<h1 class="text-center alert alert-danger">{{ error }}</h1>
Expand Down
4 changes: 2 additions & 2 deletions error_tracker/flask/view.py
Expand Up @@ -36,7 +36,7 @@ def view_list():
if errors.has_next else None
prev_url = url_for('app_error.view_list', page=errors.prev_num) \
if errors.has_prev else None
return render_template('list.html', error=error, title=title, errors=errors,
return render_template('error_tracker/list.html', error=error, title=title, errors=errors,
next_url=next_url, prev_url=prev_url)

@blueprint.route('/<string:rhash>')
Expand All @@ -54,7 +54,7 @@ def view_detail(rhash):
abort(404)
title = "%s : %s" % (obj.method, obj.path)

return render_template('detail.html', error=error, title=title, obj=obj)
return render_template('error_tracker/detail.html', error=error, title=title, obj=obj)

@blueprint.route('/delete/<string:rhash>')
def view_delete(rhash):
Expand Down

0 comments on commit d0843d3

Please sign in to comment.