Monday, May 16, 2011

CS 201 Python/Django Summer 2011

Vikash   Ruhil
11am to 5pm
Room No 1
School of Computer and System Sciences
JNU NEW Campus
How to Reach

By  Delhi Metro:- Hauz khas Merto station
(Jnu is about 1 Km from Hauz khas Metro station )
vikasruhil06 at


30th July 2011(1 day boot camp)
1)come with your laptop
2)better if have Linux/Mac as OS
3) for window no more support after bootcamp
4) training is free but no other services provided i.e food come ready with your own
5)Also send me mail about your confirmation with your  short Bio & why you want attend, why to want learn django !
6)6)Please bring your printed mail copy of our sent confirmation so that we ensure your space over-there
7) so meet @Jnu

1)Django introduction Basic concept
2) Web development (django vs wep2py , who is better)
3)   Google app engine
4)  Creating Facebook app  using GAE +django
5) Web server set up & usage
6) Database setup & usage
7)  ORM (Object Relational Mapping) + Templates
 (for views) + Forms + Much more
some updations soon
Course mailing list : A list server is used to email important messages to students in the course .      soon coming !.
Other Prerequisites: Graduate standing, ability to install software, learn material quickly and find solution to problems,read following resources to get updated

What's django

● “Django is a high-level Python Web framework
that encourages rapid development and clean,
pragmatic design.”
● DRY (Don't Repeat Yourself)
● ORM (Object Relational Mapping) + Templates
(for views) + Forms + Much more

Getting Started

Before using Django you need to be sure Python is installed. Django works with any version of Python between 2.4 and 2.7. If you followed the directions for ps6 and installed Python, you are already set for this. Otherwise, follow the directions in the Python Guide to install Python first. Installing Django on Windows
  1. Download and install 7-Zip (or some other zip utility that supports tar files such as WinZip)
  2. Download Django 1.1:
  3. Unpackage the Django tarball file. If you have WinZip, this should happen automatically when you open the downloaded file. If you have installed 7-Zip, start the 7-Zip file manager and select the Django-1.1.1.tar.gz file you downloaded. Then, select "Extract" and select the directory where you want to extract the files.
  4. Open a Windows Command Shell and go to the unzipped folder. You can open the command shell by running "cmd.exe" or by selecting "All Programs | Accessories | Command Prompt" from the Start menu. Once you have the command shell, assuming that the folder was extracted to your desktop the command to use is:
    in Windows XP: cd C:\Documents and Settings\[username]\Desktop\Django-1.1.1
    in Windows Vista: cd C:\Users\[username]\Desktop\Django-1.1.1
    where [username] is your personal folder.
  5. Run the command: python install [If you get errors for this, Mail me !.]
  6. Django is now installed!
Installing Django on Mac
  1. Download Django 1.1:
  2. Double-click the Django tarball file. This should automatically unzip the file. Place the file on your desktop for simplicity.
  3. Open your "Terminal". This is similar to "Run" on a Windows PC. At the command line, type the following command and hit enter: cd /Users/[YOUR_NAME]/Desktop/Django-1.1.1
  4. Type the following command: sudo python install. You will be required to enter your password. When you type your password, your keystrokes will be recorded but will not appear in the Terminal. Type your password CAREFULLY and then hit enter.
  5. Django is now installed!

    Frequently Asked Questions
  6. How do I run a Windows command shell? In 7, select the Start menu and enter "cmd.exe" in the Search box.
    In other versions of Windows, select "Start | All Programs | Accessories" and select "Command Prompt".
  7. How do I run python? When I try to run python, I get an error like:
    ] python install
    'python' is not recognized as an internal or external command,
    operable program or batch file.
    The problem is python is not on your Windows command path. To add the Python directory to your Windows path, open the Control Panel and select System and "Advanced System settings". Select "Environment Variables". Edit the "Path" variable to add the directory containing python. For example, if the current value of "Path" is
    C:\Program Files (x86)\CVSNT\;C:\Program Files(x86)\texlive\2008\\bin\win32
    and you installed Python in C:\Python26, edit the "Path" variable value to be:
    C:\Program Files (x86)\CVSNT\;C:\Program Files(x86)\texlive\2008\\bin\win32;C:\Python26
    An easier (temporary) workaround for this, is to just type the full path to run python:
    ] C:\Python26\python install
  8. How should I read in data from a file? If the data in your file is separated into lines, and the elements in each entry separated by commas (this is what is known as a "comma-separated values" or csv file), the easy way to read in the data is:
    f = open (filename, 'r')
        for line in f:
           entries = line.split(",") 
           ### entries is now a Python list of the elements in that line
    If you have data to pre-seed your database with, it is a good idea to store it in a file and use code like this to read it in. Then, from the entries you would need to construct the relevant model object and save() it to store it in the database.

Django and Python development online and printed resources



Editors and IDEs

Web server setups

Database setups

Templating Engines


Example Django applications

There is a lot of open source Django code available online. Reading the source of established Django projects can be a great way to learn more about the framework. Our recommended starting points include:

Google App Engine

Google App Engine Helper for Django

Online Videos


General Documentation




Testing and Documentation Tools



Web Servers and Modules



Text Formatting


Web browsers

Revision control

Issue Tracking

Text editors

JavaScript Libraries

JavaScript Object Notation (JSON)

Source Code Syntax Highlighters

Test tools



Python Books

Reference (these books freely distributed during the course-ware studies )

  • Python Phrasebook
    • Brad Dayley, Sams, 2006
  • Python in a Nutshell, 2nd ed.
    • Alex Martelli, O'Reilly, 2006
  • Python Essential Reference, 3rd ed.
    • David M. Beazley, Sams, 2006
  • Python Cookbook, 2nd ed.
    • (ed.) A. Martelli, A. Ravenscroft, D. Ascher, O'Reilly, 2005
  • Python Pocket Reference, 3rd ed.
    • Mark Lutz, O'Reilly, 2005