program organization question for web development with python

Hans hansyin at gmail.com
Thu Sep 16 13:19:32 EDT 2010


On Sep 15, 5:33 pm, James Mills <prolo... at shortcircuit.net.au> wrote:
> On Thu, Sep 16, 2010 at 10:14 AM, Hans <hans... at gmail.com> wrote:
> > I'm new to this area. Please allow me to ask some (maybe stupid)
> > questions.
>
> Without reading the rest of your post too much. Designs are up to you,
> I can't comment.
>
> I can only share in a fairly common view, and that is, we'd encourage
> you to use a web framework
> as opposed to plain old CGI.
>
> cheers
> james
>
> --
> -- James Mills
> --
> -- "Problems are solved by method"

Hi James,

Thanks for response.
Maybe I did not make my question clear. I never tried python web
programing before, so I want to start from CGI.

I read something about web framework like django, but seems it's a
little bit complicated. my task is actually very simple: get search
string from input, and then search database, print search result. I
thought CGI should be good enough to do this.

I don't have any idea about how to organize those cgi codes, so what
I'm asking is:

1. do I have to have each single file for each hyper-link? Can I put
them together? how?
2. how can I pass a db_cursor to another file? can I use db_cursor as
a parameter?

Thanks again!

Hans



More information about the Python-list mailing list