fix various formating errors

This commit is contained in:
Andreas Zweili 2019-07-19 16:32:24 +02:00
parent 567761f68f
commit 27728da0d5
8 changed files with 11 additions and 15 deletions

View File

@ -32,5 +32,3 @@ class Month(models.Model):
class Meta:
ordering = ['value']

View File

@ -1,5 +1,6 @@
from django.db import models
class Category(models.Model):
name = models.CharField(max_length=50)

View File

@ -1,5 +1,6 @@
from django.db import models
class Company(models.Model):
name = models.CharField(max_length=50)

View File

@ -1,6 +1,7 @@
from django.db import models
from .customer import Customer
class Group(models.Model):
name = models.CharField(max_length=50)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)

View File

@ -1,11 +1,10 @@
from django.db import models
from .customer import Customer
class Location(models.Model):
name = models.CharField(max_length=50)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
def __str__(self):
return self.name
name = models.CharField(max_length=50)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
def __str__(self):
return self.name

View File

@ -11,5 +11,3 @@ class DisksInRaid(models.Model):
raid = models.ForeignKey(RaidType, on_delete=models.CASCADE)
disk = models.ForeignKey(Disk, on_delete=models.CASCADE)
disk_amount = models.IntegerField()

View File

@ -17,7 +17,7 @@ class SoftwareCategory(Category):
class Software(models.Model):
name = models.CharField(max_length=50)
category = models.ForeignKey(SoftwareCategory, models.SET_NULL, null=True,
blank=True)
blank=True)
def __str__(self):
return self.name

View File

@ -15,13 +15,11 @@ class Warranty(models.Model):
valid_from = models.DateField()
valid_until = models.DateField()
duration_in_years = models.IntegerField()
warranty_type = models.ForeignKey(WarrantyType, models.SET_NULL, blank=True,
null=True)
warranty_type = models.ForeignKey(WarrantyType, models.SET_NULL,
blank=True, null=True)
def __str__(self):
return self.device
class Meta:
verbose_name_plural = "Warranties"