mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
21 lines
718 B
Python
21 lines
718 B
Python
|
|
from django.conf import settings
|
||
|
|
from django.contrib.staticfiles.views import serve
|
||
|
|
from django.http.response import HttpResponse
|
||
|
|
from rest_framework.views import APIView
|
||
|
|
from django.views import static
|
||
|
|
|
||
|
|
|
||
|
|
class IndexView(APIView):
|
||
|
|
def get(self, request, format=None):
|
||
|
|
return static.serve(request, 'terminal.html', document_root=str(settings.BASE_DIR / 'dist'))
|
||
|
|
|
||
|
|
|
||
|
|
class AppDistView(APIView):
|
||
|
|
def get(self, request, path=None, format=None):
|
||
|
|
return static.serve(request, path, document_root=str(settings.BASE_DIR / 'app-dist'))
|
||
|
|
|
||
|
|
|
||
|
|
class DistView(APIView):
|
||
|
|
def get(self, request, path=None, format=None):
|
||
|
|
return static.serve(request, path, document_root=str(settings.BASE_DIR / 'dist'))
|