Skip to content

Commit

Permalink
Minor formatting fixes for [12139]
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jezdez committed Jan 9, 2010
1 parent e0c3cd4 commit 058343c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/topics/db/models.txt
Expand Up @@ -879,8 +879,9 @@ abstract base class (only), part of the name should contain
- ``'%(app_label)s'`` is replaced by the lower-cased name of the app the child - ``'%(app_label)s'`` is replaced by the lower-cased name of the app the child
class is contained within. Each installed application name must be unique class is contained within. Each installed application name must be unique
and the model class names within each app must also be unique, therefore the and the model class names within each app must also be unique, therefore the
resulting name will end up being different. For example, given an app resulting name will end up being different.
``common/models.py``::
For example, given an app ``common/models.py``::


class Base(models.Model): class Base(models.Model):
m2m = models.ManyToManyField(OtherModel, related_name="%(app_label)s_%(class)s_related") m2m = models.ManyToManyField(OtherModel, related_name="%(app_label)s_%(class)s_related")
Expand All @@ -895,6 +896,7 @@ abstract base class (only), part of the name should contain
pass pass


Along with another app ``rare/models.py``:: Along with another app ``rare/models.py``::

from common.models import Base from common.models import Base


class ChildB(Base): class ChildB(Base):
Expand Down

0 comments on commit 058343c

Please sign in to comment.