Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
alcfernandes committed Apr 29, 2020
2 parents 4a33ee0 + 1d1e638 commit da2c058
Show file tree
Hide file tree
Showing 121 changed files with 5,108 additions and 114 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,28 @@ API da aplicação *SIG.Escola* da Secretaria de Educação da cidade de São Pa

License: MIT

Versão: 0.1.0
Versão: 0.2.0


## Release Notes

### 0.2.0 - 28/04/2020 - Entregas da Sprint 3
* Carga de Associações
* Carga de Usuários
* Carga de Repasses
* Cadastro de Períodos de realização de despesas
* Registro de alterações (Audit Logs) de Despesas
* Registro de alterações (Audit Logs) de Receitas
* Consulta de despesas no Admin
* Consulta de receitas no Admin
* Confirmação de repasses pela Associação
* Alerta na despesa sobre o uso de especificações do Sistema de Bens Patrimoniais Móveis do PMSP
* Filtros diversos para consulta de despesas
* Filtros diversos para consulta de receitas
* Cadastro de Associações
* Registro de fornecedores usados
* Consulta de informações para o Painel de Ações da Associação

### 0.1.0 - 07/04/2020 - Entregas da Sprint 2
* Autenticação de usuário
* Cadastro de despesas
Expand Down
7 changes: 6 additions & 1 deletion config/api_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
from sme_ptrf_apps import __version__
from sme_ptrf_apps.despesas.api.views.despesas_viewset import DespesasViewSet
from sme_ptrf_apps.despesas.api.views.especificacoes_viewset import EspecificacaoMaterialServicoViewSet
from sme_ptrf_apps.despesas.api.views.fornecedores_viewset import FornecedoresViewSet
from sme_ptrf_apps.despesas.api.views.rateios_despesas_viewset import RateiosDespesasViewSet
from sme_ptrf_apps.receitas.api.views import ReceitaViewSet, RepasseViewSet
from sme_ptrf_apps.users.api.views import LoginView, UserViewSet
from sme_ptrf_apps.receitas.api.views import ReceitaViewSet
from sme_ptrf_apps.core.api.views import AssociacoesViewSet


@api_view()
Expand All @@ -27,6 +29,9 @@ def versao(request):
router.register("especificacoes", EspecificacaoMaterialServicoViewSet)
router.register("rateios-despesas", RateiosDespesasViewSet)
router.register("receitas", ReceitaViewSet)
router.register("fornecedores", FornecedoresViewSet)
router.register("associacoes", AssociacoesViewSet)
router.register("repasses", RepasseViewSet, basename='repasses-pendentes')

app_name = "api"
urlpatterns = router.urls
Expand Down
45 changes: 29 additions & 16 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import environ
import datetime

ROOT_DIR = (
environ.Path(__file__) - 3
Expand Down Expand Up @@ -71,6 +72,8 @@
"django.contrib.messages",
"django.contrib.staticfiles",
# "django.contrib.humanize", # Handy template tags
'admin_interface', # Para o django-admin-interface. Tem que estar antes do django.contrib.admin
'colorfield', # Para o django-admin-interface. Tem que estar antes do django.contrib.admin
"django.contrib.admin",
"django.forms",
]
Expand All @@ -80,7 +83,10 @@
"allauth.account",
"allauth.socialaccount",
"rest_framework",
"auditlog",
"django_celery_beat",
"django_filters",
"rangefilter",
]

LOCAL_APPS = [
Expand All @@ -103,14 +109,14 @@
# https://docs.djangoproject.com/en/dev/ref/settings/#authentication-backends
AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
#"allauth.account.auth_backends.AuthenticationBackend",
]
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-user-model
AUTH_USER_MODEL = "users.User"
# https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url
LOGIN_REDIRECT_URL = "users:redirect"
# LOGIN_REDIRECT_URL = "users:redirect"
# https://docs.djangoproject.com/en/dev/ref/settings/#login-url
LOGIN_URL = "account_login"
# LOGIN_URL = "account_login"

