On Saturday, February 19, 2011 3:04:27 PM UTC, NewNumOrder wrote: > > I've tried enabling 'allow_tags' for a TextField, but the admin tools > still encode the text when inserting or updating rows. > > Is the following code correct? > some_field = models.TextField() > some_field.allow_tags = True > > I can't even edit the HTML with phpPgAdmin because it does the same > thing, so I'm forced to use pure SQL. Imagine updating a field with > 5000+ char HTML with SQL ;) > > I hope somebody here knows a way to edit HTML from a DB more > conveniently... Even if it's not Django-based. >
No, allow_tags has nothing to do with textfields. Django doesn't encode text when saving data from a textfield. It does encode - actually, escape - the text when it is *output*, which you can avoid by marking it as safe with the `safe` template filter. But nothing will be changed on the way in. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.