rename create_db to format_db since it can reinitialize existing dbs

This commit is contained in:
deflax 2024-04-02 11:40:12 +03:00
parent f46ee1b358
commit 5a88062c04
3 changed files with 4 additions and 13 deletions

View file

@ -7,6 +7,6 @@
```
4. Initialize db schema using:
```sh
$ docker-compose exec forest python manage.py create_db
$ docker-compose exec forest python manage.py format_db
$ docker-compose exec forest python manage.py seed_db
```

View file

@ -13,8 +13,8 @@ cli = FlaskGroup(app)
migrate = Migrate()
migrate.init_app(app, db)
@cli.command("create_db")
def create_db():
@cli.command("format_db")
def format_db():
db.drop_all()
db.create_all()
db.session.commit()

View file

@ -19,16 +19,8 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
{% if current_user.is_authenticated %}
<li><a href="{{ url_for('panel.deploy') }}"><span class="glyphicon glyphicon-send"></span> Deploy</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-send"></span> Deploy Application</a>
<ul class="dropdown-menu">
<li><a href="/market/1"><span class="glyphicon glyphicon-send"></span> Business</a></li>
<li><a href="/market/2"><span class="glyphicon glyphicon-send"></span> Games</a></li>
<li><a href="/market/3"><span class="glyphicon glyphicon-send"></span> Misc</a></li>
</ul>
<p>hi</p>
{% endif %}
</ul>
@ -46,7 +38,6 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img class="avatar" src="{{ current_user.gravatar(20) }}"> {{ current_user.email }} <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ url_for('panel.dashboard') }}"><span class="glyphicon glyphicon-modal-window"></span> Dashboard</a></li>
<li><a href="{{ url_for('uinvoice.transactions') }}"><span class="glyphicon glyphicon-list-alt"></span> Transactions</a></li>
<li role="separator" class="divider"></li>
<li><a href="{{ url_for('settings.profile') }}"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
<!-- <li><a href="{{ url_for('panel.support_list') }}"><span class="glyphicon glyphicon-question-sign"></span> Support</a></li>-->