coderedcorp / coderedcorp/coderedcms

Make built-in models abstract

Ouverte
#56 8 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Area: Core ⚙ skill: coderedcms Type: Tech Debt
Langage dominant
Python
Étoiles
765
Forks
154
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

If we want to continue using CODERED_FRONTEND_* settings (which I think we do, they will be the foundation of themes), we will have to make everything that uses our streamfield blocks abstract.

The issue is, many coderedcms models use streamfield blocks that pull values from CODERED_FRONTEND_* settings. Which means if you change one of these settings in your project, it triggers a migration in coderedcms. Which is a bad practice and leads to endless migrations.

This fits in with the paradigm we have been following with the page types. Provide beefy abstract models, and provide a very basic concrete model boilerplate in the project template.

One caveat to making the snippets abstract, is that we will no longer be able to provide a snippet chooser, or hard-code templates that pull in navbar/footer snippets. So this will have to be thought through to figure out how to gracefully handle all of this without re-defining everything in the project template (which would be too much boilerplate I think).

Anyhow, this pretty major regarding future stability. Implementing it will inevitably be a breaking change. But there is no other way to have dynamic blocks and themes. So I think it is necessary.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par recenser les modèles intégrés, les blocs StreamField, les settings CODERED_FRONTEND_*, la gestion des snippets et le template de projet mentionné dans l’issue. Déterminez comment des modèles abstraits affecteraient la sélection des snippets, les templates de navbar/footer et les migrations ; le travail sera considéré comme terminé lorsqu’une conception documentée évitera les migrations de settings spécifiques au projet sans boilerplate excessif.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
django, python
Domaine
backend, content
Type d'issue
Refactorisation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.