Try to use "safe" filter in which case table will be interpreted as HTML

{{ dftable|safe }} or as second solution, call dftable.allow_tags=True in 
the view.

On Saturday, June 22, 2013 9:35:01 AM UTC+2, Nigel Legg wrote:
>
> I want to allow users to upload a file and then view the data from it.  So 
> I have sorted out the file upload, and converting the file to a pandas 
> dataframe, and then creating an HTML table of df.head().  The template 
> looks like 
>
> <!DOCTYPE HTML>
>
> <html>
>     <head>
>         <meta charset="ut-8">
>         <title>File View</title>
>     </head>
>
>     <body>
>         File name: {{docfile_name}}<p>
>
>         {{dftable}}
>
>     </body>
> </html>
> [dftable is the variable I used for writing the html to. 
> And the attached image shows how this looks on screen.  
> How can I get this HTML table to show on the web page?
> Many thanks, 
>
> Regards,
> Nigel Legg
> 07914 740972
> http://twitter.com/nigellegg
> http://uk.linkedin.com/in/nigellegg
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to