# PASSWORDS
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -147,6 +153,8 @@
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.common.BrokenLinkEmailsMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"sme_ptrf_apps.jwt_middleware.JWTAuthenticationMiddleware",
"auditlog.middleware.AuditlogMiddleware",
]

# STATIC
Expand Down Expand Up @@ -291,18 +299,18 @@
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
# django-allauth
# ------------------------------------------------------------------------------
ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True)
# https://django-allauth.readthedocs.io/en/latest/configuration.html
ACCOUNT_AUTHENTICATION_METHOD = "username"
# https://django-allauth.readthedocs.io/en/latest/configuration.html
ACCOUNT_EMAIL_REQUIRED = True
# https://django-allauth.readthedocs.io/en/latest/configuration.html
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
# https://django-allauth.readthedocs.io/en/latest/configuration.html
ACCOUNT_ADAPTER = "sme_ptrf_apps.users.adapters.AccountAdapter"
# https://django-allauth.readthedocs.io/en/latest/configuration.html
SOCIALACCOUNT_ADAPTER = "sme_ptrf_apps.users.adapters.SocialAccountAdapter"
# django-compressor
# ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True)
# # https://django-allauth.readthedocs.io/en/latest/configuration.html
# ACCOUNT_AUTHENTICATION_METHOD = "username"
# # https://django-allauth.readthedocs.io/en/latest/configuration.html
# ACCOUNT_EMAIL_REQUIRED = True
# # https://django-allauth.readthedocs.io/en/latest/configuration.html
# ACCOUNT_EMAIL_VERIFICATION = "mandatory"
# # https://django-allauth.readthedocs.io/en/latest/configuration.html
# ACCOUNT_ADAPTER = "sme_ptrf_apps.users.adapters.AccountAdapter"
# # https://django-allauth.readthedocs.io/en/latest/configuration.html
# SOCIALACCOUNT_ADAPTER = "sme_ptrf_apps.users.adapters.SocialAccountAdapter"
# # django-compressor
# ------------------------------------------------------------------------------
# https://django-compressor.readthedocs.io/en/latest/quickstart/#installation
INSTALLED_APPS += ["compressor"]
Expand All @@ -320,5 +328,10 @@
}
# Your stuff...
# ------------------------------------------------------------------------------

JWT_AUTH = {
# TODO: rever a configuração...
'JWT_EXPIRATION_DELTA': datetime.timedelta(hours=100),
'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(hours=100),
'JWT_ALLOW_REFRESH': True,
}
CORS_ORIGIN_ALLOW_ALL = True
14 changes: 14 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ django-allauth==0.41.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==1.9.0 # https://github.com/django-crispy-forms/django-crispy-forms
django-compressor==2.4 # https://github.com/django-compressor/django-compressor
django-redis==4.11.0 # https://github.com/niwinz/django-redis
django-admin-rangefilter==0.5.4 # https://github.com/silentsokolov/django-admin-rangefilter

# Django REST Framework
djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework
Expand All @@ -29,3 +30,16 @@ django-filter==2.2.0
djangorestframework-jwt==1.11.0 # https://getblimp.github.io/django-rest-framework-jwt/

django-cors-headers # https://github.com/adamchainz/django-cors-headers

# Para gravação de log de alterações nos modelos
# https://django-auditlog.readthedocs.io/en/latest/index.html
# Pegando última versão diretamente do repositório oficial.
-e git://github.com/jjkester/django-auditlog.git##egg=auditlog

# Para validação e formatação de CNPJ e CPF
# https://github.com/poliquin/brazilnum
brazilnum==0.8.8

# Para melhoria da aparência do Django Admin
# https://github.com/fabiocaccamo/django-admin-interface
django-admin-interface==0.12.2
1 change: 1 addition & 0 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ django-stubs==1.4.0 # https://github.com/typeddjango/django-stubs
pytest==5.3.5 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar
model-bakery==1.1.0 # https://model-bakery.readthedocs.io/en/latest/index.html
freezegun==0.3.12 # https://github.com/spulec/freezegun

# Code quality
# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion sme_ptrf_apps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.0"
__version__ = "0.2.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
Expand Down
Loading

0 comments on commit da2c058

Please sign in to comment.