Having a heck of a time modifying the admin site to use
MultiValueField and MultiWidgets.
The concept
I am building a cms with page regions, I need to render a dynamic # of
textareas on the admin site and have them combine into a single
database field in the db.
I currently have a static # of fields working for displaying the
content on the admin, but the save method is never executed and no
errors are thrown.
Here is a pastebin with example snippets.
http://pastebin.com/f392604d6
Any help resolving this issue would be greatly appreciated. Also any
direction on how to pass in another field from the database model
'page_template' to the MultiWidget/MultiValueField to dynamically
render the fields () and widgets () tuples would be awesome!
Thanks ahead of time
Eric
On Feb 10, 9:26 pm, djangomg <e...@vianet.ca> wrote:
>
> I am building a cms with page regions, I need to render a dynamic # of
> textareas on the admin site and have them combine into a single
> database field in the db.
Wrong approach IMHO. If you have multiple page regions per page, each
needing it's own textarea, then you should have a PageRegion model
object, with a ForeignKey pointing to the page object.
My 2 cents.