-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adiciona o modelo de instituição, relacionamentos com os diretórios, ajustes no modelos de usefulmodels e Django celery results como dependência #28
Conversation
…rios com localização e com instituição, adiciona uma dependencia django_celery_results.
config/settings/base.py
Outdated
<<<<<<< HEAD | ||
"django_celery_results", | ||
======= | ||
>>>>>>> 7c5856c646a1e46545e841cea751b9cb4bea254c | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs viu isso?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robertatakenaka esse é de um commit errado já está corrigido, veja nesse commit: https://github.com/scieloorg/scms-oca/pull/28/files#diff-f7a16228131ae92457c22657bb33458207a7578b8cdb6ff796153916fa67a22d
disclosure_directory/models.py
Outdated
locations = models.ManyToManyField(Location, blank=True) | ||
institutions = models.ManyToManyField(Institution, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs acho que em eventos há dois tipos de instituição.
- Onde ocorrerá o evento, inclusive pode ser somente online. Então, o nome pode ser
location
(singular), mas o modelo é Institution. - Quem organiza ou promove o evento, então o nome do campo é organizers do modelo Institution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robertatakenaka vou verificar, mas suspeito que não é possível termos dois relacionamentos para a mesma entidade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs hum... ok... podemos assumir que o "local" onde ocorre é indicado pelo título então pode deixar o location.
disclosure_directory/models.py
Outdated
locations = models.ManyToManyField(Location, blank=True) | ||
institutions = models.ManyToManyField(Institution, blank=True) | ||
|
||
is_online = models.BooleanField(default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No lugar de is_online
, usar attendence
, com os valores:
Live – All attendees are physically present in one location
Virtual – People attend the event entirely online
Hybrid – Some people attend in person, others online
education_directory/models.py
Outdated
locations = models.ManyToManyField(Location, blank=True) | ||
institutions = models.ManyToManyField(Institution, blank=True) | ||
|
||
is_online = models.BooleanField(default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs os mesmos comentários feitos para Eventos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs a diferença que aqui onde ocorre e quem organiza é a mesma... mas melhor deixar explícito vai que acontece de serem diferentes...
infrastructure_directory/models.py
Outdated
@@ -18,10 +20,13 @@ class Meta: | |||
description = models.TextField(_("Description"), max_length=255, | |||
null=True, blank=True) | |||
|
|||
institution = models.ManyToManyField(Institution, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
colocar institution
no plural se é pelo menos 1
|
||
class Institution(CommonControlField, ClusterableModel): | ||
name = models.CharField(_("Name"), max_length=255, null=True, blank=True) | ||
institution_type = models.CharField(_("Institution Type"), choices=choices.inst_type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adicionar 3 campos: sublevel1, sublevel2, sublevel3, todos opcionais, obrigatórios se existirem.
adicionar 1 campo de controle do registro: origem do dado (fonte). Isso informará se é um dado padronizado ou não
location/wagtail_hooks.py
Outdated
search_fields = ('region', 'city', 'state', 'country', ) | ||
list_export = ('region', 'city', 'state', 'country', ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colocar em ordem:
country, region, state, city ou
city, state, region, country
institution/models.py
Outdated
def __unicode__(self): | ||
return self.name | ||
|
||
def __str__(self): | ||
return self.name | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs name é pouco para identificar uma instituição, adicionar dados de location
education_directory/models.py
Outdated
@@ -28,15 +32,37 @@ class Meta: | |||
end_time = models.TimeField(_("End Time"), max_length=255, | |||
null=True, blank=True) | |||
|
|||
locations = models.ManyToManyField(Location, blank=True) | |||
institutions = models.ManyToManyField(Institution, blank=True) | |||
thematic_areas = models.ManyToManyField(ThematicArea, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs por que não há 3 campos?
from wagtail.documents.edit_handlers import DocumentChooserPanel | ||
|
||
from core.models import CommonControlField | ||
from .forms import InfrastructureDirectoryForm, InfrastructureDirectoryFileForm | ||
from institution.models import Institution | ||
from usefulmodels.models import ThematicArea, Pratice, Action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitnnolabs poderia ter feito como choice. Agora fica como modelo, só que tem que estar preenchido.
…kefile, geração dos arquivos de tradução .po(s) e.mo(s)
Altera os logos e alguns textos da interface administrativa.
O que esse PR faz?
Esse PR resolve o tk #15, #19, #20 e #27, além de algum ajuste verificado em tempo de implementação.
Onde a revisão poderia começar?
Sugiro subir uma instância para verificar as alterações e para testar
Como este poderia ser testado manualmente?
Sugiro subir uma instância para verificar as alterações e para testar
Algum cenário de contexto que queira dar?
Esse PR visa principalmente definir a localização para as entidades de diretórios e suas instituições.
IMPORTANTE: As ações em massa para essa alteração de modelo não foram ajustadas como estamos adicionando campos que são repetitivos, sugiro criarmos um tíquete para definirmos um padrão para esse tipo de campo.
Screenshots
Quais são tickets relevantes?
Tk #15
Tk #20
Referências
N/A