add locationdata to admin, fix location data model

This commit is contained in:
Robert Einsle 2017-01-06 20:16:21 +01:00
parent 48fd74c020
commit aa722fdc9c
2 changed files with 10 additions and 2 deletions

View File

@ -16,3 +16,11 @@ class ClientAdmin(admin.ModelAdmin):
@admin.register(Table) @admin.register(Table)
class TableAdmin(admin.ModelAdmin): class TableAdmin(admin.ModelAdmin):
pass pass
@admin.register(TmpLocationData)
class TmpLocationDataAdmin(admin.ModelAdmin):
list_display = ('location_id', 'table_no', 'tst', 'on_off',)
fields = ['location_id', 'table_no', 'tst', 'on_off',]
pass

View File

@ -41,7 +41,7 @@ class TmpLocationData(models.Model):
on_off = models.BooleanField(blank=False, null=False) on_off = models.BooleanField(blank=False, null=False)
def __str__(self): def __str__(self):
return self.name return str(self.location_id)
def __unicode__(self): def __unicode__(self):
return self.name return str(self.location_id)