Commit 17d2129c authored by Michael Lundquist's avatar Michael Lundquist
Browse files

Here are the changes, but I haven't tested it yet.

parent e64903ee
Pipeline #4501 failed with stage
in 26 seconds
...@@ -120,19 +120,9 @@ Installing Docker on your system: ...@@ -120,19 +120,9 @@ Installing Docker on your system:
Additionally, you will need to install docker-compose: https://docs.docker.com/compose/install/ Additionally, you will need to install docker-compose: https://docs.docker.com/compose/install/
Next inside the `whats-open/` root directory run: Inside the `whats-open/` root directory run:
docker build . -t 'whats-open-api' docker-compose up
This builds the docker image that we will deploy to the swarm in a stack.
Initialize your swarm:
docker swarm init
And finally,
docker stack deploy whats-open-api_stack -c docker-compose.yml
You should see that the server is running by going to http://localhost:8000 You should see that the server is running by going to http://localhost:8000
in your browser. Any changes you make to your local file system will be mirrored in the server. in your browser. Any changes you make to your local file system will be mirrored in the server.
......
...@@ -111,12 +111,6 @@ class AlertViewSet(viewsets.ReadOnlyModelViewSet): ...@@ -111,12 +111,6 @@ class AlertViewSet(viewsets.ReadOnlyModelViewSet):
# Associate a serializer with the ViewSet # Associate a serializer with the ViewSet
serializer_class = AlertSerializer serializer_class = AlertSerializer
# Setup filtering
filter_backends = (
filters.SearchFilter,
DjangoFilterBackend,
filters.OrderingFilter,
)
search_fields = FILTER_FIELDS search_fields = FILTER_FIELDS
ordering_fields = FILTER_FIELDS ordering_fields = FILTER_FIELDS
filter_fields = FILTER_FIELDS filter_fields = FILTER_FIELDS
...@@ -208,12 +202,7 @@ class CategoryViewSet(viewsets.ReadOnlyModelViewSet): ...@@ -208,12 +202,7 @@ class CategoryViewSet(viewsets.ReadOnlyModelViewSet):
# Associate a serializer with the ViewSet # Associate a serializer with the ViewSet
serializer_class = CategorySerializer serializer_class = CategorySerializer
# Setup filtering
filter_backends = (
filters.SearchFilter,
DjangoFilterBackend,
filters.OrderingFilter,
)
search_fields = FILTER_FIELDS search_fields = FILTER_FIELDS
ordering_fields = FILTER_FIELDS ordering_fields = FILTER_FIELDS
filter_fields = FILTER_FIELDS filter_fields = FILTER_FIELDS
...@@ -292,12 +281,6 @@ class LocationViewSet(viewsets.ReadOnlyModelViewSet): ...@@ -292,12 +281,6 @@ class LocationViewSet(viewsets.ReadOnlyModelViewSet):
# Associate a serializer with the ViewSet # Associate a serializer with the ViewSet
serializer_class = LocationSerializer serializer_class = LocationSerializer
# Setup filtering
filter_backends = (
filters.SearchFilter,
DjangoFilterBackend,
filters.OrderingFilter,
)
search_fields = FILTER_FIELDS search_fields = FILTER_FIELDS
ordering_fields = FILTER_FIELDS ordering_fields = FILTER_FIELDS
filter_fields = FILTER_FIELDS filter_fields = FILTER_FIELDS
...@@ -408,12 +391,6 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet): ...@@ -408,12 +391,6 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
# Associate a serializer with the ViewSet # Associate a serializer with the ViewSet
serializer_class = FacilitySerializer serializer_class = FacilitySerializer
# Setup filtering
filter_backends = (
filters.SearchFilter,
DjangoFilterBackend,
filters.OrderingFilter,
)
search_fields = FILTER_FIELDS search_fields = FILTER_FIELDS
ordering_fields = FILTER_FIELDS ordering_fields = FILTER_FIELDS
filter_fields = FILTER_FIELDS filter_fields = FILTER_FIELDS
...@@ -513,12 +490,6 @@ class ScheduleViewSet(viewsets.ModelViewSet): ...@@ -513,12 +490,6 @@ class ScheduleViewSet(viewsets.ModelViewSet):
# Associate a serializer with the ViewSet # Associate a serializer with the ViewSet
serializer_class = ScheduleSerializer serializer_class = ScheduleSerializer
# Setup filtering
filter_backends = (
filters.SearchFilter,
DjangoFilterBackend,
filters.OrderingFilter,
)
search_fields = FILTER_FIELDS search_fields = FILTER_FIELDS
ordering_fields = FILTER_FIELDS ordering_fields = FILTER_FIELDS
filter_fields = FILTER_FIELDS filter_fields = FILTER_FIELDS
......
...@@ -271,7 +271,8 @@ REST_FRAMEWORK = { ...@@ -271,7 +271,8 @@ REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': [ 'DEFAULT_FILTER_BACKENDS': [
#'url_filter.integrations.drf.URLFilterBackend', #url_filters #'url_filter.integrations.drf.URLFilterBackend', #url_filters
"django_filters.rest_framework.DjangoFilterBackend", #rest_framework.filters "django_filters.rest_framework.DjangoFilterBackend", #rest_framework.filters
"rest_framework.filters.OrderingFilter" "rest_framework.filters.OrderingFilter",
"rest_framework.filters.SearchFilter",
], ],
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment