This is step 1 of getting the frontend (React) app to be able to talk to the API (Django) app. We need to be able to create new users, let them log in, and be able to persist an authentication token to be used for subsequent API requests.
users app
First, this adds a new Django "app" called users that is intended to centralize all the logic needed around user management.
The User model was moved from the transactions app in to users
A register View and endpoint were added
A me View was added so that the client can check if a session is active and a token can fetched if needed
Login is provided by rest_framework
Auth pages
New "Sign up" and "Log in" pages were added
Form styling CSS
Logic to store auth tokens in browser SessionStore, and include in API request headers
More logic to request and display transactions will be included in a followup PR.
This is step 1 of getting the frontend (React) app to be able to talk to the API (Django) app. We need to be able to create new users, let them log in, and be able to persist an authentication token to be used for subsequent API requests.
users
appFirst, this adds a new Django "app" called
users
that is intended to centralize all the logic needed around user management.User
model was moved from thetransactions
app in tousers
register
View and endpoint were addedme
View was added so that the client can check if a session is active and a token can fetched if neededrest_framework
Auth pages
More logic to request and display transactions will be included in a followup PR.