Skip to content

Commit

Permalink
Adding filtering backends to API server.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedzee1000 committed Apr 12, 2018
1 parent 3c97829 commit 0457822
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Expand Up @@ -8,7 +8,8 @@ RUN yum install epel-release -y && \
yum remove epel-release -y && \
yum clean all

RUN pip install raven --upgrade && pip install django==1.11.2 psycopg2==2.7.3 djangorestframework drfdocs
RUN pip install raven --upgrade && pip install django==1.11.2 psycopg2==2.7.3 \
djangorestframework drfdocs django-filter

RUN mkdir -p /opt/cccp-service
ADD node.kubeconfig ca.crt /opt/cccp-service/
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.apiserver
Expand Up @@ -10,7 +10,8 @@ RUN yum install epel-release -y && \
yum remove epel-release -y && \
yum clean all

RUN pip install raven --upgrade && pip install django==1.11.2 psycopg2==2.7.3 djangorestframework drfdocs
RUN pip install raven --upgrade && pip install django==1.11.2 psycopg2==2.7.3 \
djangorestframework drfdocs django-filter

RUN mkdir -p /opt/cccp-service
ADD node.kubeconfig ca.crt /opt/cccp-service/
Expand Down
1 change: 1 addition & 0 deletions container_pipeline/lib/default_settings.py
Expand Up @@ -78,6 +78,7 @@
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
],
'DEFAULT_PAGINATION_CLASS': 'container_pipeline.pagination.ModelAPIPagination',
'DEFAULT_FILTER_BACKENDS': 'django_filters.rest_framework.DjangoFilterBackend',
}

LOGGING = dict(
Expand Down
7 changes: 7 additions & 0 deletions provisions/roles/django/tasks/main.yml
Expand Up @@ -37,6 +37,13 @@
- django
- api

- name: Install Django REST Framework Filtering Backends
pip: name=django-filter
sudo: yes
tags:
- django
- api

- name: Install Docker
yum: name=docker state=installed
sudo: yes
Expand Down

0 comments on commit 0457822

Please sign in to comment.