Skip to content

Commit

Permalink
feat: remove booking app
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRomaa committed Mar 26, 2024
1 parent 1c7eba1 commit eab57d2
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 188 deletions.
8 changes: 0 additions & 8 deletions apps/booking/admin.py

This file was deleted.

26 changes: 0 additions & 26 deletions apps/booking/migrations/0001_initial.py

This file was deleted.

23 changes: 0 additions & 23 deletions apps/booking/migrations/0002_initial.py

This file was deleted.

Empty file.
13 changes: 0 additions & 13 deletions apps/booking/models.py

This file was deleted.

53 changes: 0 additions & 53 deletions apps/booking/serializers.py

This file was deleted.

8 changes: 0 additions & 8 deletions apps/booking/urls.py

This file was deleted.

49 changes: 0 additions & 49 deletions apps/booking/views.py

This file was deleted.

6 changes: 0 additions & 6 deletions apps/calendar/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from rest_framework.response import Response
from rest_framework.views import APIView

from apps.booking.models import Booking
from apps.booking.serializers import BookingSerializer
from apps.events.models import Event
from apps.training.models import Status, TrainingSession
from zhu_core.permissions import IsGet
Expand All @@ -22,24 +20,20 @@ def get(self, request, year=datetime.now().year, month=datetime.now().month):
{
'events': [],
'sessions': [],
'bookings': [],
}
"""
events = Event.objects.filter(start__month=month, start__year=year)
sessions = TrainingSession.objects.filter(start__month=month, start__year=year).exclude(status=Status.CANCELLED)
bookings = Booking.objects.filter(start__month=month, start__year=year)

if not (request.user.is_authenticated and request.user.is_staff):
events = events.exclude(hidden=True)

event_serializer = CalendarEventSerializer(events, many=True)
session_serializer = CalendarTrainingSerializer(sessions, many=True)
booking_serializer = BookingSerializer(bookings, many=True)

return Response(
{
"events": event_serializer.data,
"sessions": session_serializer.data,
"bookings": booking_serializer.data,
}
)
1 change: 0 additions & 1 deletion zhu_core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"rest_framework.authtoken",
"apps.administration",
"apps.announcements",
"apps.booking",
"apps.calendar",
"apps.connections",
"apps.events.app.EventsConfig",
Expand Down
1 change: 0 additions & 1 deletion zhu_core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
path("auth/", include("apps.vatsim.urls")),
path("api/administration/", include("apps.administration.urls")),
path("api/announcements/", include("apps.announcements.urls")),
path("api/booking/", include("apps.booking.urls")),
path("api/calendar/", include("apps.calendar.urls")),
path("api/connections/", include("apps.connections.urls")),
path("api/events/", include("apps.events.urls")),
Expand Down

0 comments on commit eab57d2

Please sign in to comment.