coderedcorp / coderedcorp/coderedcms

Extensible blocks

Aperta
#305 16 commenti 2 reazioni 1 assegnatario Rivendicata da @jlchilders11 Vedi su GitHub
Area: Core ⚙ Area: Docs 🧾 Type: Enhancement
Lingua principale
Python
Stelle
765
Fork
154
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

#### Is your feature request related to a problem?
The blocks provided by coderedcms are great but they are difficult to extend consistently. E.g. adding a `code block` to the `CONTENT_STREAMBLOCKS` is currently only possible by overriding the `body` in all of the page models where this is required.

#### Describe the solution you'd like
#43 hinted on a solution that has so far not been implemented (correct me if I'm wrong). It would probably require all `*_STREAMBLOCK` globals in `blocks/__init__.py` to be converted to functions that will assemble the list of blocks depending on settings during the model construction. The setting could be a dictionary with entries pointing to a module with global list variables, e.g. something like this:
```
ADDITIONAL_BLOCKS = 'website.blocks' # eg. contains CONTENT_STREAMBLOCKS
```

#### Describe alternatives you've considered
See example with `body` above.

#### Additional context
I can give this a go and push a PR if you think this would be the right way to do this.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.