background preloader

The Django Book: Version 2.0 (English)

The Django Book: Version 2.0 (English)
Welcome to the online version of The Django Book, a free book about the Django Web framework for the Python programming language. A warning about this edition The community edition of The Django Book is in transition. While the book mentions Django version 1.4 in places, the vast majority of the book is for Django version 1.0, which was released over four years ago. Therefore this resource is extremely out of date and, until the book is finished being updated, we ask that, at this time, not be used for educational purposes. This book was originally published by Apress in 2009 and covered Django version 1.0. So, if you’d like to help out, hop on over to GitHub and send us a pull request!

A Non-Programmer Approach to Django Well if you have decided to install Django, by now you must be knowing Django is a Python based web framework and in today’s post I’ll run through Django installation process on Windows including dependencies (like installation of Python, database, database adapters and other important libraries that Django depends on). If you already have Python installed, then skip Python installation section. Installing Django/Python/Python modules is same in all versions of windows and hence below steps are valid for Windows XP and Windows Vista. Those who are using Windows Vista, just make sure you run all installations as Administrator ( Right click setup file and run as administrator ) Let’s begin by installing Python (If you already have a working Python installation, skip this section)

Using Django's TemplateTags I've had a number of e-mails about how I include the listing of blog tags and archives by month on the side of my website from people who have obviously built up a blog and now want further integration with their website. Well, it's ultra-simple thanks to a nifty Django feature called template tags. The concept behind template tags is simple - a quick snippet of code in your page templates calls some python code behind the scenes, which does some stuff, and returns either raw HTML code (yuck) or sets new variables in your template context, allowing you to manipulate and display them as you please (cool!) To get started, in the application directory for your blog, create a directory named templatetags and place an empty file in it, named _init.py_. Now, create a file - in this case we'll call it blogmonths.py_. We need to do a few things in this file:

Django - BitNami documentation - GeoDjango with PostGIS quick start guide How to create a new Django project? To start a project with Django, it is necessary to start the BitNami Console. If you are using a Virtual Appliance or AMI, you can run the commands below directly. You should create your new project inside Django projects folder located at: On Linux:

Django Basics - Installing Django and Setting up a Project and App - Michael Herman This brief tutorial shows the basics of installing and setting up a simple app in Django that is used to submit and retrieve information about books you’ve read: Part 1 - Installing and Setting up DjangoPart 2 - Creating the Database ModelPart 3 - Django API vs Admin sitePart 4 - Django Templates and Views Each part includes an accompanying video. Chapter 3: Views and URLconfs In the previous chapter, we explained how to set up a Django project and run the Django development server. In this chapter, you’ll learn the basics of creating dynamic Web pages with Django. Your First Django-Powered Page: Hello World As our first goal, let’s create a Web page that outputs that famous example message: “Hello world.” If you were publishing a simple “Hello world” Web page without a Web framework, you’d simply type “Hello world” into a text file, call it hello.html, and upload it to a directory on a Web server somewhere.

fíam » Building a website API with Django. Part 1: API functions WAPI and django-oauthsp are reaching the point when they are starting to become useful, so I decided it was time to write some articles explaining how they work and how you can use them in your sites. I'm currently using both of them in production at byNotes and I haven't run into any problems for now, but YMMV. This article talks about the principles behind WAPI and walks you trough the creation of a simple API function. Next articles in this series will explain more advanced concepts like custom serializations, user authentication against django.contrib.auth or using OAuth. Design Let's start by talking about the design ideas behind WAPI. Top 12 Ruby on Rails Tutorials A former student asked me a few days ago how I learned Ruby on Rails. The answer was that I simply read alot of great tutorials. So in the spirit of sharing, here are the 12 tutorials that I found most useful: Rolling with Ruby on Rails – Curtis Hibbs of offers his first excellent introduction to Ruby on Rails.

The Python Tutorial — Python v2.7.5 documentation Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. django-gae-rpx - Project Hosting on Google Code Django RPX authentication backend that runs on Google App Engine with App Engine Patch. Inspired by django-rpx and django-newrpx but with support for Google App Engine thru App Engine Patch. You can see a live demo running at Note that the site might appear slow at first. The reason seems to be that the app engine unloads instances that haven't been used for some time.

Ruby in Twenty Minutes What if we want to say “Hello” a lot without getting our fingers all tired? We need to define a method! irb(main):010:0> def hi irb(main):011:1> puts "Hello World!" irb(main):012:1> end => :hi The code def hi starts the definition of the method. s Python Class - Educational Materials Welcome to Google's Python Class -- this is a free class for people with a little bit of programming experience who want to learn Python. The class includes written materials, lecture videos, and lots of code exercises to practice Python coding. These materials are used within Google to introduce Python to people who have just a little programming experience. The first exercises work on basic Python concepts like strings and lists, building up to the later exercises which are full programs dealing with text files, processes, and http connections. The class is geared for people who have a little bit of programming experience in some language, enough to know what a "variable" or "if statement" is. Beyond that, you do not need to be an expert programmer to use this material.

HowToUseIt - django-oembed - Project Hosting on Google Code Of course, first you must add it to your INSTALLED_APPS: INSTALLED_APPS = ( .... 'oembed',) Then in your template, include the oembed tags Offline Web Applications You are here: Home Dive Into HTML5 Diving In What is an offline web application? At first glance, it sounds like a contradiction in terms. Web pages are things you download and render.

Related:  Django