From the category archives:

python

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 [...]

{ 14 comments }

There are some tools and apps which we use with almost all apps we write, and in particular which, we used for dinette. Here they are broken into useful during development, and (also) useful post development. During Development Ipython and ipdb South Django test utils Django extensions Django debug toolbar Ipython and ipdb Ipython is [...]

{ 23 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 [...]

{ 12 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 [...]

{ 99 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 the templates cannot be [...]

{ 6 comments }

Beginning python

by shabda on September 18, 2009

Slides and code from my talk at twincling. Beginning PythonView more documents from Usware Technologies. Talk CodeView more documents from Usware Technologies.

{ 7 comments }

Fun with none

by rohit on July 16, 2009

(If you are in a hurry, here is the fun part. A few days ago, I was working with a nullable field, which wasn’t behaving as I expected. So I started a shell, and see how nulls compare. In [1]: None In [2]: None > 10 Out[2]: False In [3]: None < 10 Out[3]: True [...]

{ 68 comments }

Thanks to awesome django community, there is plenty of open source django code around. These packages get updated quite often and if you use it often like we do, you’d have possibly realized the need to manage these packages better. Thankfully, all python ever needs is the source, and all you need to do is [...]

{ 5 comments }

Understanding decorators

by shabda on June 23, 2009

If you used Django for any length of time, you would have come across the login_required decorator. You write @login_required before a view, and it magically becomes accessible only to authenticated users. Decorators were introduced in python 2.4. PEP 318 is the PEP describing it. At the simplest decorators are nothing but callables returning other [...]

{ 14 comments }

Adrian Holovaty is the co-creator of Django, author of the Django book and is currently the BDFL of Django along with Jacob Kaplan-Moss. He studied journalism at University of Missouri–Columbia and has worked with many news sites including Lawrence Journal World and Washington Post. He currently works at EveryBlock, a startup he founded. Shabda: Would [...]

{ 23 comments }