-
Notifications
You must be signed in to change notification settings - Fork 10
Aprimorar nomes dos relacionamentos de Journal representados por InlinePanel #1313
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
Changes from all commits
4e187ee
41c2b79
a67034e
e33a7f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Generated by Django 5.2.7 on 2026-02-07 22:46 | ||
|
|
||
| from django.db import migrations | ||
| import modelcluster.fields | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("journal", "0057_artificialintelligence"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| # Rename related_name: journalsocialnetwork -> social_networks | ||
| migrations.AlterField( | ||
| model_name="journalsocialnetwork", | ||
| name="page", | ||
| field=modelcluster.fields.ParentalKey( | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="social_networks", | ||
| to="journal.journal", | ||
| ), | ||
| ), | ||
| # Rename related_name: annotation -> notes | ||
| migrations.AlterField( | ||
| model_name="annotation", | ||
| name="journal", | ||
| field=modelcluster.fields.ParentalKey( | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="notes", | ||
| to="journal.journal", | ||
| ), | ||
| ), | ||
| # Rename related_name: accepted_documment_types -> accepted_document_types (fix typo) | ||
| migrations.AlterField( | ||
| model_name="accepteddocumenttypes", | ||
| name="journal", | ||
| field=modelcluster.fields.ParentalKey( | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="accepted_document_types", | ||
| to="journal.journal", | ||
| ), | ||
| ), | ||
| # Rename related_name: file_oa -> open_science_form_files | ||
| migrations.AlterField( | ||
| model_name="fileopenscience", | ||
| name="journal", | ||
| field=modelcluster.fields.ParentalKey( | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="open_science_form_files", | ||
| to="journal.journal", | ||
| ), | ||
| ), | ||
| # Rename related_name: ecommittee -> ethics_committee | ||
| migrations.AlterField( | ||
| model_name="ecommittee", | ||
| name="journal", | ||
| field=modelcluster.fields.ParentalKey( | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="ethics_committee", | ||
| to="journal.journal", | ||
| ), | ||
| ), | ||
| # Rename related_name: review -> peer_review | ||
| migrations.AlterField( | ||
| model_name="review", | ||
| name="journal", | ||
| field=modelcluster.fields.ParentalKey( | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="peer_review", | ||
| to="journal.journal", | ||
| ), | ||
| ), | ||
| ] |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,18 +52,18 @@ def journal_bibliographic_info_page(self, request, collection_acron3, acron): | |||||
| mission = journal.mission.get_object_in_preferred_language(language=language) | ||||||
| brief_history = journal.history.get_object_in_preferred_language(language=language) | ||||||
| focus_and_scope = journal.focus.get_object_in_preferred_language(language=language) | ||||||
| social_network = journal.journalsocialnetwork.all() | ||||||
| social_network = journal.social_networks.all() | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot journalpage tem migração para serem criadas?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Não, journalpage não precisa de migration. As mudanças em
|
||||||
| social_network = journal.social_networks.all() | |
| social_networks = journal.social_networks.all() |
Copilot
AI
Feb 7, 2026
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.
A variável local ecommittee continua usando o nome legado, mas agora aponta para journal.ethics_committee.... Para manter consistência e reduzir confusão, renomeie a variável (e a chave no context, se aplicável) para ethics_committee.
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.
@copilot crie os arquivos das migrações
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.
Arquivo de migração criado em commit e33a7f2. O arquivo
0058_rename_journal_inline_panel_related_names.pydocumenta as alterações dos related_name para os 6 modelos (JournalSocialNetwork, Annotation, AcceptedDocumentTypes, FileOpenScience, Ecommittee, Review).