There are no views, models, or serializers in this boilerplate project. The only code that is included is the ability to register and login. The urls.py
file already imports the required functions from views/auth.py
.
- Clone this repository and
cd
to the project directory - Run
pipenv shell
- Run
pipenv install
- Run
python3 manage.py migrate
to create the default Django tables in your database - Open the project directory in VS Code
- Press ⌘SHIFTP (Mac), or CtrlSHIFTP (Windows) to open the Command Palette, and select "Python: Select Interpreter".
- Search for "rock" and select the interpreter that starts with those characters. There should only be one to choose from.
- Start the debugger
- Mac: Shift+Option+D
- Windows: Shift+Alt+D
- Verify that the process starts with no exceptions
- Open Postman and create a POST request to http://localhost:8000/register with the following JSON body and verify that you can create a new user and get a token in the response body -
{ "email": "admina@straytor.com", "password": "straytor", "first_name": "Admina", "last_name": "Straytor" }