From the category archives:

django

Django abstracts most of the actions you would be doing with the Database. What it doesn’t abstracts, and doesn’t try to abstract is the Database modelling part. This is a quick tutorial describing to how model your data in Django models.py, and how to access and modify them.

Consider a hypothetical HR department, which wants you to build [...]

{ 13 comments }

Summary: How to integrate a non Django database system in your Django code, using Wordpress as example. The completed code is available at github or you can see some screnshots

Though there are quite a few good Django blog applications, our blog is based on Wordpress. A number of plugin’s make moving to a Django based app a bad decision for [...]

{ 37 comments }

Doing things with Django forms

by shabda on January 14, 2010

Forms are one of the best features of Django. (After models, admin, url routing etc ). Here is a quick tutorial describing how to do things with Django forms.

Basic form

Prob. You want to show a form, validate it and display it.

Ans. Create a simple form.

class UserForm(forms.Form): username = forms.CharField() [...]

{ 40 comments }

django-forum

by shabda on January 7, 2010

twitter ready version:

We have released a Django forum application, with some cool features not in any other Django based forum. You can get it here or see it in action.

blog version

There are quite a few Django based forum applications, so why another? Its a bit of a rhetorical question, as the answer is “none [...]

{ 50 comments }

What is bpython?

bpython is a fancy interface to the Python interpreter for Unix-like operating system.

says the bpython home page. It provides syntax highlighting, auto completion, auto-indentation and such stuff.

Unlike iPython, which implements then entire shell functions and emulates the standard python shell, and adds enhancements, bpython just adds features on top of the [...]

{ 59 comments }

Foss.in is without doubt India’s largest FOSS technology conference. Lakshman gave a talk today on “Python metaclasses and how Django uses them”. Here are the slides from that talk.

Doing magic with python metaclassesView more documents from Usware Technologies.

[Edit] Some reactions, http://twitter.com/jaideep2588/status/6295483833 http://twitter.com/kunalbharati/status/6296572939

And the talk images, http://twitpic.com/rxhn7

You should follow us on twitter and Subscribe to our blog

{ 12 comments }

Django quiz

by shabda on December 3, 2009

A quick django quiz. Answers available tomorrow. Get it as a text file (django-quiz) or on google docs or read below.

### Easy

1. You have a class defined as

class Post(models.Model): name = models.CharField(max_length=100) is_active = models.BooleanField(default=False)

You create multiple [...]

{ 14 comments }

Django for a Rails Developer

by Ashok on November 26, 2009

This is not yet another Django vs Rails blog post. It is a compilation of notes I made working with Django after having worked on Rails for years.

In this post I want to give a brief introduction to Django project layout from a Rails developer point of view, on what is there, what is not [...]

{ 98 comments }

Writing your own template loaders

by shabda on November 21, 2009

Django has three builtin template loaders which are used to get the templates for rendering.

TEMPLATE_LOADERS = ( ‘django.template.loaders.filesystem.load_template_source’, ‘django.template.loaders.app_directories.load_template_source’, # ‘django.template.loaders.eggs.load_template_source’, )

Writing your template loader is a awfuly easy. It is a callable which

Returns a tuple of (openfile, filename) if it can find the template. Raise TemplateDoesNotExist if [...]

{ 6 comments }

Django gotchas

by shabda on November 11, 2009

This is announcement about our new work, Django Gotchas, a teeny tiny ebook about commonly occurring gotchas with Django. Here is the readme copied from the project.

Django-gotchas is a collections of gotchas which happen commonly when you are working with Django. They are some errors which I have made commonly or seen others do, these [...]

{ 10 comments }