diff --git a/Dockerfile b/Dockerfile index 789a107..4ee11fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,3 +54,13 @@ RUN easy_install pip RUN pip2 install -r requirements/dev-requirements.txt RUN pip2 install --upgrade setuptools +RUN mkdir -p /var/log/sigi/ +RUN touch /var/log/sigi/application.log +RUN chmod -x /var/log/sigi/application.log + +RUN git clone https://github.com/marinho/geraldo.git +WORKDIR /sigi/geraldo/ +RUN python setup.py install +RUN cp -Rfv reporting geraldo `python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"` +WORKDIR /sigi +RUN rm -rf geraldo/ diff --git a/docker-compose.yml b/docker-compose.yml index 8702818..2bd636b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,20 @@ -localhost: - image: postgres - environment: - POSTGRES_PASSWORD: sigi - POSTGRES_USER: sigi - POSTGRES_DB: sigi - ports: - - "5532:5432" -web: - build: . - command: bash -c "python manage.py bower install && python manage.py migrate && python manage.py runserver 0.0.0.0:8000" - volumes: - - .:/sigi - ports: - - "8000:8000" - links: - - localhost +#localhost: +# image: postgres +# environment: +# POSTGRES_PASSWORD: sigi +# POSTGRES_USER: sigi +# POSTGRES_DB: sigi +# ports: +# - "5532:5432" +#web: +# build: . +# command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000" +# volumes: +# - .:/sigi +# ports: +# - "8000:8000" +# links: +# - localhost osticket: image: campbellsoftwaresolutions/osticket diff --git a/sigi/apps/casas/models.py b/sigi/apps/casas/models.py index 6ae4e4a..e13cabf 100644 --- a/sigi/apps/casas/models.py +++ b/sigi/apps/casas/models.py @@ -243,7 +243,7 @@ class CasaLegislativa(models.Model): return codigo def __unicode__(self): - return self.nome + return self.nome + ' - ' + self.municipio.uf.sigla def save(self, *args, **kwargs): address_changed = False diff --git a/sigi/apps/servidores/models.py b/sigi/apps/servidores/models.py index e835815..1b6980f 100644 --- a/sigi/apps/servidores/models.py +++ b/sigi/apps/servidores/models.py @@ -63,7 +63,7 @@ class Servidor(models.Model): ) # usuario responsavel pela autenticaĆ§Ć£o do servidor no sistema - user = models.ForeignKey(User, unique=True) + user = models.OneToOneField(User, unique=True) nome_completo = models.CharField(max_length=128) apelido = models.CharField(max_length=50, blank=True) # caminho no sistema para arquivo com a imagem