467,925 Members | 1,931 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

Building Python Based Web Application

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/
Sep 8 '06 #1
  • viewed: 1594
Share:
10 Replies
James Stroud wrote:
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 -

--
Jonathan LaCour
http://cleverdevil.org
Sep 8 '06 #2

James Stroud wrote:
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.

Sep 8 '06 #3
On 9/8/06, James Stroud <js*****@mbi.ucla.eduwrote:
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.
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/116
--
http://mail.python.org/mailman/listinfo/python-list117

--
Ramon Diaz-Uriarte
Bioinformatics Unit
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz
Sep 8 '06 #4
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.

Sep 8 '06 #5

John Henry wrote:
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

Sep 8 '06 #6
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.
John Henry wrote:
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.
Sep 9 '06 #7
James Stroud wrote:
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
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 9 '06 #8
James Stroud wrote:
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/htm...htmlbuilder.py
)

Hope that helps.

Gerard

Sep 9 '06 #9

Adam Jones wrote:
John Henry wrote:
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
Thanks, I am checking out CherryPie

Sep 9 '06 #10
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-we...s-with-python/

HTH
Sep 9 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

37 posts views Thread by Ubaidullah Nubar | last post: by
9 posts views Thread by Dan Cescato | last post: by
17 posts views Thread by Nick | last post: by
28 posts views Thread by H J van Rooyen | last post: by
20 posts views Thread by Thorsten Kampe | last post: by
15 posts views Thread by kyosohma | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.