user-panel #9

Merged
cayop merged 25 commits from user-panel into main 2024-10-11 14:26:36 +00:00
2 changed files with 2 additions and 4 deletions
Showing only changes of commit 2f4a85f79b - Show all commits

View file

@ -98,7 +98,6 @@ class TokenDeleteView(DashboardView, DeleteView):
model = Token
def get(self, request, *args, **kwargs):
# self.check_valid_user()
self.pk = kwargs['pk']
self.object = get_object_or_404(self.model, pk=self.pk)
self.object.delete()
@ -109,8 +108,7 @@ class TokenDeleteView(DashboardView, DeleteView):
class TokenNewView(DashboardView, View):
def get(self, request, *args, **kwargs):
# self.check_valid_user()
Token.objects.create(token=uuid4())
Token.objects.create(token=uuid4(), owner=self.request.user)
return redirect('api:tokens')

View file

@ -144,7 +144,7 @@
</ul>
</li>
<li class="nav-item">
<a class="nav-link fw-bold" href="{# url 'api:tokens' #}">
<a class="nav-link fw-bold" href="{% url 'api:tokens' %}">
<i class="bi-menu-button-wide icon_sidebar"></i>
{% trans 'Tokens' %}
</a>