In order to run this project in deployment mode you should create a python virtual environment using this command
$ virtualenv env
Then activate your virtual environment and install required packages
$ source env/bin/activate && pip install -r requirements
After that run project using project manager
$ ./manager.py run
To see project available routes use this command
$ ./manager.py routes
Update python packages using this commend:
$ pip freeze | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
First, install apidoc js
$ ./manager.py doc
./manager.py database create
./manager.py database drop
./manager.py database recreate
This will generate some fake data for development use.
A development user
will be create with last living access token.
./manager.py database fake
- Username:
rishe
- Phone :
09123456789
- Password :
123123
- Access-Token :
123456
Sometimes you make changes in database models and you want to apply them to your database you can use migration for this purpose. first run migration init command and then use migrate and upgrade command to apply your migration
Note that this tool is not 100% trusted and you should review generated migration scripts code and then use upgrade command.
./manager.py migration init
./manager.py migration migrate
./manager.py migration upgrade
To see other commands use help.
./manager.py migration --help