mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #484 from SchrodingersGat/leven
Install package for fast string matching
This commit is contained in:
commit
dfb0f67b87
@ -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
|
||||
|
@ -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) {
|
||||
|
7
Makefile
7
Makefile
@ -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:
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user