Embedding a for inside an html template for substitution
nagia.retsina at gmail.com
nagia.retsina at gmail.com
Tue Mar 5 02:46:53 EST 2013
Τη Δευτέρα, 4 Μαρτίου 2013 5:14:00 μ.μ. UTC+2, ο χρήστης Νίκος Γκρ33κ έγραψε:
> Hello pythonistas!
>
>
>
> I'am tryign to populate a table with dictionary keys and values:
>
>
>
> Foe that iam using an html template and the questions is what i should write inside 'files.html' so then then the python script populate the table.
>
>
>
> <table>
>
> <tr><th>SuperHost - Economy</th></tr>
>
> <tr><td>Χώρος στο δίσκο: 1 GB</td></tr>
>
> <tr><td>Μηνιαία Κίνηση δεδομένων: 1 GB</td></tr>
>
> <tr><td>Control Panel: cPanel 11 & Fantastico Deluxe</td></tr>
>
> <tr><td>Domains: 1</td></tr>
>
> <tr><td>Subdomains: 1</td></tr>
>
> <tr><td>FTP Accounts: 1</td></tr>
>
> <tr><td>Emails (POP3): 2</td></tr>
>
> <tr><td>WebMail: [ RoundCube|Horde|Squirrel ]: ΝΑΙ</td></tr>
>
> <tr><td>Mysql Databases: 2</td></tr>
>
> </table>
>
>
>
> Instead of writing the above html data inside my html template how would i write it with a for that then will be substituted by the python script?
>
>
>
> can you please write an example for me that user "files.html" and gets populates by "files.py" ?
>
>
>
> i want os ee how it lloks like please!
>
>
>
> Thank you.
Thank you Michael, i have decided to use cheetahtemplate. It seems nice and simple, djanfo indeed is an overkill for me needs.
More information about the Python-list
mailing list