Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49054
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-06-24 08:51 -0700 |
| References | (2 earlier) <kq73fg$51m$2@news.grnet.gr> <6624335b-0db7-48d8-897c-be7c960a253b@googlegroups.com> <kq889f$vnl$1@news.grnet.gr> <mailman.3738.1372048685.3114.python-list@python.org> <kq8sn6$hlr$1@news.grnet.gr> |
| Message-ID | <3d4d5793-b3b2-4225-9ac6-6fbbfc3a74c4@googlegroups.com> (permalink) |
| Subject | Re: Making a pass form cgi => webpy framework |
| From | rusi <rustompmody@gmail.com> |
On Monday, June 24, 2013 1:02:51 PM UTC+5:30, Νίκος wrote: > And also in my pelatologio.py and other script i use if statements to > check if user submitted data or not so to print them on screen and then > exit, like modularization. > > > > foe example: > > if( log ): > name = log > print this and this > > if( seek ): > other statements > print this and this > > > How will i be able to do this if i use an html template > every time an if() runs all the html will run and not a part of it. Every significant templating system has something for this eg in mako http://docs.makotemplates.org/en/latest/syntax.html#control-structures The main thing to understand is this: - When you use straight python, by default you are 'inside python' except when inside strings (inside prints) then you are 'inside html' - When using a templating engine, by default you are inside html, except when you escape from html into python
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-23 16:01 +0300
Re: Making a pass form cgi => webpy framework rurpy@yahoo.com - 2013-06-23 07:57 -0700
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-23 18:15 +0300
Re: Making a pass form cgi => webpy framework rurpy@yahoo.com - 2013-06-23 15:29 -0700
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-24 04:44 +0300
Re: Making a pass form cgi => webpy framework Michael Torrie <torriem@gmail.com> - 2013-06-23 22:37 -0600
Re: Making a pass form cgi => webpy framework rusi <rustompmody@gmail.com> - 2013-06-23 21:49 -0700
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-24 10:32 +0300
Re: Making a pass form cgi => webpy framework rusi <rustompmody@gmail.com> - 2013-06-24 08:51 -0700
Re: Making a pass form cgi => webpy framework rurpy@yahoo.com - 2013-06-25 11:00 -0700
Re: Making a pass form cgi => webpy framework Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-25 14:53 -0400
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-26 08:31 +0300
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-27 16:32 +0300
Re: Making a pass form cgi => webpy framework Cameron Simpson <cs@zip.com.au> - 2013-06-28 09:08 +1000
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-28 06:38 +0300
Re: Making a pass form cgi => webpy framework Robert Kern <robert.kern@gmail.com> - 2013-06-28 10:35 +0100
Re: Making a pass form cgi => webpy framework Νίκος <nikos@superhost.gr> - 2013-06-28 13:15 +0300
Re: Making a pass form cgi => webpy framework Robert Kern <robert.kern@gmail.com> - 2013-06-28 11:30 +0100
Re: Making a pass form cgi => webpy framework rusi <rustompmody@gmail.com> - 2013-06-28 07:28 -0700
csiph-web