Skip to content
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

Merged
merged 9 commits into from
Aug 21, 2022

Conversation

gitnnolabs
Copy link
Collaborator

@gitnnolabs gitnnolabs commented Aug 15, 2022

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

Captura de Tela 2022-08-16 às 08 49 10
Captura de Tela 2022-08-16 às 08 48 53
Captura de Tela 2022-08-16 às 08 48 46
Captura de Tela 2022-08-16 às 08 48 37
Captura de Tela 2022-08-16 às 08 48 31
Captura de Tela 2022-08-16 às 08 48 20
Captura de Tela 2022-08-16 às 08 48 15
Captura de Tela 2022-08-16 às 08 47 59

Quais são tickets relevantes?

Tk #15
Tk #20

Referências

N/A

@gitnnolabs gitnnolabs added the enhancement New feature or request label Aug 15, 2022
@gitnnolabs gitnnolabs self-assigned this Aug 15, 2022
Comment on lines 124 to 128
<<<<<<< HEAD
"django_celery_results",
=======
>>>>>>> 7c5856c646a1e46545e841cea751b9cb4bea254c
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gitnnolabs viu isso?

Copy link
Collaborator Author

@gitnnolabs gitnnolabs Aug 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 33 to 34
locations = models.ManyToManyField(Location, blank=True)
institutions = models.ManyToManyField(Institution, blank=True)
Copy link
Member

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.

  1. Onde ocorrerá o evento, inclusive pode ser somente online. Então, o nome pode ser location (singular), mas o modelo é Institution.
  2. Quem organiza ou promove o evento, então o nome do campo é organizers do modelo Institution

Copy link
Collaborator Author

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.

Copy link
Member

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.

locations = models.ManyToManyField(Location, blank=True)
institutions = models.ManyToManyField(Institution, blank=True)

is_online = models.BooleanField(default=False)
Copy link
Member

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

Comment on lines 32 to 35
locations = models.ManyToManyField(Location, blank=True)
institutions = models.ManyToManyField(Institution, blank=True)

is_online = models.BooleanField(default=False)
Copy link
Member

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

Copy link
Member

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...

@@ -18,10 +20,13 @@ class Meta:
description = models.TextField(_("Description"), max_length=255,
null=True, blank=True)

institution = models.ManyToManyField(Institution, blank=True)
Copy link
Member

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,
Copy link
Member

@robertatakenaka robertatakenaka Aug 16, 2022

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

Comment on lines 28 to 29
search_fields = ('region', 'city', 'state', 'country', )
list_export = ('region', 'city', 'state', 'country', )
Copy link
Member

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

Comment on lines 25 to 30
def __unicode__(self):
return self.name

def __str__(self):
return self.name

Copy link
Member

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

@@ -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)
Copy link
Member

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
Copy link
Member

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)
@gitnnolabs gitnnolabs merged commit 284a318 into scieloorg:main Aug 21, 2022
robertatakenaka pushed a commit to robertatakenaka/scms-oca that referenced this pull request Sep 27, 2022
Altera os logos e alguns textos da interface administrativa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants