mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-08 16:43:47 +01:00
Create utils folder
This commit is contained in:
parent
038ef5b739
commit
904e09f0dd
@ -13,7 +13,7 @@ Note: you should first read one of the guides on the [Github repo wiki](https://
|
||||
FLASK_CONFIG=../config.cfg celery -A app.tasks.celery worker
|
||||
|
||||
# if sqlite
|
||||
python setup.py -t
|
||||
python utils/setup.py -t
|
||||
rm db.sqlite && python setup.py -t && FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db stamp head
|
||||
|
||||
# Create migration
|
||||
|
@ -15,7 +15,7 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import os, sys, datetime
|
||||
import os, sys, datetime, inspect
|
||||
|
||||
if not "FLASK_CONFIG" in os.environ:
|
||||
os.environ["FLASK_CONFIG"] = "../config.cfg"
|
||||
@ -24,6 +24,11 @@ delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d"
|
||||
create_db = not (len(sys.argv) >= 2 and sys.argv[1].strip() == "-o")
|
||||
test_data = len(sys.argv) >= 2 and sys.argv[1].strip() == "-t" or not create_db
|
||||
|
||||
# Allow finding the `app` module
|
||||
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
parentdir = os.path.dirname(currentdir)
|
||||
sys.path.insert(0,parentdir)
|
||||
|
||||
from app.models import *
|
||||
from app.utils import make_flask_user_password
|
||||
|
Loading…
Reference in New Issue
Block a user