Reorganiza admin Wagtail, SVG, logo e indexação de imagens#79
Merged
Conversation
Menu alinhado ao fluxo RCT; upload SVG; logo via admin_logo; corrige title_text na indexação e imports em markup_doc/wagtail_hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que esse PR faz?
Conjunto de melhorias no admin Wagtail e na configuração editorial do markapi:
1. Menu lateral (fluxo RCT)
Ordem centralizada em
config/menu.py:markup_doc)xml_manager)reference)tracker)model_ai)django_celery_beat)Rótulos e ícones atualizados em todos os
wagtail_hooks.pydos módulos. Grupo Marcação editorial: Coleções → Periódicos → Carregar DOCX → XML SPS marcado. RemovidosModelAdminlegados não registados emmarkup_doc.2. Upload de SVG
WAGTAILIMAGES_EXTENSIONSemconfig/settings/base.pyincluisvg(e formatos raster habituais).3. Logo do admin
Templates em
core_settings/templates/wagtailadmin/usamsettings.core_settings.customsettings.admin_logona sidebar e no login. CSS emcore_settings/static/core_settings/css/admin_logo.css. Fallback para logo Wagtail se não houver imagem.4. Indexação de imagens (
title_text)Migração
core/migrations/0002_wagtailsearch_indexentry_text_defaults.py: preencheNULLe defineDEFAULT ''emtitle_text/body_textquando as colunas existem (corrigeIntegrityErrorao indexar imagens com schema Wagtail 7 e código de indexação que omite esses campos).Signal em
core/wagtail_hooks.py: define título da imagem a partir do nome do ficheiro quando vazio.5. Correções em
markup_doc/wagtail_hooks.pyRestaura imports (
path,format_html,static,TemplateResponse,update_xml) e resolve conflito de merge.Onde a revisão poderia começar?
Como este poderia ser testado manualmente?
python manage.py migrate/admin/admin_logo(SVG) e recarregar admin — logo na sidebar e em/admin/login/.svgsem erroIntegrityErroremwagtailsearch_indexentryAlgum cenário de contexto que queira dar?
Alinhar versão instalada de
wagtailcom migrações já aplicadas na base (recomendado Wagtail 7.4 LTS sewagtailsearch.0010_add_text_fieldsexistir). A migração emcoremitiga desalinhamento entre schema e indexador. SVG em produção: restringir upload a utilizadores de confiança.Screenshots
N/A
Quais são tickets relevantes?
N/A
Referências
.cursor/rules/project-objectives.mdc