Tuesday, January 31, 2012

Python & Django - The development server

The development server

Let's verify this worked. Change into the mysite directory, if you haven't already, and run the commandpython manage.py runserver. You'll see the following output on the command line:
Validating models...
0 errors found.
 
Django version 1.0, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
You've started the Django development server, a lightweight Web server written purely in Python. We've included this with Django so you can develop things rapidly, without having to deal with configuring a production server -- such as Apache -- until you're ready for production.
Now's a good time to note: DON'T use this server in anything resembling a production environment. It's intended only for use while developing. (We're in the business of making Web frameworks, not Web servers.)
Now that the server's running, visit http://127.0.0.1:8000/ with your Web browser. 
You'll see a "Welcome to Django" page, in pleasant, light-blue pastel. It worked!

No comments: