Opened 8 years ago

Closed 8 years ago

#14963 closed (wontfix)

The Flatpages app does not resolve child models

Reported by: Omer Katz Owned by: nobody
Component: Contrib apps Version: 1.2
Severity: Keywords: contrib flatpages
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Say I have multiple uses for flatpages: Regular pages (which are just plain flat pages), Blog posts (which can inherit from flatpages but also have tags, rating etc.) and code snippets which also provide a way to format the code.
I would like to be able to create multiple models inheriting from a Flatpage model, having it registered and if it exists it will return the context of the child model instead of the flatpage model.
It's not very hard to implement, I might do it myself if you will provide me some guidance.

Change History (1)

comment:1 Changed 8 years ago by James Bennett

Resolution: wontfix
Status: newclosed

This looks like it could be handled just as easily by checking for the presence of related child objects in the template, and rendering differently based on what you want.

Also, providing a base model from which all your other stuff inherits and handles different content types isn't really the goal of contrib.flatpages; actually writing your own models for things like blog entries, etc., is likely to be a far more productive approach.

Note: See TracTickets for help on using tickets.
Back to Top