new
@ -1,2 +1,18 @@
|
||||
{% load static %}
|
||||
|
||||
<div class="mb-2 flex justify-start items-center gap-2">
|
||||
<div
|
||||
class="w-[30px] h-[30px] rounded-full shadow-md text-white flex justify-center items-center bg-osiblue uppercase text-xs">
|
||||
{% if member.staffprofile.image %}
|
||||
<img class="w-full h-full rounded-full"
|
||||
src="http://192.168.1.106:8000{{member.staffprofile.image.url}}">
|
||||
{% else %}
|
||||
<p>{{member.first_name.0}}{{member.last_name.0}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div
|
||||
class="w-fit rounded-r-3xl rounded-tl-3xl px-3 py-3 bg-gray-50 border border-gray-100 shadow-md flex space-x-1 justify-start items-center">
|
||||
<div class="h-2 w-2 bg-secondosiblue rounded-full animate-typing"></div>
|
||||
<div class="h-2 w-2 bg-osiblue rounded-full animate-typing" style="animation-delay: 0.2s;"></div>
|
||||
<div class="h-2 w-2 bg-fifthosiblue rounded-full animate-typing" style="animation-delay: 0.4s;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 220 KiB |
After Width: | Height: | Size: 220 KiB |
After Width: | Height: | Size: 220 KiB |
After Width: | Height: | Size: 220 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 91 KiB |
@ -0,0 +1,15 @@
|
||||
|
||||
from django.http import HttpResponseForbidden
|
||||
from functools import wraps
|
||||
def require_token(view_func):
|
||||
@wraps(view_func)
|
||||
def _wrapped_view(request, *args, **kwargs):
|
||||
token = request.META.get('HTTP_AUTHORIZATION')
|
||||
static_token = 'A3uLHUthhCTba5q62eVG4XSHghB5nmPqk!XZyHsHP' # Replace with your static token.
|
||||
|
||||
if token == f'Token {static_token}':
|
||||
return view_func(request, *args, **kwargs)
|
||||
else:
|
||||
return HttpResponseForbidden()
|
||||
|
||||
return _wrapped_view
|
@ -0,0 +1,15 @@
|
||||
|
||||
from django.http import HttpResponseForbidden
|
||||
from functools import wraps
|
||||
def require_token(view_func):
|
||||
@wraps(view_func)
|
||||
def _wrapped_view(request, *args, **kwargs):
|
||||
token = request.META.get('HTTP_AUTHORIZATION')
|
||||
static_token = 'A3uLHUthhCTba5q62eVG4XSHghB5nmPqk!XZyHsHP' # Replace with your static token.
|
||||
|
||||
if token == f'Token {static_token}':
|
||||
return view_func(request, *args, **kwargs)
|
||||
else:
|
||||
return HttpResponseForbidden()
|
||||
|
||||
return _wrapped_view
|
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 72 KiB |