fixed typo in models

This commit is contained in:
Alexander Werner 2017-02-06 20:27:11 +01:00
parent 567d6007fe
commit d0e5b90946

View File

@ -6,12 +6,12 @@ from . import utils
class LocationData(models.Model): class LocationData(models.Model):
location_id = models.CharField(max_length=32, blank=False, null=False, name="Standort-ID") location_id = models.CharField(max_length=32, blank=False, null=False, verbose_name="Standort-ID")
table_no = models.IntegerField(blank=False, null=False, name="Tischnummer") table_no = models.IntegerField(blank=False, null=False, verbose_name="Tischnummer")
tst = models.DateTimeField(blank=False, null=False, name="Zeitstempel") tst = models.DateTimeField(blank=False, null=False, verbose_name="Zeitstempel")
on_off = models.BooleanField(blank=False, null=False, name="Ein/Ausgebucht") on_off = models.BooleanField(blank=False, null=False, verbose_name="Ein/Ausgebucht")
processed = models.BooleanField(default=False, name="Verarbeitet") processed = models.BooleanField(default=False, verbose_name="Verarbeitet")
error_msg = models.CharField(max_length=16000, blank=True, null=True, name="Fehlermeldung") error_msg = models.CharField(max_length=16000, blank=True, null=True, verbose_name="Fehlermeldung")
def __str__(self): def __str__(self):
return str(self.location_id) return str(self.location_id)
@ -21,15 +21,15 @@ class LocationData(models.Model):
verbose_name_plural = "Standortlogs" verbose_name_plural = "Standortlogs"
class Location(models.Model): class Location(models.Model):
users = models.ManyToManyField(User, related_name='locations', name="Benutzer") users = models.ManyToManyField(User, related_name='locations', verbose_name="Benutzer")
code = models.CharField(max_length=16, unique=True, name="Code") code = models.CharField(max_length=16, unique=True, verbose_name="Code")
name = models.CharField(max_length=64, unique=True, name="Name") name = models.CharField(max_length=64, unique=True, verbose_name="Name")
street = models.CharField(max_length=64, blank=True, null=True, name="Straße") street = models.CharField(max_length=64, blank=True, null=True, verbose_name="Straße")
plz = models.CharField(max_length=8, blank=True, null=True, name="Postleitzahl") plz = models.CharField(max_length=8, blank=True, null=True, verbose_name="Postleitzahl")
city = models.CharField(max_length=64, blank=True, null=True, name="Stadt") city = models.CharField(max_length=64, blank=True, null=True, verbose_name="Stadt")
phone = models.CharField(max_length=64, blank=True, null=True, name="Telefon") phone = models.CharField(max_length=64, blank=True, null=True, verbose_name="Telefon")
email = models.EmailField(blank=True, null=True, name="Email") email = models.EmailField(blank=True, null=True, verbose_name="Email")
url = models.URLField(blank=True,null=True, name="URL") url = models.URLField(blank=True,null=True, verbose_name="URL")
def __str__(self): def __str__(self):
return self.name return self.name
@ -40,8 +40,8 @@ class Location(models.Model):
class Client(models.Model): class Client(models.Model):
uuid = models.UUIDField(unique=True, default=uuid.uuid4, name="Identifier") uuid = models.UUIDField(unique=True, default=uuid.uuid4, verbose_name="Identifier")
location = models.ForeignKey(Location, name="Standort") location = models.ForeignKey(Location, verbose_name="Standort")
desk1_enable = models.BooleanField() desk1_enable = models.BooleanField()
desk1_name = models.CharField(max_length=32, blank=True, null=True) desk1_name = models.CharField(max_length=32, blank=True, null=True)
desk1_prize_nt = models.DecimalField(max_digits=4, decimal_places=2, blank=True, null=True) desk1_prize_nt = models.DecimalField(max_digits=4, decimal_places=2, blank=True, null=True)
@ -74,11 +74,11 @@ class Client(models.Model):
verbose_name_plural = "Clienten" verbose_name_plural = "Clienten"
class Accounting(models.Model): class Accounting(models.Model):
client = models.ForeignKey(Client, name="Client") client = models.ForeignKey(Client, verbose_name="Client")
desk_no = models.IntegerField(name="Tischnummer") desk_no = models.IntegerField(verbose_name="Tischnummer")
time_from = models.DateTimeField(name="Beginn") time_from = models.DateTimeField(verbose_name="Beginn")
time_to = models.DateTimeField(blank=True, null=True, name="Ende") time_to = models.DateTimeField(blank=True, null=True, verbose_name="Ende")
prize = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True, name="Preis") prize = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True, verbose_name="Preis")
def __str__(self): def __str__(self):
return '{}: {} -> {}, {}'.format(self.client.uuid, self.time_from, self.time_to, self.prize) return '{}: {} -> {}, {}'.format(self.client.uuid, self.time_from, self.time_to, self.prize)