Jonathan Buchanan wrote:
> class Flag(models.Model):
> objects = FlagManager()
>
> Usage::
>
> songs = Flag.objects.get_by_model_and_flag_type(Song, 'illegal')
Thanks a lot Jonathan...
I guess I should adding custom managers to all my classes containing
generic relations!
- bram
> '%s.%s = %s.object_id' %
> (backend.quote_name(Model._meta.db_table),
>
> backend.quote_name(Model._meta.pk.column),
> rel_table)
Aargh, mangled by Gmail - these lines should look like this (with the
proper level of indentation
> I have a generic relation Flag, with a FlagType:
>
> class FlagType(models.Model):
> name = models.CharField(maxlength=50)
> description = models.TextField()
>
> class Flag(models.Model):
> type = models.ForeignKey(FlagType) # type of flag
> content_type =
On Aug 3, 1:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Aug 3, 12:54 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > hello all,
>
> > I have a generic relation Flag, with a FlagType:
>
> > class FlagType(models.Model):
> > name =
On Aug 3, 12:54 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> hello all,
>
> I have a generic relation Flag, with a FlagType:
>
> class FlagType(models.Model):
> name = models.CharField(maxlength=50)
> description = models.TextField()
>
> class Flag(models.Model):
> type
hello all,
I have a generic relation Flag, with a FlagType:
class FlagType(models.Model):
name = models.CharField(maxlength=50)
description = models.TextField()
class Flag(models.Model):
type = models.ForeignKey(FlagType) # type of flag
content_type =
6 matches
Mail list logo