[Tutor] web-based python?

Carlos Guerrero guerrerocarlos at gmail.com
Tue Aug 3 06:34:06 CEST 2010


IMHO, i believe that yes you can run django inside that server, but in a
different way,

this is how i believe this could be possible: do your django app but do it
inside the django source folder you can download from the official site, and
make it so, that all functions and models you need from django can be found
by the interpreter,  and make it run well in your computer without
installing django in it, but making it work as a standalone python app. Then
upload all the code to the server, and just like you would do by ssh command
line, invoking commands to run the django apps and the httpserver, invoke
the commands, -from- a .py script also in the server, so that by entering in
www.example.com/rundjangoserver.py would make the django server run.

just a thought, hope others can give more light to this,

best regards.



On Mon, Aug 2, 2010 at 11:38 PM, Che M <pine508 at hotmail.com> wrote:

>
>
> Thanks, Alan, for this set of helpful pointers.  Just a few responses.
>
>
> > Actually web apps are all pretty similar. They consist of three basic
> > parts
> > (maybe 4):
> > 1) A mechanism for mapping a URL to a Python function or method.
> > 2) A mechanism for generating HTML with embedded data values
> > 3) A data storage mechanism
> > 4) Some client code for a more dynamic feel
>
> What does "client code" and "more dynamic feel" mean here?
>
>
> > > - The easiest possible "Hello, World!" (just text) in a web browser.
> >
> > <html><body><p>Hello, World!</body></html>
> >
> > That's it as a one liner.
>
> I guess I meant the easiest possible "Hello, World!" that incorporates
> Python and works through a server, etc.  This is just the HTML.  And
> even with this, a total beginner will have no idea that he or she should
> copy that into a Notepad window, save it as helloworld.html, and then
> open that file from Firefox to see it as HTML.  The point is, in many
> discussions of web programming all the elements (and there are
> many) are scattered and disconnected from the concrete steps one
> needs to take to put them into working order.
>
> I recall that CherryPy has a little walk-through on how to get something
> very simple working with it, and that's closer to what I'm recommending.
> (Though obviously you're just answering bullet points in an email and
> this is not your tutorial :D ).
>
>
> > If you want it as a CGI program in Python its only slightly longer
> > and the CGI documentation shows you how...
>
> Probably that's what I'm after, but my guess is the CGI documentation
> is not particularly approachable (though haven't checked).  A beginner
> would also not know where "the" CGI documentation is.
>
>
> > > - How you can get more than just text on a web app, that is,
> > > widgets, and
> > > therefore what are currently the options for that (learning
> > > javascript and whatever
> > > widget toolkits are out there for that; qooxdoo; Pyjamas; others).
> >
> > This is where it gets very complicated.
>
> And yet I think this what it's all about.  When beginners think about
> a web app (or dynamic web page as someone else here put it), they
> don't think about HTML and text going back and forth to/from a server,
> they think about widgets similar to widgets seen on the desktop
> (calendars, buttons, textboxes, checkboxes, etc.).  I was excited to
> see the Quooxdoo widget set and heard it might be possible to use
> it with a Python backend...via JSON (which I don't know about) but
> it was too nebulous to motivate pursuing when I am still working on
> learning desktop programming.
>
>
> > > - How you can develop your web app on your own computer and when you
> > > need to test it actually on the web.
> >
> > Thats usually just a case of running a web server on your PC.
>
> And that's its own topic.  "Running a web server on your PC" rings zero
> bells for beginners.
>
> > Wikipedia is your friend and the partial topic that I did on web
> > programming did include some of the basic stuff with lots of
> > links to Wikipedia articles.
>
> I don't think Wikipedia is the beginner's friend on this sort of thing.
> I have not found it good for learning how to program.  Just looking
> at the topic "web development" shows this; it is an overview of the
> field, but there is no instructional/tutorial material.  It doesn't teach
> how to do it.
>
> > HTH,
>
> It is helpful, and like anything one can probably work his or her way
> through
> the topic slowly and stumblingly, but I do think that a thorough
> starting-with-
> zero-knowledge-and-defining-all-terms tutorial would be a wonderful thing
> to
> have.  As you said before, web programming is a lot more involved than
> desktop programming.  I think it would be really a fun challenge to put
> together a great soup-to-nuts tutorial on this (but I am far from the one
> to do it!), since it incorporates so many elements.  I wish you luck on
> the Py3 tutorial and and web app tutorial work when you have the chance.
>
> Thanks,
> Che
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Atte:
Carlos A. Guerrero M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100803/cc59a315/attachment.html>


More information about the Tutor mailing list