Browse Source

Rename reference method, and fix typo.

opi 8 years ago
parent
commit
4c381d8acb

+ 2 - 2
coin/members/templates/members/subscriptions.html

@@ -20,7 +20,7 @@
         <tr>
             <td>{{ subscription.offer.get_configuration_type_display }}</td>
             <td>{{ subscription.offer.name }}</td>
-            <td class="nowrap">{{ subscription.display_subsciption_reference }}</td>
+            <td class="nowrap">{{ subscription.get_subscription_reference }}</td>
             <td>{{ subscription.subscription_date }}</td>
             <td>{{ subscription.resign_date|default_if_none:"" }}</td>
             <td>{{ subscription.configuration.comment }}</td>
@@ -32,7 +32,7 @@
         <tr class="inactive">
             <td>{{ subscription.offer.get_configuration_type_display }}</td>
             <td>{{ subscription.offer.name }}</td>
-            <td class="nowrap">{{ subscription.display_subsciption_reference }}</td>
+            <td class="nowrap">{{ subscription.get_subscription_reference }}</td>
             <td>{{ subscription.subscription_date }}</td>
             <td>{{ subscription.resign_date|default_if_none:"" }}</td>
             <td>{{ subscription.configuration.comment }}</td>

+ 1 - 1
coin/offers/admin.py

@@ -28,7 +28,7 @@ class OfferAdmin(admin.ModelAdmin):
 
 
 class OfferSubscriptionAdmin(admin.ModelAdmin):
-    list_display = ('display_subsciption_reference', 'member', 'offer',
+    list_display = ('get_subscription_reference', 'member', 'offer',
                     'subscription_date', 'commitment', 'resign_date')
     list_display_links = ('member','offer')
     list_filter = ( OfferSubscriptionTerminationFilter,

+ 2 - 2
coin/offers/models.py

@@ -107,9 +107,9 @@ class OfferSubscription(models.Model):
     member = models.ForeignKey('members.Member', verbose_name='membre')
     offer = models.ForeignKey('Offer', verbose_name='offre')
 
-    def display_subsciption_reference(self):
+    def get_subscription_reference(self):
         return settings.SUBSCRIPTION_REFERENCE.format(subsciption=self)
-    display_subsciption_reference.short_description = 'Référence'
+    get_subscription_reference.short_description = 'Référence'
 
     def __unicode__(self):
         return '%s - %s - %s' % (self.member, self.offer.name,