rename UsableResource to UsableObject
smbaker [Fri, 1 Mar 2013 17:15:54 +0000 (09:15 -0800)]
apps/billingsystem/billing/admin.py
apps/billingsystem/billing/models.py
apps/billingsystem/datamodel.png

index 30a3611..47ccd33 100644 (file)
@@ -1,5 +1,5 @@
 from django.contrib import admin
-from billing.models import Account, Charge, ChargeKind, ChargeState, UsableResource
+from billing.models import Account, Charge, ChargeKind, ChargeState, UsableObject
 
 class AccountAdmin(admin.ModelAdmin):
     search_fields = ['name']
@@ -15,11 +15,11 @@ class ChargeKindAdmin(admin.ModelAdmin):
 class ChargeStateAdmin(admin.ModelAdmin):
     list_display = ('pk', 'name')
 
-class UsableResourceAdmin(admin.ModelAdmin):
+class UsableObjectAdmin(admin.ModelAdmin):
     list_display = ('pk', 'name')
 
 admin.site.register(Account, AccountAdmin)
 admin.site.register(Charge, ChargeAdmin)
 admin.site.register(ChargeKind, ChargeKindAdmin)
 admin.site.register(ChargeState, ChargeStateAdmin)
-admin.site.register(UsableResource, UsableResourceAdmin)
+admin.site.register(UsableObject, UsableObjectAdmin)
index a90e715..97ef6dd 100644 (file)
@@ -49,7 +49,7 @@ class Bucket(models.Model):
     def __unicode__(self):
         return unicode(self.pk)
 
-class UsableResource(models.Model):
+class UsableObject(models.Model):
     name = models.CharField(max_length=255)
     def __unicode__(self):
         return self.name
@@ -66,7 +66,7 @@ class ChargeState(models.Model):
 
 class Charge(models.Model):
     account = models.ForeignKey(Account)
-    object = models.ForeignKey(UsableResource)
+    object = models.ForeignKey(UsableObject)
     parent = models.ForeignKey('self', blank=True, null=True, related_name="children")
     kind = models.ForeignKey(ChargeKind)
     state = models.ForeignKey(ChargeState)
index 7fe3a16..123e4f5 100644 (file)
Binary files a/apps/billingsystem/datamodel.png and b/apps/billingsystem/datamodel.png differ