Skip to content

Commit

Permalink
Add admin backlink
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Sep 26, 2024
1 parent 9a5a2d5 commit 404cad0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ To enable the dashboard, add the app to your `INSTALLED_APPS` setting
```python
# settings.py
INSTALLED_APPS = [
# ...
"django.contrib.admin", # required for the dashboard
# ...
"emark",
"emark.contrib.dashboard",
"emark.contrib.dashboard", # needs to be added before Django's admin app
# ...
"django.contrib.admin", # required for the dashboard
# ...
]
```
Expand Down
9 changes: 9 additions & 0 deletions emark/contrib/dashboard/templates/admin/base_site.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "admin/base_site.html" %}
{% block branding %}
{{ block.super }}
{% url 'emark-dashboard:dashboard' as dashboard_url %}
{% if request.path != dashboard_url %}
<a href="{% url 'emark-dashboard:dashboard' %}"
style="align-self: center">eMark</a>
{% endif %}
{% endblock %}

0 comments on commit 404cad0

Please sign in to comment.