mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-16 08:23:12 +00:00
View for printer in API
This commit is contained in:
parent
3e62cb852f
commit
1bb39f25ff
1 changed files with 12 additions and 1 deletions
11
api/views.py
11
api/views.py
|
@ -45,6 +45,10 @@ from . import serializers
|
|||
from .pagination import PageSizedPagination
|
||||
from .permissions import ACLPermission
|
||||
|
||||
from re2o.settings import INSTALLED_APPS
|
||||
|
||||
if "printer" in INSTALLED_APPS:
|
||||
import printer.models as printer
|
||||
|
||||
# COTISATIONS
|
||||
|
||||
|
@ -668,6 +672,13 @@ class ClubMailingView(generics.ListAPIView):
|
|||
queryset = users.Club.objects.all()
|
||||
serializer_class = serializers.MailingSerializer
|
||||
|
||||
# PRINTER
|
||||
class JobsView(viewsets.ModelViewSet):
|
||||
"""Api Root Jobs
|
||||
"""
|
||||
queryset = printer.JobWithOptions.objects.filter(status='Printable')
|
||||
serializer_class = serializers.PrintJobSerializer
|
||||
|
||||
|
||||
# TOKEN AUTHENTICATION
|
||||
|
||||
|
|
Loading…
Reference in a new issue