From ca4d8af448022675e9b2870a0e0149c8257037c4 Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Mon, 9 May 2011 16:53:12 -0400 Subject: [PATCH] Added Tag documentation. --- docs/models/miscellaneous.rst | 9 +++++++-- philo/models/base.py | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/models/miscellaneous.rst b/docs/models/miscellaneous.rst index 36fceb9..dfff87e 100644 --- a/docs/models/miscellaneous.rst +++ b/docs/models/miscellaneous.rst @@ -1,5 +1,10 @@ -Miscellaneous Support Classes +Miscellaneous Support Models ============================= +.. currentmodule:: philo.models.nodes .. autoclass:: philo.models.nodes.TargetURLModel :members: - :exclude-members: get_target_url \ No newline at end of file + :exclude-members: get_target_url + +.. currentmodule:: philo.models.base +.. autoclass:: philo.models.base.Tag + :members: \ No newline at end of file diff --git a/philo/models/base.py b/philo/models/base.py index 573c339..436df42 100644 --- a/philo/models/base.py +++ b/philo/models/base.py @@ -18,10 +18,14 @@ from philo.validators import json_validator class Tag(models.Model): + """A simple, generic model for tagging.""" + #: A CharField (max length 255) which contains the name of the tag. name = models.CharField(max_length=255) + #: A CharField (max length 255) which contains the tag's unique slug. slug = models.SlugField(max_length=255, unique=True) def __unicode__(self): + """Returns the value of the :attr:`name` field""" return self.name class Meta: -- 2.20.1