15 lines
367 B
Python
15 lines
367 B
Python
"""Establishment app views."""
|
|
|
|
from rest_framework import permissions
|
|
|
|
from establishment import models
|
|
|
|
|
|
class EstablishmentMixin:
|
|
"""Establishment mixin."""
|
|
|
|
permission_classes = (permissions.AllowAny,)
|
|
|
|
def get_queryset(self):
|
|
"""Overrided method 'get_queryset'."""
|
|
return models.Establishment.objects.all().prefetch_actual_employees() |