.
This commit is contained in:
+15
-1
@@ -156,4 +156,18 @@ def series_remove_duplicate_images(request, series_id: int):
|
|||||||
|
|
||||||
@router.get("/get_cases_user", auth=django_auth, response=List[CaseSchema])
|
@router.get("/get_cases_user", auth=django_auth, response=List[CaseSchema])
|
||||||
def get_cases_user(request):
|
def get_cases_user(request):
|
||||||
return Case.objects.filter(author=request.user)
|
return Case.objects.filter(author=request.user)
|
||||||
|
|
||||||
|
@router.get("/check_image_hash/{hash}", auth=django_auth)
|
||||||
|
def check_image_hash(request, hash: str):
|
||||||
|
try:
|
||||||
|
series_image = SeriesImage.objects.get(image_md5_hash=hash)
|
||||||
|
data = {
|
||||||
|
"status": "success",
|
||||||
|
"id": series_image.pk,
|
||||||
|
"url": series_image.series.get_absolute_url(),
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
except SeriesImage.DoesNotExist:
|
||||||
|
data = {"status": "success", "id": False}
|
||||||
|
return data
|
||||||
@@ -75,6 +75,9 @@
|
|||||||
{% if image.image %}
|
{% if image.image %}
|
||||||
[{{image.image.size|filesizeformat}}]
|
[{{image.image.size|filesizeformat}}]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{image.image_md5_hash}}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{% comment %} {{image.get_dicom_info|safe}}<br /> {% endcomment %}
|
{% comment %} {{image.get_dicom_info|safe}}<br /> {% endcomment %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user