Opened 8 years ago

Last modified 11 months ago

#27109 new New feature

Make Flatpage swappable

Reported by: Vlastimil Zíma Owned by: nobody
Component: contrib.flatpages Version: dev
Severity: Normal Keywords:
Cc: Ülgen Sarıkavak Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:How to create a pull request

Description

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

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

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.

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (5)

comment:1 by Aymeric Augustin, 8 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Vlastimil Zíma, 8 years ago

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

comment:3 by Aymeric Augustin, 8 years ago

Yes, submitting a pull request is the next step.

The most important part is likely documentation.

comment:4 by Tim Graham, 8 years ago

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.

comment:5 by Ülgen Sarıkavak, 11 months ago

Cc: Ülgen Sarıkavak added
Note: See TracTickets for help on using tickets.
Back to Top