- Application built in Python using DJango.
- Configured to be depoyed in Heroku.
Endpoint | Description | Token |
---|---|---|
/ | Admin Django - WEB | |
/api/v1/ | Api root |
Endpoint | Description | Token |
---|---|---|
/api/v1/registration/ | Registration | |
/api/v1/login/ | Login | |
/api/v1/logout/ | Logout | |
/api/v1/password/change/ | Change password | |
/api/v1/password/reset/ | Forgot password - send url -> /reset/uid/token/ | |
/api/v1/password/reset/confirm/ | Forgot password confirmation |
Endpoint | Description | Token |
---|---|---|
/api/v1/user/ | Get current user | |
/api/v1/user/ | Total update of current user | |
/api/v1/user/ | Partial update of current user |
sudo apt install python3
sudo apt install python-pip
sudo pip install virtualenv
sudo apt install python3-dev
sudo apt install libpq-dev
git clone https://github.com/larry852/sports-miso-02
cd sports-miso-02
virtualenv -p python3 env
source env/bin/activate
pip install -r requirements.txt
python manage.py runserver
cd sports-miso-02
source env/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
python manage.py startapp xxx
Replace the "xxx" value for the module name.
pip freeze
pip freeze > requirements.txt
Remember:
- Create an empty "sports" database if you are using postgres.
- Follow this link if you have troubles with PostgreSQL connection.
Set this environment variable in your local:
export DJANGO_DATABASE="xxx"
Replace the "xxx" value for:
- "postgres" --> Connect to local postgres database.
- "heroku" --> Connect to postgres database in Heroku.
If you don't set the "DJANGO_DATABASE", the "default" database is going to be the local SQLite3 database.