1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2025-07-02 22:36:54 +02:00

add SmartHome models for db

This commit is contained in:
MarkParker5
2022-04-14 22:57:55 +02:00
parent 44e4aa48f9
commit 110c70dd97
45 changed files with 669 additions and 1175 deletions

View File

@ -0,0 +1,16 @@
from django.http import HttpResponse, FileResponse
from django.views.decorators.http import require_http_methods
from django.shortcuts import render
# decorator
def require_mobile_app(methods):
def decorator(function):
@require_http_methods(methods)
def wrapper(request):
if config.debug or request.META.get('HTTP_USER_AGENT') == 'ArchieMobile':
return function(request)
else:
return HttpResponse(status = 444)
return wrapper
return decorator