On Friday 05 March 2010 11:10:29 Omer Barlas wrote:
> How can I use a unicode string as a model instance?
You can't. However you can get a reference to your model class like this:
> from django.db.models.loading import get_model
> model_class = get_model('myapp', 'mymodel')
> instance = model_class._default_manager.get(id=42)
--
Saygılarımla,
Atamert Ölçgen
-+-
--+
+++
www.muhuk.com
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.