Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40505

Re: Embedding a for inside an html template for substitution

Newsgroups comp.lang.python
Date 2013-03-04 23:46 -0800
References <1a5a68d8-a97e-4069-a860-c7737dd5a503@googlegroups.com>
Message-ID <eb33f5bd-8cbe-48ed-98c9-c549b590d689@googlegroups.com> (permalink)
Subject Re: Embedding a for inside an html template for substitution
From nagia.retsina@gmail.com

Show all headers | View raw


Τη Δευτέρα, 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Embedding a for inside an html template for substitution Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-03-04 07:14 -0800
  Re: Embedding a for inside an html template for substitution Michael Torrie <torriem@gmail.com> - 2013-03-04 08:59 -0700
    Re: Embedding a for inside an html template for substitution Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-03-04 09:22 -0800
      Re: Embedding a for inside an html template for substitution Michael Torrie <torriem@gmail.com> - 2013-03-04 20:56 -0700
      Re: Embedding a for inside an html template for substitution Roland Koebler <r.koebler@yahoo.de> - 2013-03-05 18:16 +0100
    Re: Embedding a for inside an html template for substitution Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-03-04 09:22 -0800
  Re: Embedding a for inside an html template for substitution nagia.retsina@gmail.com - 2013-03-04 23:46 -0800

csiph-web