Project for the UPV to develop an app like BlaBlaCar but only for UPV people.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'develop'

+81 -1
+9
README.rst
··· 47 47 48 48 Environment Variables 49 49 --------------------- 50 + 50 51 List of environment variables that the project needs to work in production: 51 52 52 53 - ``DJANGO_ALLOWED_HOSTS="example.com"`` ··· 59 60 60 61 The default folder for Django's ``STATICFILES_DIRS`` value is ``/static/dist/``, therefore all 61 62 static data have to be created by **gulp**. 63 + 64 + Run tests 65 + --------- 66 + 67 + To run the tests using Docker:: 68 + 69 + $ docker-compose -f dev.yml run app python3 manage.py test --settings=config.settings.test 70 +
+47
compose/app/Dockerfile-dev
··· 1 + # Dockerfile for Backstage App 2 + FROM ubuntu:16.04 3 + ENV PYTHONUNBUFFERED 1 4 + MAINTAINER Marcos Gabarda <hey@marcosgabarda.com> 5 + 6 + # Ubuntu packages required 7 + RUN apt-get update && apt-get install -y \ 8 + software-properties-common 9 + RUN add-apt-repository multiverse 10 + RUN apt-get update && apt-get install -y \ 11 + build-essential \ 12 + libpq-dev \ 13 + python3 \ 14 + python3-dev \ 15 + python3-pip \ 16 + libjpeg-dev \ 17 + jpegoptim \ 18 + optipng \ 19 + gettext \ 20 + gdal-bin \ 21 + geoip-bin \ 22 + geoip-database-contrib \ 23 + libspatialite-dev \ 24 + libspatialite7 \ 25 + spatialite-bin \ 26 + libsqlite3-mod-spatialite \ 27 + curl 28 + 29 + # Requirements have to be pulled and installed here, otherwise caching won't work 30 + COPY ./requirements /requirements 31 + RUN pip3 install -U pip 32 + RUN pip3 install -r /requirements/local.txt 33 + 34 + # Copy entrypoint script 35 + COPY ./compose/app/entrypoint.sh /entrypoint.sh 36 + RUN sed -i 's/\r//' /entrypoint.sh 37 + RUN chmod +x /entrypoint.sh 38 + 39 + # Copy script for starting development server 40 + COPY ./compose/app/start-dev.sh /start-dev.sh 41 + RUN sed -i 's/\r//' /start-dev.sh 42 + RUN chmod +x /start-dev.sh 43 + 44 + # Set working directory 45 + WORKDIR /app/upvcarshare 46 + 47 + ENTRYPOINT ["/entrypoint.sh"]
+4
compose/app/entrypoint.sh
··· 1 + #!/bin/bash 2 + set -e 3 + cmd="$@" 4 + exec ${cmd}
+4
compose/app/start-dev.sh
··· 1 + #!/bin/sh 2 + python3 manage.py compilemessages 3 + python3 manage.py migrate 4 + python3 manage.py runserver 0.0.0.0:8888
+16
dev.yml
··· 1 + # Docker-compose file to launch services during the development. 2 + version: '2' 3 + 4 + services: 5 + 6 + app: 7 + build: 8 + context: . 9 + dockerfile: ./compose/app/Dockerfile-dev 10 + container_name: upvcarshare-app 11 + command: /start-dev.sh 12 + env_file: .env 13 + volumes: 14 + - .:/app 15 + ports: 16 + - "8888:8888"
+1 -1
upvcarshare/users/tests/test_api.py
··· 42 42 self.assertEqual(response.status_code, status.HTTP_200_OK) 43 43 user = User.objects.get(pk=user.pk) 44 44 self.assertEquals( 45 - "SRID=4326;POINT (-0.3767699999989399 39.46913999999703)", 45 + "SRID=4326;POINT (-0.3767699999989411 39.46913999999702)", 46 46 six.text_type(user.get_default_position_wgs84()) 47 47 ) 48 48 self.assertEquals("foo", user.default_address)