Skip to content

tawmas.net

  • home
  • coding
  • digital life
  • meta

Tag: abstract base class

Abstract base classes and backward relations

Posted on 03/05/201116/02/2014 by tawmas

In Django, when you create a relation using ForeignKey or a ManyToManyField, a corresponding backward relation is automatically created for you. This backward relation gets a reasonable default name. If you’d rather use a different name, you can specify one with the related_name parameter.

Read More…
  • home
  • coding
  • digital life
  • meta

Latest posts

  • Unofficial daily PPA for Scribes 06/07/2011
  • Embracing class-based views 05/07/2011
  • Perform extra work after rendering a view 06/06/2011
  • Abstract base classes and backward relations 03/05/2011
  • Filtering away the Facebook Send button 02/05/2011

Latest comments

  • Setting related_name for django abstract base classes | Script & Debug on Abstract base classes and backward relations
  • Marco on Unofficial daily PPA for Scribes
  • Odd Django trick #1 « the·philosophical·phoneme on Abstract base classes and backward relations

Top Posts & Pages

  • Unofficial daily PPA for Scribes

Archives

  • July 2011
  • June 2011
  • May 2011
  • April 2011