Skip to content

Commit

Permalink
DjangoCSV - v1.1.3
Browse files Browse the repository at this point in the history
- Hide admin panel from simple users
- Removed unused modules in code
  • Loading branch information
sh-mykola committed Jan 7, 2021
1 parent bf29e8d commit 560fa18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.shortcuts import render, redirect

from main.forms import SchemasNewForm, SchemasNewCategories, SchemasColumnFormset, DatasetForm
from main.models import Schemas, DataSets, SchemasColumn
from main.models import Schemas, DataSets
from .tasks import generate_file_async
from extensions import get_filename

Expand Down
5 changes: 3 additions & 2 deletions resources/templates/main/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
<div class="navbar-nav">
<a class="nav-link {% if nav_home %}active{% endif %}" aria-current="page" href="{% url "home" %}">Home</a>
<a class="nav-link {% if nav_schemas %}active{% endif %}" href="{% url "schemas" %}">Schemas</a>
<a class="nav-link" href="{% url 'admin:index' %}" target="_blank">Admin panel</a>

{% if user.is_superuser %}
<a class="nav-link" href="{% url 'admin:index' %}" target="_blank">Admin panel</a>
{% endif %}

</div>
<div class="navbar-nav">
Expand Down

0 comments on commit 560fa18

Please sign in to comment.