[Answered ]-How to get page parent when using Django flatpages?

2👍

As far as I know, django doesn’t have a native concept of sections and, as you said, the URLs are arbitrary (they’re left to the programmer to decide). If you stick with the same URL structure throughout your whole site (/<section>/page) then you can infer the section from the URL.

I’d rather set the section in the url patterns and pass it to the views (as described in here) which in turn can pass it to the templates…

0👍

flatpages are essentially the same thing as static html pages, stored in your database with a pretty admin in front of it.

so just hard code a link, it shouldn’t be a big deal.

if it is a big deal, that means flatpages probably isn’t the solution for you

👤phillc

Leave a comment