django-preserialize

Pre-serialize model instances and querysets
Download

django-preserialize Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Byron Ruth
  • Publisher web site:
  • http://pypi.python.org/pypi/django-forkit/

django-preserialize Tags


django-preserialize Description

django-preserialize is a Django app that makes sure an object is free of QuerySet and Model instances.Installpip install django-preserializeDocsA serialized user object might look like this:>>> from preserialize.serialize import serialize>>> serialize(user){ 'date_joined': datetime.datetime(2009, 5, 16, 15, 52, 40), 'email': u'jon@doe.com', 'first_name': u'Jon', 'groups': , 'id': 1, 'is_active': True, 'is_staff': True, 'is_superuser': True, 'last_login': datetime.datetime(2012, 3, 3, 17, 40, 41, 927637), 'last_name': u'Doe', 'password': u'!', 'user_permissions': , 'username': u'jdoe'}This can then be passed off to a serializer/encoder, e.g. JSON, to turn it into a string for the response body (or whatever else you want to do).Product's homepage


django-preserialize Related Software