Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'tutorial': 0.03; 'django.': 0.05; 'subject:form': 0.07; 'statements': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'django': 0.11; 'question.': 0.14; 'template': 0.14; 'data)': 0.16; 'email addr:yahoo.com>': 0.16; 'spurious': 0.16; 'stuff.': 0.16; 'subject:pass': 0.16; 'webpy': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'discussion': 0.18; 'variable': 0.18; 'trying': 0.19; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'affects': 0.24; 'helpful': 0.24; "haven't": 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'script': 0.25; '>': 0.26; 'header:In-Reply- To:1': 0.27; 'tried': 0.27; 'idea': 0.28; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'gives': 0.31; 'code': 0.31; 'easier': 0.31; 'usually': 0.31; '25,': 0.31; 'cgi': 0.31; 'stuff': 0.32; 'text': 0.33; 'url:python': 0.33; 'becomes': 0.33; 'framework': 0.33; 'actual': 0.34; 'table': 0.34; 'there,': 0.34; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'templates': 0.36; 'url:listinfo': 0.36; 'similar': 0.36; 'url:org': 0.36; 'sometimes': 0.38; 'skip:& 10': 0.38; 'needed': 0.38; 'files': 0.38; 'pm,': 0.38; 'use.': 0.39; 'url:mail': 0.40; 'how': 0.40; 'even': 0.60; 'skip:u 10': 0.60; 'simple': 0.61; 'kind': 0.63; 'more': 0.64; 'hours': 0.66; 'rendering': 0.68; 'wish': 0.70; 'theoretical': 0.74; 'to:addr:yahoo.com': 0.81; 'reading,': 0.84; 'subject:Making': 0.84; 'joel': 0.91; 'hands': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=B2Z6or4a3omiLqsKcViP0IXFfbCYLidNgdC41NVXjWg=; b=bkL/Z4Hc1o8SCBQkojuE0B7Qx3BbUdO7EY143/Xd5pcl02AS6WslJd2jVlz6hDM0qT s3gbAiRvny6+qoSFJnkpFkvFdRkIIj3VMDZ4EIPIIW0ySpeuKYFWcCdv3Q+yrKNm29Ft OHkfeOb7+ocVKTKy04WzGcc2z3VaoYur9BuNCglQwasEJQU9TupuQeeruSR8UUFoEtqx xtNrsMOqcyyavDgL3p/PDXQvlC2IOIxN7eQNCS4KG+YUfa8E2Z3yy1Tb+YUEu5S2R1HS SL5dcMZlfM2xpUdbjnXTtJFNYPaCVuNCnLs1aATL9deagOnBrTURHAoP9gcalBcc8LxF 5hVg== MIME-Version: 1.0 X-Received: by 10.220.86.202 with SMTP id t10mr184865vcl.74.1372186391273; Tue, 25 Jun 2013 11:53:11 -0700 (PDT) In-Reply-To: References: <2978d13b-ca0d-4f3b-bd62-a2fcf346c46a@googlegroups.com> <6624335b-0db7-48d8-897c-be7c960a253b@googlegroups.com> Date: Tue, 25 Jun 2013 14:53:11 -0400 Subject: Re: Making a pass form cgi => webpy framework From: Joel Goldstick To: rurpy@yahoo.com Content-Type: multipart/alternative; boundary=001a11c2dca46aeaf104dfff0a01 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 93 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372186393 news.xs4all.nl 15908 [2001:888:2000:d::a6]:53640 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49178 --001a11c2dca46aeaf104dfff0a01 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Jun 25, 2013 at 2:00 PM, wrote: > On 06/23/2013 07:44 PM, =CE=9D=CE=AF=CE=BA=CE=BF=CF=82 wrote:> Why use ma= ko's approach which > requires 2 files(an html template and the > > actual python script rendering the data) when i can have simple print > > statements inside 1 files(my files.py script) ? > > After all its only one html table i wish to display. > > Good question. Sometimes your way is best. > > The main advantage of using templates is that the template contains > only html (mostly) and the cgi code contains only python (mostly). > > The idea is that you can look at the template and see only the > kind of code (html) that affects how the page looks. With some > template systems you can edit the template files with a html > editor and do the page design visually. Even in a text editor > it is usually easier to see the how the html "works" without > spurious stuff like code. > > And when you look at the cgi code, you see only the Python code > that is needed to get the variable data that is displayed in the > page without the distraction of a lot of html stuff. > -- > http://mail.python.org/mailman/listinfo/python-list > I haven't tried webpy but I have used django. django has a tutorial that takes a couple of hours to set up and go through completely. Its not just reading, its hands on trying out a small website. It gives a very good understanding of what the framework offers, and how difficult (or easy!) it is to use. If webpy has a similar tutorial, I would start there, or try django. After the tutorial, the discussion becomes a lot more concrete and less theoretical as to whether that platform would be helpful --=20 Joel Goldstick http://joelgoldstick.com --001a11c2dca46aeaf104dfff0a01 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Tue, Jun 25, 2013 at 2:00 PM, <rurpy@yahoo.com> wr= ote:
On 06/23/2013 07:44 PM, =CE=9D=CE=AF=CE=BA=CE=BF=CF=82 wrote:> Why use m= ako's approach which requires 2 files(an html template and the
> actual python script rendering the data) when i can = have simple print
> statements inside 1 files(my files.py script) ?
> After all its only one html table i wish to display.

Good question. =C2=A0Sometimes your way is best.

The main advantage of using templates is that the template contains
only html (mostly) and the cgi code contains only python (mostly).

The idea is that you can look at the template and see only the
kind of code (html) that affects how the page looks. =C2=A0With some
template systems you can edit the template files with a html
editor and do the page design visually. =C2=A0Even in a text editor
it is usually easier to see the how the html "works" without
spurious stuff like code.

And when you look at the cgi code, you see only the Python code
that is needed to get the variable data that is displayed in the
page without the distraction of a lot of html stuff.
--
http://mail.python.org/mailman/listinfo/python-list

I hav= en't tried webpy but I have used django.=C2=A0 django has a tutorial th= at takes a couple of hours to set up and go through completely.=C2=A0 Its n= ot just reading, its hands on trying out a small website.=C2=A0 It gives a = very good understanding of what the framework offers, and how difficult (or= easy!) it is to use.=C2=A0 If webpy has a similar tutorial, I would start = there, or try django.=C2=A0 After the tutorial, the discussion becomes a lo= t more concrete and less theoretical as to whether that platform would be h= elpful

--
--001a11c2dca46aeaf104dfff0a01--