I have a clean
function for my form, and in it I have the below:
tags = cleaned_data.get("tags")
logger.info('got to clean function ' + str(tags))
When I output the tags
value, I see: [ '1', '2', '3' ]
. In my template, when I want to recreate the html for it, I have a template_tag:
@register.simple_tag
def generate_tags(tags):
print str(tags)
# Code to produce the html
and I'm calling it via: {% generate_tags form.tags %}
.
However, when I finish the print
command in the template function im getting:
<input type="hidden" name="event_tags" value="3" id="id_event_tags_0" />
Why isn't it giving me the array as I was seeing in the clean function?? Is there a way for me to get the array before the clean
function is called?