Application Programming Interface built under Django Rest Framework. It's used in ProjeX app. Tested and deployed using Travis CI framework
-
Open
set-env.sh
file and modify it as follows:# Change this source virt-env/bin/activate export DJANGO_DB_NAME="api-projex" export DJANGO_USERNAME="julio" export DJANGO_PASSWORD="12345678" export SECRET_KEY='&o0ff+%&_th__u0!7uu82h6wsq)ac%bkh&81$+l#@77)01v)fk' # ..to this source virt-env/bin/activate export DJANGO_DB_NAME="YOUR DATABASE NAME" export DJANGO_USERNAME="YOUR DATABASE USERNAME" export DJANGO_PASSWORD="YOUR DATABASE PASSWORD" export SECRET_KEY='&o0ff+%&_th__u0!7uu82h6wsq)ac%bkh&81$+l#@77)01v)fk'
-
Set permissions to
set-env.sh
withsudo chmod +777 set-env.sh
. In case you don't have sudo, then just execute each script line manually in your terminal. -
Activate virtual environment and export environment variables using
source set-env.sh
. -
Install all required packages using
make freeze
. -
Run migrations using
python manage.py migrate
. -
Start app using
python manage.py runserver
.
- Open this url in your browser when your server is running
127.0.0.1/api/v1/rest-auth/registration
. - Create a user with the following credentials:
username: admin
,email: admin@admin.com
andpassword: admin12345
. - Comment
'rest_framework.authentication.SessionAuthentication',
line fromsettings.py
. - Login from your running app.