|
32 | 32 |
|
33 | 33 |
|
34 | 34 | class Version(models.Model):
|
35 |
| - |
36 |
| - """ |
37 |
| - Attributes |
38 |
| - ---------- |
39 |
| -
|
40 |
| - ``identifier`` |
41 |
| - The identifier is the ID for the revision this is version is for. This |
42 |
| - might be the revision number (e.g. in SVN), or the commit hash (e.g. in |
43 |
| - Git). If the this version is pointing to a branch, then ``identifier`` |
44 |
| - will contain the branch name. |
45 |
| -
|
46 |
| - ``verbose_name`` |
47 |
| - This is the actual name that we got for the commit stored in |
48 |
| - ``identifier``. This might be the tag or branch name like ``"v1.0.4"``. |
49 |
| - However this might also hold special version names like ``"latest"`` |
50 |
| - and ``"stable"``. |
51 |
| -
|
52 |
| - ``slug`` |
53 |
| - The slug is the slugified version of ``verbose_name`` that can be used |
54 |
| - in the URL to identify this version in a project. It's also used in the |
55 |
| - filesystem to determine how the paths for this version are called. It |
56 |
| - must not be used for any other identifying purposes. |
57 |
| - """ |
58 | 35 | project = models.ForeignKey(Project, verbose_name=_('Project'),
|
59 | 36 | related_name='versions')
|
60 | 37 | type = models.CharField(
|
61 | 38 | _('Type'), max_length=20,
|
62 | 39 | choices=VERSION_TYPES, default='unknown',
|
63 | 40 | )
|
64 | 41 | # used by the vcs backend
|
| 42 | + |
| 43 | + #: The identifier is the ID for the revision this is version is for. This |
| 44 | + #: might be the revision number (e.g. in SVN), or the commit hash (e.g. in |
| 45 | + #: Git). If the this version is pointing to a branch, then ``identifier`` |
| 46 | + #: will contain the branch name. |
65 | 47 | identifier = models.CharField(_('Identifier'), max_length=255)
|
66 | 48 |
|
| 49 | + #: This is the actual name that we got for the commit stored in |
| 50 | + #: ``identifier``. This might be the tag or branch name like ``"v1.0.4"``. |
| 51 | + #: However this might also hold special version names like ``"latest"`` |
| 52 | + #: and ``"stable"``. |
67 | 53 | verbose_name = models.CharField(_('Verbose Name'), max_length=255)
|
68 | 54 |
|
| 55 | + #: The slug is the slugified version of ``verbose_name`` that can be used |
| 56 | + #: in the URL to identify this version in a project. It's also used in the |
| 57 | + #: filesystem to determine how the paths for this version are called. It |
| 58 | + #: must not be used for any other identifying purposes. |
69 | 59 | slug = VersionSlugField(_('Slug'), max_length=255,
|
70 | 60 | populate_from='verbose_name')
|
71 | 61 |
|
|
0 commit comments