https://github.com/sneha-at-hub/userauthentication-simplejwt-restframework-react
This repository contains a responsive and visually appealing login page built with React. The login page utilizes the Context API for authentication, React Router for navigation, and Bootstrap for layout and styling. This project demonstrates how to create a user-friendly and functional login interface with modern web development practices.
https://github.com/sneha-at-hub/userauthentication-simplejwt-restframework-react
authentication axios-restful corsheaders djangorestframework djangorestframework-simplejwt jazzmin reactjs simplejwt
Last synced: about 2 months ago
JSON representation
This repository contains a responsive and visually appealing login page built with React. The login page utilizes the Context API for authentication, React Router for navigation, and Bootstrap for layout and styling. This project demonstrates how to create a user-friendly and functional login interface with modern web development practices.
- Host: GitHub
- URL: https://github.com/sneha-at-hub/userauthentication-simplejwt-restframework-react
- Owner: sneha-at-hub
- Created: 2024-07-15T05:42:56.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-18T09:01:09.000Z (10 months ago)
- Last Synced: 2024-07-18T11:06:10.952Z (10 months ago)
- Topics: authentication, axios-restful, corsheaders, djangorestframework, djangorestframework-simplejwt, jazzmin, reactjs, simplejwt
- Language: JavaScript
- Homepage:
- Size: 23 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# corsheader
Cross-Origin Resource Sharing headers, or CORS headers, are an important feature of HTTP that ensures a webpage only uses content permitted by other websites/servers.
Django-CORS-header Adding CORS headers allows your resources to be accessed on other domains.
# Prerequisites
Make sure you have the following software installed on your machine:
- Python: Download and install the latest version from Python.org.
- pip: This is the package installer for Python, typically included with Python installation.
- Virtualenv: This helps create isolated Python environments. You can install it using pip if not - already installed:```bash
pip install virtualenv
```
# Clone the repository
First, clone the repository to your local machine using Git. Open your terminal and run the following command:
```bash
https://github.com/sneha-at-hub/Userauthentication-SimpleJWT-RestFramework-react.git
```
## Navigate to the project directory
Change your working directory to the project's directory
```bash
cd backend
```
## Create and Activate virtual Environment
```bash
virtualenv venv
```
### Activate
**On mac/Linux**```bash
source venv/bin/activate
```**On Windows**
```bash
venv\Scripts\activate```
## Install Dependencies
Install the project dependencies listed in the requirements.txt file:
```bash
pip install -r requirements.txt
```
Install Django using pip within your virtual environment:
```bash
pip install django
```
Install Django REST Framework using pip:
```bash
pip install djangorestframework
```
## Set up the Database
Run the following commands to set up the database:
```bash
python manage.py makemigrations
python manage.py migrate
```
## Create a Superuser
Create a superuser to access the Django admin interface:
```bash
python manage.py createsuperuser
```
### Run the Development Server
Start the development server:
```bash
python manage.py runserver
```
The development server will typically be available at **http://127.0.0.1:8000**.## Troubleshooting
### Common Issues- If you encounter an error like pip: command not found, ensure Python and pip are properly installed.
- If you see dependency errors, try deleting the venv folder and re-create the virtual environment, then re-run pip install -r requirements.txt.
# Useful Links:
- [Django Documentation](https://docs.djangoproject.com/en/5.0/)
- [Django REST Framework Documentation](https://www.django-rest-framework.org/)
- [Python Downloads](https://www.python.org/downloads/)
- [pip Documentation](https://pip.pypa.io/en/stable/)