diff options
Diffstat (limited to 'djangopypi/models.py')
-rw-r--r-- | djangopypi/models.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/djangopypi/models.py b/djangopypi/models.py index 9cc655c..d66f5c8 100644 --- a/djangopypi/models.py +++ b/djangopypi/models.py | |||
@@ -32,7 +32,6 @@ POSSIBILITY OF SUCH DAMAGE. | |||
32 | 32 | ||
33 | import os | 33 | import os |
34 | from django.db import models | 34 | from django.db import models |
35 | from django.contrib.auth.models import User | ||
36 | from django.utils.translation import ugettext_lazy as _ | 35 | from django.utils.translation import ugettext_lazy as _ |
37 | 36 | ||
38 | OS_NAMES = ( | 37 | OS_NAMES = ( |
@@ -86,7 +85,6 @@ class Project(models.Model): | |||
86 | description = models.TextField(blank=True) | 85 | description = models.TextField(blank=True) |
87 | author_email = models.CharField(max_length=255, blank=True) | 86 | author_email = models.CharField(max_length=255, blank=True) |
88 | classifiers = models.ManyToManyField(Classifier) | 87 | classifiers = models.ManyToManyField(Classifier) |
89 | owner = models.ForeignKey(User, related_name="projects") | ||
90 | 88 | ||
91 | class Meta: | 89 | class Meta: |
92 | verbose_name = _(u"project") | 90 | verbose_name = _(u"project") |
@@ -105,12 +103,12 @@ class Release(models.Model): | |||
105 | project = models.ForeignKey(Project, related_name="releases") | 103 | project = models.ForeignKey(Project, related_name="releases") |
106 | 104 | ||
107 | class Meta: | 105 | class Meta: |
106 | unique_together = ('version', 'platform') | ||
108 | verbose_name = _(u"release") | 107 | verbose_name = _(u"release") |
109 | verbose_name_plural = _(u"releases") | 108 | verbose_name_plural = _(u"releases") |
110 | 109 | ||
111 | def __unicode__(self): | 110 | def __unicode__(self): |
112 | return u"%s %s (%s)" % ( | 111 | return self.version |
113 | self.project.name, self.version, self.distribution.name) | ||
114 | 112 | ||
115 | @property | 113 | @property |
116 | def filename(self): | 114 | def filename(self): |