Skip to content

Commit

Permalink
Merge pull request #65 from ojonathacardoso/master
Browse files Browse the repository at this point in the history
Release: 3.0.5b
  • Loading branch information
ojonathacardoso authored Feb 7, 2022
2 parents 88cbcb3 + b5d58a5 commit e6c6976
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 75 deletions.
2 changes: 1 addition & 1 deletion config/rest_framework/utils/serializer_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class NestedBoundField(BoundField):
"""

def __init__(self, field, value, errors, prefix=''):
if value is None or value is '':
if value == None or value == '':
value = {}
super(NestedBoundField, self).__init__(field, value, errors, prefix)

Expand Down
14 changes: 12 additions & 2 deletions docs/atualizacao.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,27 @@ Primeiro, vamos buscar os arquivos do repositório. Para isto, você deve entrar

git pull


Após a atualização, caso nenhum erro tenha sido apresentado, é necessário atualizar o banco de dados:
Em seguida, caso nenhum erro tenha sido apresentado, é necessário atualizar o banco de dados:

::

./manage.py migrate


3) Verificar alterações necessárias conforme release
----------------------------------------------------------------------------------------

Após a atualização, é importante verificar na release lançada se exise algum procedimento que deva ser realizado, como a atualização de arquivos ou instalação/atualização de programas.

4) Reiniciar sistema
----------------------------------------------------------------------------------------

Para concluir, basta reiniciar o Supervisor:

::

sudo supervisorctl restart all

O SAAP deverá estar funcionando e atualizado.

Caso ocorreram modificações de layout, e a página ainda apareça com as configurações antigas, atualize a página usando Ctrl + Shift + R
1 change: 0 additions & 1 deletion docs/deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Com o ambiente em produção, os arquivos estáticos devem ser servidos pelo web

::

sudo rm collected_static/styles/*
./manage.py collectstatic --no-input --clear

Com isto, ele coletará todos os arquivos estáticos do projeto e os guardará no diretório no qual o NGINX irá referenciar para a aplicação.
Expand Down
58 changes: 9 additions & 49 deletions docs/instalacao.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ Instale os pacotes:
software-properties-common build-essential libxml2-dev libjpeg-dev \
libssl-dev libffi-dev libxslt1-dev python3-setuptools \
python3-pip poppler-utils antiword default-jre python3-venv \
nodejs curl vim openssh-client
curl vim openssh-client

Instale o Node.js e o Bower

::
::

curl -L https://npmjs.org/install.sh | sudo sh
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

::
::

sudo npm install npm -g
curl -L https://npmjs.org/install.sh | sudo sh

::
::

sudo npm install npm -g
sudo npm install bower -g

2) Instalar o virtualenv usando Python 3 para o projeto
Expand Down Expand Up @@ -113,15 +115,6 @@ As configurações e instruções de uso para o Git estão espalhadas pela Inter

mkvirtualenv -a /var/interlegis/saap -p python3 -r requirements/requirements.txt saap

Acesse o seu virtualenv

::

workon saap

Sempre que você der esse comando, o terminal vai automaticamente redirecioná-lo para a pasta ``/var/interlegis/saap``.


5) Configurar o banco de dados PostgreSQL
-----------------------------------------------------

Expand Down Expand Up @@ -331,40 +324,7 @@ Após isto, é necessário fazer a carga de dados básicos. Para isto, rode os c

::
./manage.py loaddata config/initial_data/auth_permission.json
./manage.py loaddata config/initial_data/auth_group.json

::

./manage.py loaddata config/initial_data/saap_cerimonial_assuntoprocesso.json
./manage.py loaddata config/initial_data/saap_cerimonial_classificacaoprocesso.json
./manage.py loaddata config/initial_data/saap_cerimonial_estadocivil.json
./manage.py loaddata config/initial_data/saap_cerimonial_nivelinstrucao.json
./manage.py loaddata config/initial_data/saap_cerimonial_operadoratelefonia.json
./manage.py loaddata config/initial_data/saap_cerimonial_parentesco.json
./manage.py loaddata config/initial_data/saap_cerimonial_pronometratamento.json
./manage.py loaddata config/initial_data/saap_cerimonial_statusprocesso.json
./manage.py loaddata config/initial_data/saap_cerimonial_tipoautoridade.json
./manage.py loaddata config/initial_data/saap_cerimonial_tipoemail.json
./manage.py loaddata config/initial_data/saap_cerimonial_tipoendereco.json
./manage.py loaddata config/initial_data/saap_cerimonial_tipolocaltrabalho.json
./manage.py loaddata config/initial_data/saap_cerimonial_tipotelefone.json
./manage.py loaddata config/initial_data/saap_cerimonial_topicoprocesso.json

::

./manage.py loaddata config/initial_data/saap_core_estado.json
./manage.py loaddata config/initial_data/saap_core_municipio.json
./manage.py loaddata config/initial_data/saap_core_bairro.json
./manage.py loaddata config/initial_data/saap_core_distrito.json
./manage.py loaddata config/initial_data/saap_core_regiaomunicipal.json
./manage.py loaddata config/initial_data/saap_core_cep.json
./manage.py loaddata config/initial_data/saap_core_tipologradouro.json
./manage.py loaddata config/initial_data/saap_core_logradouro.json
./manage.py loaddata config/initial_data/saap_core_trecho.json
./manage.py loaddata config/initial_data/saap_core_impressoenderecamento.json
./manage.py loaddata config/initial_data/saap_core_situacaomilitar.json
./manage.py loaddata config/initial_data/saap_core_partido.json
./manage.py loaddata config/initial_data/*.json

Para concluir, é necessário criar o super-usuário, que terá permissão de admin. Ele solicitará e-mail e senha.

Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

31 changes: 15 additions & 16 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
bootstrap-admin
dj-database-url==0.4.1
django>=1.9,<1.10
django-bootstrap3==7.0.1
django-bower==5.1.0
django-braces==1.8.1
django-compressor==2.0
django-crispy-forms==1.6.0
django-debug-toolbar==1.5
django-easy-audit
django-exclusivebooleanfield
django-extensions==1.6.1
django-extra-views==0.7.1
django-filter==0.13.0
Expand All @@ -13,29 +16,25 @@ django-image-cropping
django-model-utils==2.4
django-modelcluster==2.0
django-sass-processor==0.3.4
django-smart-selects
django-taggit==0.21.2
django>=1.9,<1.10
djangorestframework==3.9.1
easy-thumbnails==2.3
trml2pdf
gunicorn==19.5.0
libsass==0.11.0
psycopg2
psycopg2==2.8.6
psycopg2-binary==2.8.6
pyjwkest
python-dateutil
python-decouple==3.0
python-magic==0.4.10
python-social-auth
pytz==2016.3
pyyaml==5.1
rtyaml==0.0.2
unipath==1.1
python-magic==0.4.10
gunicorn==19.5.0
python-social-auth
git+git://github.com/interlegis/trml2pdf.git
python-dateutil
django-exclusivebooleanfield
django-smart-selects
social-auth-app-django==4
pyjwkest
psycopg2-binary==2.8.6
bootstrap-admin
django-easy-audit
sqlparse==0.1.9
django-debug-toolbar==1.4
sqlparse==0.2.0
unipath==1.1
xlwt
4 changes: 2 additions & 2 deletions saap/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
DADOS_SITE = config('DADOS_SITE');
BRASAO_PROPRIO = config('BRASAO_PROPRIO');

VERSION='3.0.4'
VERSION='3.0.5b'

INSTALLED_APPS = (
#'django_admin_bootstrapped',
Expand Down Expand Up @@ -148,7 +148,7 @@
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
],
'PAGE_SIZE': 10
#'PAGE_SIZE': 10
}

SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
Expand Down
6 changes: 4 additions & 2 deletions saap/static/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ main .navbar .navbar-nav li a > .dropdown-menu {
right: auto; }
.navbar .navbar-nav > li > .menu-right {
right: 0.5em;
left: auto; }
left: 0; }
.navbar .navbar-nav > li > .dropdown-menu {
top: 100%;
border: 0px; }
Expand Down Expand Up @@ -1121,7 +1121,9 @@ nav .navbar-nav > li:nth-child(2) > .dropdown-menu {

nav .dropdown-menu > li {
background: #1a1a00;
border: 0px; }
border: 0px;
margin-right: -10px;
}

nav .dropdown-menu > li > a {
font-size: 16px;
Expand Down
2 changes: 1 addition & 1 deletion saap/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h1 class="page-header">
<small>
Desenvolvido pelo <a href="http://www.interlegis.leg.br/">Interlegis</a> em software livre e aberto.
</small>
Release: 3.0.4
Release: 3.0.5b
</p>
</div>
<div class="col-1-3">
Expand Down

0 comments on commit e6c6976

Please sign in to comment.