api
This commit is contained in:
parent
029e694958
commit
13c78fb3c1
|
@ -143,6 +143,12 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -43,6 +43,7 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
'django_extensions',
|
'django_extensions',
|
||||||
'django_bootstrap5',
|
'django_bootstrap5',
|
||||||
|
'django_tables2',
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
"login",
|
"login",
|
||||||
"user",
|
"user",
|
||||||
|
@ -53,6 +54,7 @@ INSTALLED_APPS = [
|
||||||
"lot",
|
"lot",
|
||||||
"documents",
|
"documents",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
|
"api",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,5 @@ urlpatterns = [
|
||||||
path("evidence/", include("evidence.urls")),
|
path("evidence/", include("evidence.urls")),
|
||||||
path("device/", include("device.urls")),
|
path("device/", include("device.urls")),
|
||||||
path("lot/", include("lot.urls")),
|
path("lot/", include("lot.urls")),
|
||||||
|
path('api/', include('api.urls')),
|
||||||
]
|
]
|
||||||
|
|
|
@ -56,6 +56,15 @@ class UserTagForm(forms.Form):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.uuid = kwargs.pop('uuid', None)
|
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)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
|
|
|
@ -3,9 +3,10 @@ Django==5.0.6
|
||||||
django-bootstrap5==24.2
|
django-bootstrap5==24.2
|
||||||
django-extensions==3.2.3
|
django-extensions==3.2.3
|
||||||
djangorestframework==3.15.1
|
djangorestframework==3.15.1
|
||||||
|
django-tables2==2.6.0
|
||||||
python-decouple==3.3
|
python-decouple==3.3
|
||||||
py-dmidecode==0.1.3
|
py-dmidecode==0.1.3
|
||||||
pandas==2.2.2
|
pandas==2.2.2
|
||||||
xlrd==2.0.1
|
xlrd==2.0.1
|
||||||
odfpy==1.4.1
|
odfpy==1.4.1
|
||||||
|
pytz==2024.2
|
||||||
|
|
Loading…
Reference in New Issue