Posts Tagged ‘ posterous ’

randdecimal – python and django tips and tricks

November 3, 2011
By

from decimal import Decimal from random import randint def randdecimal(a, b): """ Return a random decimal N such that a <= N <= b. """ a, b = Decimal(a), Decimal(b) diff = b - a multiplier = pow(10, abs(diff.as_tuple())) ...

Read more »

django.dispatch.receiver – FTW! – python and django tips and tricks

October 5, 2011
By

Думаю, долгое время, каждый из нас присоединял сигналы к событиям при помощи старого доброго connect метода, например как: from django.contrib.auth.models import User from django.db.models import signals ...

Read more »

Django Tips of the Day: Convert a model instance into a dict

January 28, 2011
By

As documented in Django official docs, you can convert a queryset into a list of dict, like so: # This list contains a dictionary.> > > Blog.objects.filter(name__startswith='Beatles').values()[{'id': 1, 'name': 'Beatles Blog', ...

Read more »

Error Handling Tweaks and Simplenote Changes – Sharpnote.net

August 15, 2010
By

Blog · About · Source · Wiki · Simplenote · Sharpnote.net. A small C# .NET 4.0 utility providing clean calls to Simplenote. Sharpnote. A small C# .NET 4.0 utility providing clean calls to Simplenote. Developed by gokulives ...

Read more »

Nice & concise: Top 10 tips to a new django developer : Dpeepul …

January 11, 2010
By

More details: http://www.b-list.org/weblog/2006/jun/14/ django-tips -template-context-processors/. via blog.dpeepul.com. See all 10 tips and more at blog.dpeepul.com · Loading mentions Retweet ...

Read more »