mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Specify PNG image for QR code generation
This commit is contained in:
parent
4ff7920296
commit
eb378e5e5d
@ -1,3 +1,14 @@
|
||||
.qr-code {
|
||||
max-width: 400px;
|
||||
max-height: 400px;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.qr-container {
|
||||
width: 100%;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
float: left;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ class TestQuoteWrap(TestCase):
|
||||
self.assertEqual(helpers.WrapWithQuotes('hello"'), '"hello"')
|
||||
|
||||
|
||||
class TestMakeBarcoede(TestCase):
|
||||
class TestMakeBarcode(TestCase):
|
||||
""" Tests for barcode string creation """
|
||||
|
||||
def test_barcode(self):
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
<div class='container' style='width: 80%;'>
|
||||
{% if qr_data %}
|
||||
<img src="{% qr_url_from_text qr_data size='m' error_correction='q' %}" alt="QR Code">
|
||||
<div class='qr-container'>
|
||||
<img class='qr-code' src="{% qr_url_from_text qr_data size='m' image_format='png' error_correction='q' %}" alt="QR Code">
|
||||
</div>
|
||||
{% else %}
|
||||
<b>Error:</b><br>
|
||||
{{ error_msg }}
|
||||
|
Loading…
Reference in New Issue
Block a user