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: 4. Initialize db schema using:
```sh ```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 $ docker-compose exec forest python manage.py seed_db
``` ```

View file

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

View file

@ -19,16 +19,8 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<li><a href="{{ url_for('panel.deploy') }}"><span class="glyphicon glyphicon-send"></span> Deploy</a></li> <p>hi</p>
<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>
{% endif %} {% endif %}
</ul> </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> <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"> <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('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 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('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>--> <!-- <li><a href="{{ url_for('panel.support_list') }}"><span class="glyphicon glyphicon-question-sign"></span> Support</a></li>-->