add locationdata to admin, fix location data model
This commit is contained in:
parent
48fd74c020
commit
aa722fdc9c
@ -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
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user