user-panel #9

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

View File

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

View File

@ -43,6 +43,7 @@ INSTALLED_APPS = [
"django.contrib.staticfiles",
'django_extensions',
'django_bootstrap5',
'django_tables2',
"rest_framework",
"login",
"user",
@ -53,6 +54,7 @@ INSTALLED_APPS = [
"lot",
"documents",
"dashboard",
"api",
]

View File

@ -24,4 +24,5 @@ urlpatterns = [
path("evidence/", include("evidence.urls")),
path("device/", include("device.urls")),
path("lot/", include("lot.urls")),
path('api/', include('api.urls')),
]

View File

@ -56,6 +56,15 @@ class UserTagForm(forms.Form):
def __init__(self, *args, **kwargs):
self.uuid = kwargs.pop('uuid', None)
annotation = Annotation.objects.filter(
uuid=self.uuid,
type=Annotation.Type.SYSTEM,
key='CUSTOM_ID',
).first()
if annotation:
kwargs['initial'].update({'tag': annotation.value})
super().__init__(*args, **kwargs)
def clean(self):

View File

@ -3,9 +3,10 @@ Django==5.0.6
django-bootstrap5==24.2
django-extensions==3.2.3
djangorestframework==3.15.1
django-tables2==2.6.0
python-decouple==3.3
py-dmidecode==0.1.3
pandas==2.2.2
xlrd==2.0.1
odfpy==1.4.1
pytz==2024.2