Merge pull request #484 from SchrodingersGat/leven

Install package for fast string matching
This commit is contained in:
Oliver 2019-09-07 23:40:28 +10:00 committed by GitHub
commit dfb0f67b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 5 deletions

View File

@ -69,7 +69,7 @@ class Currency(models.Model):
cur.save()
# If there are no currencies set as the base currency, set this as base
if not Currency.objects.filter(base=True).exists():
if not Currency.objects.exclude(pk=self.pk).filter(base=True).exists():
self.base = True
# If this is the base currency, ensure value is set to unity

View File

@ -60,6 +60,13 @@
field: 'value',
title: 'Value',
sortable: true,
formatter: function(value, row, index, field) {
if (row.base) {
return "Base Currency";
} else {
return value;
}
}
},
{
formatter: function(value, row, index, field) {

View File

@ -15,10 +15,11 @@ migrate:
python3 InvenTree/manage.py makemigrations stock
python3 InvenTree/manage.py makemigrations build
python3 InvenTree/manage.py makemigrations order
python3 InvenTree/manage.py migrate
python3 InvenTree/manage.py migrate --run-syncdb
python3 InvenTree/manage.py makemigrations
cd InvenTree && python3 manage.py migrate
cd InvenTree && python3 manage.py migrate --run-syncdb
python3 InvenTree/manage.py check
python3 InvenTree/manage.py collectstatic
cd InvenTree && python3 manage.py collectstatic
# Install all required packages
install:

View File

@ -14,4 +14,5 @@ django-qr-code==1.0.0 # Generate QR codes
flake8==3.3.0 # PEP checking
coverage>=4.5.3 # Unit test coverage
python-coveralls==2.9.1 # Coveralls linking (for Travis)
fuzzywuzzy>=0.17.0 # Fuzzy string matching
fuzzywuzzy>=0.17.0 # Fuzzy string matching
python-Levenshtein>=0.12.0 # Required for fuzzywuzzy