tags:

views:

26

answers:

2

I'm in my first week of Django development and am working on an admin page that will let me write some quick html using TinyMCE and then save it to the database. I don't need to display this web page on the site or add it to urls.py, etc. The html snippet will be loaded from the database and used in a view function.

I've read in "Practical Django Projects" how to integrate TinyMCE, so my question is more concerned with the best approach for the form itself. Specifically:

1. Is there a built-in form like flatpage that works well for this? I only need one field in the form for the html.

2. How do I save the form's text after it's entered?

I created a model with a JSONField to save the html in, but I'm not clear on what to do next. Thanks.

A: 

here is the documentation for Django Flatpages App, maybe you serve.

eos87
A: 

I ended up using the ModelAdmin class to get what I wanted. I created a new model in models.py and then used ModelAdmin to enable an admin-editable form for the model's data.

Hope this helps someone.

Ian