Wykres commitów

10 Commity (98de86f49dfc68559dbd4539dcc9e409bf7f0a91)

Autor SHA1 Wiadomość Data
Jaap Joris Vens 98de86f49d Blackify everything 2021-07-04 01:59:48 +02:00
Jaap Joris Vens d8d54ea4c4 Refactor forms.py: quite elegant and reusable Page _and_ Section forms. Both
work with the same edit.html template. Finally you can edit sections
individually!
2020-03-13 23:08:21 +01:00
Jaap Joris Vens 25770feb57 I can't believe it actually works! 2020-02-19 20:13:43 +01:00
Jaap Joris Vens c0464a5ab6 Simplify CRUD logic
Whe needs CRUD? If a page exists, you edit it. If it doesn't, the same form
creates it. No more sections on a page? It gets automatically deleted. The
only thing the user has to remember is: nothing. Brilliant, right?
2020-02-19 16:35:23 +01:00
Jaap Joris Vens 5f5f303187 A new templatetag 'includesection' now renders a section with its own
context, as provided by the polymorphic subsection's registered view.

Also, I'm trying to move all the website-related cruft from cms into the
example project, so that only the Page and Section models with their own
"admin" views will remain.
2020-01-05 03:36:23 +01:00
Jaap Joris Vens d166e10b05 First draft of version 2.0.0
Oh boy! This is a big one. Two new dependencies: swapper and
django-polymorphic will now allow any project that uses cms to elegantly
extend the default Section model with custom fields and custom subclasses.
This is still a work in progress.
2019-12-31 13:05:12 +01:00
Jaap Joris Vens dc9744c5eb Make it easier to extend the default PageView.
First, extend BasePageView and add stuff to the context that your sections
need. Second, create a URLConf entry pointing to your new class. Third,
extend the base.html nav block and change the {% url cms:page %} to its new
name.

It seems so easy in hindsight...
2019-12-28 03:05:30 +01:00
Jaap Joris Vens 7997d7af0f add support for subsections 2019-08-23 17:19:40 +02:00
Jaap Joris Vens 7446b928a4 only add sections to existing pages to work around formset bug 2019-04-27 13:06:09 +02:00
Jaap Joris Vens d4ae47a746 first commit :) 2019-03-27 16:49:14 +01:00