Is it possible to add a custom search key within get() that are:
1) Not part of the containing model
2) Use custom SQL
Example:
class Junk(models.Model):
name = models.CharField(maxlength=10)
size = models.IntegerField()
>>> j = Junk.objects.get(cheese='12345')
The field cheese isn't part of Junk obviously.
It maybe easier to use a custom Manager. I've done that but
I'd like to know if the above is possible as the code is more
symmetrical.
TIA
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---