Permalink
Browse files

Rename publisher->org in Product model

This is requied to support notifications, and good for consistency
in general.
  • Loading branch information...
1 parent 4cbb54a commit abddf4149e40a6915ff6a24fcc08e3321f22424f @mhagander mhagander committed Jun 26, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 pgweb/downloads/admin.py
  2. +2 −2 pgweb/downloads/models.py
  3. +1 −1 templates/downloads/productlist.html
View
@@ -9,7 +9,7 @@ class MirrorAdmin(admin.ModelAdmin):
ordering = ('country_code', )
class ProductAdmin(PgwebAdmin):
- list_display = ('name', 'publisher', 'approved', 'lastconfirmed',)
+ list_display = ('name', 'org', 'approved', 'lastconfirmed',)
list_filter = ('approved',)
search_fields = ('name', 'description', )
ordering = ('name', )
@@ -78,7 +78,7 @@ class Meta:
class Product(PgModel, models.Model):
name = models.CharField(max_length=100, null=False, blank=False, unique=True)
approved = models.BooleanField(null=False, default=False)
- publisher = models.ForeignKey(Organisation, null=False)
+ org = models.ForeignKey(Organisation, db_column="publisher_id", null=False)
url = models.URLField(null=False, blank=False)
category = models.ForeignKey(Category, null=False)
licencetype = models.ForeignKey(LicenceType, null=False, verbose_name="Licence type")
@@ -93,7 +93,7 @@ def __unicode__(self):
return self.name
def verify_submitter(self, user):
- return (len(self.publisher.managers.filter(pk=user.pk)) == 1)
+ return (len(self.org.managers.filter(pk=user.pk)) == 1)
class Meta:
ordering = ('name',)
@@ -31,7 +31,7 @@
{%endif%}
<tr>
<th class="colFirst">Publisher</th>
- <td class="colLast"><a href="{{product.publisher.url}}">{{product.publisher.name}}</a></td>
+ <td class="colLast"><a href="{{product.org.url}}">{{product.org.name}}</a></td>
</tr>
</table>
</div>

0 comments on commit abddf41

Please sign in to comment.