This is a simple API built using Django Rest Framework.
- Python version 3.6.x
- virtualenv
- pip
- django
- django rest framwork (DRF)
- Clone repository using GIT
> git clone [email protected]:wreeecks/douugh.git
- Change directory to src
> cd douugh
- Create and activate virtual environment
> virtualenv env
> source env/bin/activate
- Install Django and DRF
> pip install -r requirements.txt
- Make initial migration then run migrate
> python manage.py makemigrations
> python manage.py migrate
- (Optional) Create a Django superuser
> python manage.py createsuperuser
- Run server
> python manage.py runserver
#output
Django version 2.2.1, using settings 'codetest.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
- Open http://localhost:8000/api/create on any browser
- Fill up the form, then click "Post" button.
- Open http://localhost:8000/api/login on any browser
- Fill up the form, then click "Post" button. This should return a 32 bit string token.
- Change dir to the application root directory
> cd douughcodetest
- Activate virtual env
> source env/bin/activate
- Run test
> python manage.py test