kopia lustrzana https://github.com/HackerspaceKRK/spejstore
labels fix
rodzic
f7150779b5
commit
703381c5dc
|
@ -123,10 +123,12 @@ class ItemImage(models.Model):
|
|||
|
||||
class Label(models.Model):
|
||||
id = models.CharField(max_length=64, primary_key=True)
|
||||
item = models.ForeignKey(Item, related_name='labels')
|
||||
style = models.CharField(max_length=32, choices=(
|
||||
('basic_99012_v1', 'Basic Zebra label'),
|
||||
), default='basic_99012_v1')
|
||||
item = models.ForeignKey(Item, related_name="labels", on_delete=models.CASCADE)
|
||||
style = models.CharField(
|
||||
max_length=32,
|
||||
choices=(("basic_99012_v1", "Basic Dymo 89x36mm label"),),
|
||||
default="basic_99012_v1",
|
||||
)
|
||||
created = models.DateTimeField(auto_now_add=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
|
@ -134,4 +136,4 @@ class Label(models.Model):
|
|||
|
||||
def print(self):
|
||||
resp = requests.post("{}/api/1/print/{}".format(settings.LABEL_API, self.id))
|
||||
resp.raise_for_status()
|
||||
resp.raise_for_status()
|
Ładowanie…
Reference in New Issue