Challenge for Belvo Application
|
|
5 năm trước cách đây | |
|---|---|---|
| application | 5 năm trước cách đây | |
| transactions | 5 năm trước cách đây | |
| users | 5 năm trước cách đây | |
| .dockerignore | 5 năm trước cách đây | |
| .gitignore | 5 năm trước cách đây | |
| Dockerfile | 5 năm trước cách đây | |
| Readme.md | 5 năm trước cách đây | |
| docker-compose.yml | 5 năm trước cách đây | |
| entrypoint.sh | 5 năm trước cách đây | |
| manage.py | 5 năm trước cách đây | |
| requirements.txt | 5 năm trước cách đây |
Author: Javier Guignard
You can see demo in https://demo.kaajavi.com/
If you want to see the admin panel,
the default email is admin@admin.com and their password is admin
The first thing to do is to clone the repository:
$ git clone https://gogs.kaajavi.com/kaajavi/BelvoApp.git
$ cd BelvoApp
Create a virtual environment to install dependencies in and activate it:
$ virtualenv2 --no-site-packages env
$ source env/bin/activate
Then install the dependencies:
(env)$ pip install -r requirements.txt
Note the (env) in front of the prompt. This indicates that this terminal
session operates in a virtual environment set up by virtualenv2.
Once pip has finished downloading the dependencies:
(env)$ python manage.py migrate
(env)$ python manage.py create_superuser
(env)$ python manage.py runserver
And navigate to http://127.0.0.1:8000/.
The home page is the API documentation.
I remove the session authentication and I didn't set up the authentication by JWT or similar token, so the API is open for everybody.
I suppose you have installed docker and docker-compose. If not, try with here
Run:
$ docker-compose up
and server runs in development mode.
After run, the command call db migrates, create superuser if not exists and run server in 8080 port.
To run the tests, cd into the directory where manage.py is:
(env)$ python manage.py test users
(env)$ python manage.py test transactions