[Django] #27109: Make Flatpage swappable

6 views
Skip to first unread message

Django

unread,
Aug 23, 2016, 4:01:27 AM8/23/16
to django-...@googlegroups.com
#27109: Make Flatpage swappable
-----------------------------------+--------------------
Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: contrib.flatpages | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
It's kind of a long shot, but I give it a try.

Let's make `Flatpage` swappable. I've opened a discussion about the
feature at https://groups.google.com/d/msg/django-developers/WFdCEpB-
fMM/6rRae4QLBgAJ. Despite the little support at developers, I suspect the
swap would be used once available.

There is a number of attempts to extend the flatpages

* #18331
* #23743
* #26762
* https://groups.google.com/d/msg/django-users/hl4dO1Lxi7Y/aE82ZjNxB-cJ
* https://groups.google.com/d/msg/django-users/XluinfrJaK8/5G2ioMt5HVwJ

Since it is not possible to inherit custom `Flatpage` from an abstract
`Flatpage` model, there are two options. Make an extra table which
generates join on every use, which is ineffective, or copy the whole
`Flatpage` application, which is terrible to maintain. There is number of
projects which extends the `Flatpage` by copying the whole model

* https://github.com/danawoodman/django-flatpages-plus
* https://github.com/PragmaticMates/django-flatpages-i18n
* https://github.com/toastdriven/django-superflatpages
* https://github.com/FUUK/fuuk/tree/master/fuuk/fuflatpages

I assume the lack of support at developers mailing list is caused by
developers who needed to extend `Flatpage` already did it one way or
another, it most cases by copying the `flatpages` app as is.

The `swappable` is already implemented, so let's use it.

--
Ticket URL: <https://code.djangoproject.com/ticket/27109>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 23, 2016, 5:23:00 AM8/23/16
to django-...@googlegroups.com
#27109: Make Flatpage swappable
-----------------------------------+------------------------------------

Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: contrib.flatpages | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27109#comment:1>

Django

unread,
Aug 23, 2016, 5:28:19 AM8/23/16
to django-...@googlegroups.com
#27109: Make Flatpage swappable
-----------------------------------+------------------------------------
Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: contrib.flatpages | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by vzima):

Great. So what now? Should I try to make a patch if I find a time to do
so?

--
Ticket URL: <https://code.djangoproject.com/ticket/27109#comment:2>

Django

unread,
Aug 23, 2016, 5:35:09 AM8/23/16
to django-...@googlegroups.com
#27109: Make Flatpage swappable
-----------------------------------+------------------------------------
Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: contrib.flatpages | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by aaugustin):

Yes, submitting a pull request is the next step.

The most important part is likely documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/27109#comment:3>

Django

unread,
Aug 23, 2016, 8:42:09 AM8/23/16
to django-...@googlegroups.com
#27109: Make Flatpage swappable
-----------------------------------+------------------------------------
Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: contrib.flatpages | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by timgraham):

Before introducing another swappable model, I'd like to see the
documentation about some of the known difficulties with swappable models
addressed: #24370 and #25313.

--
Ticket URL: <https://code.djangoproject.com/ticket/27109#comment:4>

Django

unread,
Mar 12, 2024, 2:41:50 AM3/12/24
to django-...@googlegroups.com
#27109: Make Flatpage swappable
-----------------------------------+------------------------------------
Reporter: Vlastimil Zíma | Owner: nobody
Type: New feature | Status: new
Component: contrib.flatpages | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/27109#comment:5>
Reply all
Reply to author
Forward
0 new messages