Go to CD Contents...

Frequently Asked Questions

Last update: February 13, 2012.

This FAQ is for anyone who is considering on attending the workshop entitled "Web Development with Python and Django" at SIGCSE 2012.

What's this workshop about?

Many instructors have already discovered the joy of teaching programming using Python. Now it's time to take Python to the next level. This workshop will introduce Django, an open source Python web framework that saves you time and makes web development fun. It's aimed at CS instructors who want to teach how to build elegant web applications with minimal fuss. Django is Python's equivalent to the popular Ruby on Rails framework. Topics that will be covered include: setup and configuration, template language, and database integration through object-relational mapping.


Who is the intended audience for the workshop?

CS educators interested on teaching web development using the Python programming language.


What are the workshop prerequisites?

Attendees should have some familiarity with HTML, SQL and Python.

You don't need to be an expert Python programmer. Yet, to get the most of this workshop, you should have at least a fundamental knowledge of the following topics:

Regarding SQL, you should know the basic usage of these instructions: create table, select, insert, delete and update.


What hardware is required for the workshop?

This is a hands-on workshop, so each attendee must bring her/his own laptop computer. The Django software works well in PCs with Windows or Linux as well as Macintosh computers.


What software is required for the workshop?

Attendees should have the following FLOSS (free/libre/open-source software) installed on their laptops before the workshop begins:

Installing Python

IMPORTANT NOTE: At this time, Django DOES NOT WORK with Python 3.x, so please make sure you have installed in your system Python versions 2.5.x, 2.6.x or 2.7.x.

Most recent Linux and Mac systems come with Python preinstalled. You can check this out by typing python -V (note that's a capital "V") at the command line prompt. You should see something like this:

~$ python -V
Python 2.7.2

If you don't have Python installed or you have Python 2.4.x or older, go to the official Python site and select an appropriate installer for your platform.

NOTE: If you build Python from the source files, you'll probably need to download first the SQLite 3 development files (available in a package such as libsqlite3-dev), otherwise your Python distribution might end up not including the sqlite3 module.

Updating Your Path

Once you've got Python installed, you may need to add the executable to your system's path. This is typically taken care of for you on Unixish systems, such as Linux and Mac.

Windows users, however, need to perform this step manually to run Python scripts in the command shell (cmd.exe). Add the c:\Python27 and c:\Python27\Scripts paths (or whatever directory your Python distribution is installed) to the system's PATH environment variable. Check the following link if you need more information on how to do this: Environment Variables in Windows.

You should now be able to run the Python shell from a command line prompt (cmd.exe) on any directory:

Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Installing SQLite

Python support for SQLite 3 comes preinstalled in Python versions 2.5, 2.6 and 2.7. To make sure it's available, run the Python shell and type import slqlite3 as shown here:

>>> import sqlite3

If you don't get any errors it means everything's fine.

Additionally, you will need to install the SQLite 3 command line shell, which can be downloaded from the SQLite Download Page.

Windows users will need to download two files: the SQLite command line shell and the SQLite DLL (something like sqlite-shell-win32-x86-3070800.zip and sqlite-dll-win32-x86-3070800.zip).

To complete the installation, you can just copy the sqlite3 executable (sqlite3.exe and sqlite3.dll files for Windows users) into the same directory where Python is installed (for example /usr/local/bin or c:\Python27).

NOTE: SQLite 3 might be available through your OS’s software packaging system (for example MacPorts for Mac OS X or APT for Debian Linux), in which case the installation process will probably be easier.

Make sure you can run the sqlite3 executable from the OS command line prompt on any directory:

~$ sqlite3
SQLite version 3.7.8
Enter ".help" for instructions
Enter SQL statements terminated with a ";"

Installing Django

To install Django, download the latest distribution file (something like Django-1.3.1.tar.gz) from the Django Project Site.

In Unixish systems (Linux or Mac), from the command line prompt change to the directory where the tar.gz file was downloaded and execute the following commands:

~$ tar xzvf Django-1.3.1.tar.gz
~$ cd Django-1.3.1
~/Django-1.3.1$ sudo python setup.py install

In Windows, decompress the tar.gz file using a utility program such as PowerArchiver. At the command line, change to the recently created directory (Django-1.3.1) and execute the installation command, something like this (you most likely need to run cmd.exe with administrative privileges):

c:\>cd Django-1.3.1
c:\Django-1.3.1>python setup.py install 

Finally, to test if Django was correctly installed, from the Python shell type:

>>> import django
>>> django.VERSION
(1, 3, 1, 'final', 0)

Once again, no error means everything's fine.

Installing Komodo Edit

Download and install the most recent version of Komodo Edit for your platform. We'll be using this software as a source code editor. It supports syntax highlight for HTML, CSS, SQL, Python and Django template files, which will come in very handy during the workshop.


When and where will the workshop be held?

When: 3-6 p.m. on Saturday, March 3, 2012.

Where: The Raleigh Convention Center, room: 302A; Raleigh, North Carolina, USA.


Who is the workshop presenter?

Ariel Ortiz has been a full time faculty member at the Tecnológico de Monterrey, Campus Estado de México, since 1994, where he has been involved mainly in teaching undergraduate computer science courses in Spanish and English. His central areas of interest include: programming languages, web development, computer science education and open source issues. He has presented at SIGCSE several workshops, papers, posters, and BOFs since 2001. His personal web site (mostly in Spanish) can be found at: http://www.arielortiz.com/


Where can I get more information?

More information about Django: http://www.djangoproject.com/

Send to ariel.ortiz@itesm.mx any further questions regarding this workshop.