Building Python Based Web Application

J

James Stroud

Hello All,

I am interested in setting up a modest invoicing system for some
consulting I am doing. I like the idea of managing this on the web and
creating invoices and printing them from a browser. However, I'm not
really sure where to start. I've played with some CMS applications, but
they seem more for blogging (mamba, wordpress, etc.). Ideally, I would
like to interface with mySQL (or whatever the favorite web-flavor
database app is these days). I would like to be able to use my python
skills.

I confident that if I set out to write this from scatch, I will be
seriously re-inventing the wheel, perhaps several times over.

So, my question is, does anyone know of a book and/or some kind of
framework that would make the best sense for what I am describing here?
I've heard of Zope, but I would like to make sure its appropriate for
the job before I spend 2 or 3 days getting acquainted with it. I'm adept
at HTML, python, CSS, python-CGI, and interfacing with mySQL through
DBI. I'm sure I could get something to work with these skills, but I
want to minimize wheel re-invention as much as possible.

Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

Any suggestions will be greatly appreciated.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
 
J

Jonathan LaCour

James said:
Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

Any suggestions will be greatly appreciated.

Two very popular frameworks are TurboGears (http://www.turbogears.org)
and Django (http://www.djangoproject.com/). I have had good luck with
both in the past, and TurboGears is my current framework of choice.

There are a bunch of other frameworks out there as well, but I would
guess that these are the two most popular.

Best of luck -
 
A

Adam Jones

James said:
Hello All,

I am interested in setting up a modest invoicing system for some
consulting I am doing. I like the idea of managing this on the web and
creating invoices and printing them from a browser. However, I'm not
really sure where to start. I've played with some CMS applications, but
they seem more for blogging (mamba, wordpress, etc.). Ideally, I would
like to interface with mySQL (or whatever the favorite web-flavor
database app is these days). I would like to be able to use my python
skills.

I confident that if I set out to write this from scatch, I will be
seriously re-inventing the wheel, perhaps several times over.

So, my question is, does anyone know of a book and/or some kind of
framework that would make the best sense for what I am describing here?
I've heard of Zope, but I would like to make sure its appropriate for
the job before I spend 2 or 3 days getting acquainted with it. I'm adept
at HTML, python, CSS, python-CGI, and interfacing with mySQL through
DBI. I'm sure I could get something to work with these skills, but I
want to minimize wheel re-invention as much as possible.

Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

Any suggestions will be greatly appreciated.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/

Hi James,
From what it looks like you are doing, filtered by my personal
experience, I would recommend either Django or TurboGears. From what I
have heard Zope, and Pylons would also be good choices.

Django would be by far the better choice if your data entry forms would
map directly to your database tables. The admin interface gives you
web-based access to your database pretty much for free. It doesn't work
as well when your data relationships are more complicated, but could
probably prove to be a useful head start.

I think TurboGears is a pretty good choice because of widgets. In
TurboGears widgets are packaged up bits of user interaction code, made
portable throughout your project. Widgets have already been created
that handle form creation, a bunch of nifty little ajax things, and
even more advanced features. User created widgets can be (and are)
easily made available for download and installation.

One example that you would probably find useful is the TurboTinyMCE
widget, which coincidentally enough is not a standard part of
turbogears, but a downloadable widget. It incorporates the TinyMCE text
editor into any web page without having to worry about adding style
sheets, javascript includes, or really any code that produces TinyMCE
to your existing HTML. You basically put a call to the TinyMCE widget
in your Template and all the rest of the work happens automatically.
TurboGears also has an admin interface (named Catwalk), but it is not
designed for external use.

Without having a better idea of what you are trying to do, I would
recommend Django on the grounds that the admin interface will probably
do what you need. I would encourage you to take a look at both projects
if you have time, just to see which one you like more, but based on raw
feature matches that is my recommendation.

Disclosure: I do most of my work with TurboGears. If I have maligned or
misrepresented any other project in any way please attribute it to lack
of experience. If I have maligned or misrepresented TurboGears in any
way, please attribute it to lack of caffeine.
 
R

Ramon Diaz-Uriarte

Hello All,

I am interested in setting up a modest invoicing system for some
consulting I am doing. I like the idea of managing this on the web and
creating invoices and printing them from a browser. However, I'm not
really sure where to start. I've played with some CMS applications, but
they seem more for blogging (mamba, wordpress, etc.). Ideally, I would
like to interface with mySQL (or whatever the favorite web-flavor
database app is these days). I would like to be able to use my python
skills.

I confident that if I set out to write this from scatch, I will be
seriously re-inventing the wheel, perhaps several times over.

So, my question is, does anyone know of a book and/or some kind of
framework that would make the best sense for what I am describing here?
I've heard of Zope, but I would like to make sure its appropriate for
the job before I spend 2 or 3 days getting acquainted with it. I'm adept
at HTML, python, CSS, python-CGI, and interfacing with mySQL through
DBI. I'm sure I could get something to work with these skills, but I
want to minimize wheel re-invention as much as possible.

Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

I think that Karrigell might do what you want, and you can read all
the (excellent) documentation in a few hours. Otherwise, specially if
you think you might get deeper into web-based stuff, with more
complex/special/whatever needs, I'd probably try Pylons (which has
also very nice and well organized docs). I have no direct experience
with Django or TG, but I find them "overwhelming", specially compared
to Karrigell; Zope I find even more overwhelming.

HTH,

R.
 
J

John Henry

Hi folks.

I am interested on this topic as well.

If my application is not database related, what would be a good choice?

I have clients that wish to use my Python applications but I am not
willing to give them the code. So, I am thinking about setting it up
as a web based application and let them run it from their browser. If
things go well, may be I can charge them for usage later.

The application will involve getting a data file from the user, do some
processing, and return a result file to the user. Very modest - to
start.
 
A

Adam Jones

John said:
Hi folks.

I am interested on this topic as well.

If my application is not database related, what would be a good choice?

I have clients that wish to use my Python applications but I am not
willing to give them the code. So, I am thinking about setting it up
as a web based application and let them run it from their browser. If
things go well, may be I can charge them for usage later.

The application will involve getting a data file from the user, do some
processing, and return a result file to the user. Very modest - to
start.

For that kind of usage I don't know if any of the big name web
frameworks would be worth the effort, especially if returning a result
file entails making it available for download instead of handing it
back in the form of an HTML page. At that point all you would really
need is a controller to handle most of the details of working in HTTP
and maybe a templating system to help out with the HTML.

The only controller that is available independently that I can comment
on usefully is Cherrypy. It works pretty well, can run its own web
server if you like, and seems like it would be simple enough to use for
what you are talking about.

Without knowing more about your requirements that would be my
suggestion. I am sure there are other people on this group with more
experience here who could give more useful commentary.

-Adam
 
N

Nick Vatamaniuc

The most modest way is to use pure Python and interface via CGI with
the web. I would start there.

As you code you will find yourself saying "I wonder if a framework is
out there that already has automated this specific process (say
templating)?", well then you can search and find such a framework.

If you pick a framework you are not familiar with right from the start
then besides your original problem that you want o solve, you have
another problem -- that of learning a new framework. You will end up
molding your problem to some framework (this is not necessarily a very
bad thing) rather than finding a framework that helps you solve the
problem.

--Nick V.
 
S

Steve Holden

James said:
Hello All,

I am interested in setting up a modest invoicing system for some
consulting I am doing. I like the idea of managing this on the web and
creating invoices and printing them from a browser. However, I'm not
really sure where to start. I've played with some CMS applications, but
they seem more for blogging (mamba, wordpress, etc.). Ideally, I would
like to interface with mySQL (or whatever the favorite web-flavor
database app is these days). I would like to be able to use my python
skills.

I confident that if I set out to write this from scatch, I will be
seriously re-inventing the wheel, perhaps several times over.

So, my question is, does anyone know of a book and/or some kind of
framework that would make the best sense for what I am describing here?
I've heard of Zope, but I would like to make sure its appropriate for
the job before I spend 2 or 3 days getting acquainted with it. I'm adept
at HTML, python, CSS, python-CGI, and interfacing with mySQL through
DBI. I'm sure I could get something to work with these skills, but I
want to minimize wheel re-invention as much as possible.

Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

Any suggestions will be greatly appreciated.

James
Once you solve the web data maintenance part (which I do using wxPython
on the desktop) you might be interested in my Python db-to-pdf invoice
generator, which I've been using now for several years. If so, drop me a
line and I'll send you a copy.

regards
Steve
 
G

Gerard Flanagan

James said:
Hello All,

I am interested in setting up a modest invoicing system for some
consulting I am doing. I like the idea of managing this on the web and
creating invoices and printing them from a browser. However, I'm not
really sure where to start. I've played with some CMS applications, but
they seem more for blogging (mamba, wordpress, etc.). Ideally, I would
like to interface with mySQL (or whatever the favorite web-flavor
database app is these days). I would like to be able to use my python
skills.

I confident that if I set out to write this from scatch, I will be
seriously re-inventing the wheel, perhaps several times over.

So, my question is, does anyone know of a book and/or some kind of
framework that would make the best sense for what I am describing here?
I've heard of Zope, but I would like to make sure its appropriate for
the job before I spend 2 or 3 days getting acquainted with it. I'm adept
at HTML, python, CSS, python-CGI, and interfacing with mySQL through
DBI. I'm sure I could get something to work with these skills, but I
want to minimize wheel re-invention as much as possible.

Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

Any suggestions will be greatly appreciated.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/

James,

Karrigell is serving me well at the moment for a low-traffic
intranet/library-cataloguing site. There are different ways of creating
your app (html inside python, python inside html, or Karrigell
services) - personally, I use services exclusively, so:

library/books.ks/add, library/books.ks/edit,
library/books.ks/delete
library/authors.ks/add, library/authors.ks/edit,
library/authors.ks/delete

etc.

( I think - to the best of my knowledge - these would equate to
'controllers' in other frameworks - BookController, AuthorController...
)

Karrigell will also serve static pages with a simple

Include( 'mypage.html' )

I've recently set up 'lighttpd' webserver ( http://www.lighttpd.net ),
and this proxies easily to Karrigell with the following in
'lighttpd.conf':

server.modules = ( "mod_proxy" )
static-file.exclude-extensions = ( ".ks" )
$HTTP["url"] =~ "\.ks" {
proxy.server = ( "" =>
((
host => "127.0.0.1",
port => 8081
))
)
}

ie. "if there is a '.ks' in the url, ask Karrigell, otherwise it's
static so serve it yourself"

I'm also using 'leonardo' (http://leonardo.pyworks.org) as a 'Latest
News' cms - it runs as a cgi script ( which lighttpd will serve via
"mod_cgi":

server.modules = ( "mod_proxy", "mod_cgi")
static-file.exclude-extensions = ( ".ks", ".py", ".cgi" )
cgi-assign = ( ".py" => "/usr/local/bin/python")

(Also useful is my trusty , if imperfect, html generator,
htmlbuilder.py:

http://gflanagan.net/site/python/htmlbuilder/htmlbuilder.py
)

Hope that helps.

Gerard
 
J

John Henry

Adam said:
For that kind of usage I don't know if any of the big name web
frameworks would be worth the effort, especially if returning a result
file entails making it available for download instead of handing it
back in the form of an HTML page. At that point all you would really
need is a controller to handle most of the details of working in HTTP
and maybe a templating system to help out with the HTML.

The only controller that is available independently that I can comment
on usefully is Cherrypy. It works pretty well, can run its own web
server if you like, and seems like it would be simple enough to use for
what you are talking about.

Without knowing more about your requirements that would be my
suggestion. I am sure there are other people on this group with more
experience here who could give more useful commentary.

-Adam

Thanks, I am checking out CherryPie
 
B

Bruno Desthuilliers

James Stroud a écrit :
Hello All,

I am interested in setting up a modest invoicing system for some
consulting I am doing. I like the idea of managing this on the web and
creating invoices and printing them from a browser. However, I'm not
really sure where to start. I've played with some CMS applications, but
they seem more for blogging (mamba, wordpress, etc.). Ideally, I would
like to interface with mySQL (or whatever the favorite web-flavor
database app is these days). I would like to be able to use my python
skills.

I confident that if I set out to write this from scatch, I will be
seriously re-inventing the wheel, perhaps several times over.

So, my question is, does anyone know of a book and/or some kind of
framework that would make the best sense for what I am describing here?

Web-base front-end to a SQL database... Pylons, Turbogears or Django
comes to mind. Or a custom-made stack (see link below)...
I've heard of Zope, but I would like to make sure its appropriate for
the job before I spend 2 or 3 days getting acquainted with it.

Lol. Make it 2 or 3 monthes. And before you loose your time: Zope is
certainly not the best choice here.
I'm adept
at HTML, python, CSS, python-CGI, and interfacing with mySQL through
DBI. I'm sure I could get something to work with these skills, but I
want to minimize wheel re-invention as much as possible.

Basically, I want a jump start on data-base oriented web development
with a focus on applying my python skills.

Any suggestions will be greatly appreciated.

This serie of articles may be of interest to you:
http://adminspotting.net/building-web-pages-with-python/

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top