mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Preparing for a proper UI
This commit is contained in:
parent
66d4407565
commit
b8be20b565
10
src/documents/templates/documents/index.html
Normal file
10
src/documents/templates/documents/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-gb">
|
||||
<head>
|
||||
<title>Paperless</title>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
@ -2,7 +2,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import HttpResponse
|
||||
from django.template.defaultfilters import slugify
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.views.generic import FormView, DetailView
|
||||
from django.views.generic import FormView, DetailView, TemplateView
|
||||
|
||||
from rest_framework.mixins import (
|
||||
RetrieveModelMixin, UpdateModelMixin, DestroyModelMixin, ListModelMixin)
|
||||
@ -19,6 +19,17 @@ from .serialisers import (
|
||||
SenderSerializer, TagSerializer, DocumentSerializer, LogSerializer)
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
|
||||
template_name = "documents/index.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
print(kwargs)
|
||||
print(self.request.GET)
|
||||
print(self.request.POST)
|
||||
return TemplateView.get_context_data(self, **kwargs)
|
||||
|
||||
|
||||
class FetchView(LoginRequiredMixin, DetailView):
|
||||
|
||||
model = Document
|
||||
|
@ -21,7 +21,8 @@ from django.contrib import admin
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from documents.views import (
|
||||
FetchView, PushView, SenderViewSet, TagViewSet, DocumentViewSet, LogViewSet
|
||||
IndexView, FetchView, PushView,
|
||||
SenderViewSet, TagViewSet, DocumentViewSet, LogViewSet
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
@ -39,11 +40,15 @@ urlpatterns = [
|
||||
),
|
||||
url(r"^api/", include(router.urls, namespace="drf")),
|
||||
|
||||
# Normal pages (coming soon)
|
||||
# url(r"^$", IndexView.as_view(), name="index"),
|
||||
|
||||
# File downloads
|
||||
url(r"^fetch/(?P<pk>\d+)$", FetchView.as_view(), name="fetch"),
|
||||
|
||||
# The Django admin
|
||||
url(r"", admin.site.urls),
|
||||
url(r"admin", admin.site.urls),
|
||||
url(r"", admin.site.urls), # This is going away
|
||||
|
||||
] + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user