Rambling about Django, Python, Ansible and sometimes PHP and Wordpress. I enjoy talking about all technologies, and offer help when I can.
Wednesday, March 31, 2010
Saturday, March 20, 2010
Saturday, March 13, 2010
Django Model Values as Dict
This is pretty easy to do but I always forget
obj_dict = MyModel.Objects.filter(id__gt=0).values()And you can also add MyModel.objects.filter(id__gt=0).values_list('COLUMN',flat=True)
Subscribe to:
Posts (Atom)