Creating static pages


#1

The way the app is set up, each page requires a separate HTML file. My preference would be that there’s one “page” template and all the page content is stored in the database. How would I set it up this way? Do I need to create an app for pages similar to the way “Things” was set up, or is there an easier way. All of the page content will be simple HTML.


#2

I have something similar to this set up for my startup, WeddingLovely. There are a bunch of “todo” pages with content that I grab individually (they’re in their own HTML files but as they’re grabbed by the view individually, you can also set it up to pull from the database).

Basically you could set up a new model to hold the pieces of info, and then your view can take in an argument (so /pages/TEMPLATENAME/ and then, depending on the argument passed in, your view grabs the appropriate resource and passes it along to your template file.

Let me know if that makes sense! :)


#3

Thanks! I decided to add Mezzanine to the project. I needed a WYSIWYG editor in the admin anyway, so it solved the pages problem as well as the rich text editing.