Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/0.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Jul 15, 2012
2 parents f036f1f + e7571de commit 65494dc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
2012-07-15 klen

* Version 0.2.5
* Added wsgi file.
* Version 0.2.6
* Added wsgi file

2012-07-14 klen

Expand Down
2 changes: 1 addition & 1 deletion base/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.5"
__version__ = "0.2.6"
2 changes: 1 addition & 1 deletion base/migrations/0001_initial_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class Migration(BaseMigration):

def up(self):
from base.app import db
from base.ext import db
from base.users.models import Role, User

admin = Role(name='admin')
Expand Down
15 changes: 15 additions & 0 deletions base/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,30 @@ class CreateDB(Command):
def run(self):
from base.ext import db
db.create_all()

# Evolution support
from flask import current_app
from flask.ext.evolution import db as evolution_db
evolution_db.init_app(current_app)
evolution_db.create_all()

print "Database created successfuly"


class DropDB(Command):
" Drops all database tables. "
def run(self):
from base.ext import db

if prompt_bool("Are you sure? You will lose all your data!"):
db.drop_all()

# Evolution support
from flask import current_app
from flask.ext.evolution import db as evolution_db
evolution_db.init_app(current_app)
evolution_db.drop_all()

print "Database clearing"


Expand Down

0 comments on commit 65494dc

Please sign in to comment.