0

I am wondering how to go about implementing a web application with Python.

For example, the html pages would link to python code that would give it increased functionality and allow it to write to a database.

Kind of like how Reddit does it.

octopusgrabbus
10.7k15 gold badges75 silver badges137 bronze badges
asked Nov 7, 2011 at 19:30
1
  • Look into Django as a starting point: djangoproject.com Commented Nov 7, 2011 at 19:32

5 Answers 5

1

If you're looking for server side programming with databases and html templates etc, I think Django is great, along with Pyramid. However, I use Flask ( http://flask.pocoo.org/ ) for this since it is easy to use, learn and deploy even though it may not have as much support as the before mentioned 2 framework since it's just a microframework, using the Jinja2 templating engine, including a development test server with it's own debugger.

On the other hand, if you're going for client-side programming (i.e. in browser implementation ) You can look up .NET Ironpython or even Brython which uses python like javascript.

answered Oct 13, 2013 at 4:09
Sign up to request clarification or add additional context in comments.

Comments

0

You might want to check out mod_wsgi or mod_python.

What Is mod_wsgi?

The aim of mod_wsgi is to implement a simple to use Apache module which can host any Python application which supports the Python WSGI interface. The module would be suitable for use in hosting high performance production web sites, as well as your average self managed personal sites running on web hosting services.

-

Current State of Mod_Python

Currently mod_python is not under active development. This does not mean that it is "dead" as some people have claimed. It smiply means that the code and the project are mature enough when very little is required to maintain it.

answered Nov 7, 2011 at 19:33

1 Comment

The Apache software foundation officially move the mod_python project into the Apache Attic. So as far as the ASF is concerned it is a dead project. For mod_python it was not a case that it was mature enough. There are still a lot of outstanding bugs for it. No one simply wanted to work on it any more. It will not even compile against latest Apache and the only reason it is still available with Linux distros is because they are maintaining their own patch sets. This will likely change with Apache 2.4 as the changes required to make mod_python build with it are going to be too many.
0

This is a good article from the Python website: http://docs.python.org/howto/webservers.html

answered Nov 7, 2011 at 19:45

Comments

0

Plain CGI is a good starting point to learn about server side scripting, but it is an outdated technology and gets difficult to maintain after certain level of complexity. I would think it is no longer used in industrial-grade web server anymore. Plus you have to setup a web server and then install some module to interpret python script (like Apache with mod_python) just to get started.

I had some experience with Django (https://www.djangoproject.com/) and found it fairly easy to get started with since they come with development test server. All you need to have is a Python interpreter + Django and you can get up-and-running quickly and worry about the deployment setup later. They have pretty good documentation for beginner as well.

answered Nov 10, 2011 at 9:05

Comments

0

We have never used Python for a web site without a framework. In our case that is Django. In other words, we do not use Python for our web sites the way Perl can be used, just having Apache run a Perl script.

The recommendations you have received about Django are sound. If you go the Django route, Graham Dumpleton and the modwsgi Google group were very helpful to me. I could not have gotten mod_wsgi deployed on Red Hat Enterprise 5 64-bit without Graham's help.

Whether you choose Django or "straight" Python, you will need to become familiar with mod_wsgi.

Good luck in quantum time, which means by now, I hope this all worked out for you.

answered Jul 6, 2012 at 23:51

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.