This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
from xml.etree import ElementTree | |
TEMP = './tmp.svg' | |
def rebrand(fname, brand): | |
svg = ElementTree.parse(fname) | |
for e in svg.iterfind(".//{http://www.w3.org/2000/svg}rect[@id='background']"): | |
e.set('style', 'fill:url(#%s);' % (brand,)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from satchless.forms.widgets import DecimalInput | |
from satchless.product.forms import BaseVariantForm | |
from . import models | |
class ProductPriceForm(forms.ModelForm): | |
class Meta: | |
widgets = { | |
'price': DecimalInput(min_decimal_places=2), |