I've needed a model that stored the markup/markup_type/rendered-markup
several times and typically just made those fields manually, but just
recently when working on a few projects that all needed this behavior
I decided to wrap up this behavior as a MarkupField and post it on
django snippets (http://www.djangosnippets.org/snippets/1332/)

After writing this I realized that the best place for it IMHO seems to
be django.contrib.markup as it is somewhat useful, wouldn't get in
anyone's way, and seems too simple to justify it's own external app.

Jacob commented on Twitter that this is something that he'd
potentially like to see as well so I opened a ticket:
http://code.djangoproject.com/ticket/10317

I know that this is not the best time to start down the path of a new
feature and realize this is probably something that will wait until
1.2 but I figured I'd start the discussion now even if it has to be
put on hold and picked back up in April.

I've just attached my initial patch to the ticket (tests are on the
way but I figured opening it up to discussion before finishing the
tests was probably wise)  I also have a branch going at
http://github.com/jamesturk/django/tree/markupfield

I figure I should also answer here some of the questions that have
already been raised:

What about other types of markup?
Some have suggested supporting more types of markup but to me this
seems outside the scope of contrib.markup which currently only
supports ReST, markdown, and textile.  Should this field not meet some
peoples needs the can add their own custom markup field and base it on
this design.

3 database fields?
Someone on the ticket has already questioned this.  I'm open to
suggestions but of the various methods I thought of this looks like
the cleanest way as others seem to introduce a number of special cases.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to