Fixed #5405 -- Added admindocs support for reStructured text in model docstrings

Thanks elvard and gkmngrgn for work on the patch and Markus H. for review.
This commit is contained in:
Zan Anderle 2014-11-03 20:16:28 +01:00 committed by Tim Graham
parent 1cf109515a
commit 7b42036752
6 changed files with 138 additions and 8 deletions

View file

@ -18,6 +18,18 @@ class Family(models.Model):
class Person(models.Model):
"""
Stores information about a person, related to :model:`myapp.Company`.
**Notes**
Use ``save_changes()`` when saving this object.
``company``
Field storing :model:`myapp.Company` where the person works.
(DESCRIPTION)
"""
first_name = models.CharField(max_length=200, help_text="The person's first name")
last_name = models.CharField(max_length=200, help_text="The person's last name")
company = models.ForeignKey(Company, help_text="place of work")