On 2009-09-03, at 4:40 PM, dwh wrote:
j = Junk.objects.get(cheese='12345')
>
> The field cheese isn't part of Junk obviously.
You can do anything you want in a custom manager. What cheese is and
how possible that is, is up to you.
--
Andy McKay
Clearwind Consulting: www.clearwind.ca
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'
2 matches
Mail list logo