Django getlist() function
I have a tags generator for my blog site and every time I enter tags it generates a hidden html input, and it appends whenever I insert a tag like this example below.
<input type="hiiden" name="tags" value="<value of inserted tags>">
<input type="hiiden" name="tags" value="<value of inserted tags>">
<input type="hiiden" name="tags" value="<value of inserted tags>">
In my Django view I get all the tags from the form through request.POST.getlist("tags") and save it on database so the inserted tags is like this on database ['value1','value2','value3'] When I fetch the tags in the Django template through for loop to extract the strings from the arrayfield the output shows like this:
[ ' v a l u e 1 ' , ' v a l u e 2 ' , ' v a l u e 3 ' ] // one by one character output
the code works fine but the problem is it outputs character by character in the array including the brackets and the apostrophe and the commas. What i want to achieve is only the strings which are present in the array field
anyone knows what can be the solution for this? any suggestion and help is appreciated.