make things cleaner
This commit is contained in:
parent
985f7c7bcd
commit
5af336fff3
|
@ -19,7 +19,7 @@ def timed(method):
|
||||||
ts = time.time()
|
ts = time.time()
|
||||||
result = method(*args, **kw)
|
result = method(*args, **kw)
|
||||||
te = time.time()
|
te = time.time()
|
||||||
args[0].print_success(f"{method.__name__} executed ({te-ts:.2f}s)")
|
args[0].print_success(f"\n {method.__name__} executed ({te-ts:.2f}s)")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
return _timed
|
return _timed
|
||||||
|
|
|
@ -14,5 +14,5 @@ class Command(BaseCommand):
|
||||||
subprocess.call("./apps/scripts/shell/tabularasa")
|
subprocess.call("./apps/scripts/shell/tabularasa")
|
||||||
call_command('import_account', alias=True, chunk=1000, save = "map.json")
|
call_command('import_account', alias=True, chunk=1000, save = "map.json")
|
||||||
call_command('import_activities', chunk=100, map="map.json")
|
call_command('import_activities', chunk=100, map="map.json")
|
||||||
call_command('import_transaction', buttons=True, map="map.json")
|
call_command('import_transaction', chunk=10000, buttons=True, map="map.json")
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/sh
|
#!/usr/bin/sh
|
||||||
sudo -u postgres sh -c "dropdb note_db && psql -c 'CREATE DATABASE note_db OWNER note;'";
|
sudo -u postgres sh -c "dropdb note_db && psql -c 'CREATE DATABASE note_db OWNER note;'";
|
||||||
echo 'reset db';
|
echo 'reset db';
|
||||||
source "env/bin/activate"
|
find apps/ -path "*/migrations/*.py*" -not -name "__init__.py" -delete
|
||||||
|
./manage.py makemigrations
|
||||||
./manage.py migrate
|
./manage.py migrate
|
||||||
./manage.py loaddata initial
|
./manage.py loaddata initial
|
||||||
|
|
Loading…
Reference in New Issue