Django REST Framework + Angular codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Django REST Framework + Angular including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Django REST Framework + Angular community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
See how the Medium.com clone (called Conduit) is built using Django REST Framework and Angular.
Ensure you have Python 3 and Node.js installed on your system. The current project dependency versions are:
- Python 3.10
- Node.js 18.5.0
- Install frontend dependencies and start frontend locally:
npm --prefix=frontend install
npm --prefix=frontend start
This command will install and start the Angular development server. You can access the Angular application through your web browser at http://localhost:4200
.
- Install and build frontend as static files (Choose this if you don't want to make any changes to Frontend project):
npm --prefix=frontend install
npm --prefix=frontend run build
- Set up a virtual environment
# Install environment and dependencies
python3 -m venv .venv
source .venv/bin/activate
# or use this command on Windows
python3 -m venv .venv
.venv/Scripts/activate
- Install backend dependencies:
pip install -r backend/requirements.txt
- Apply database migrations:
# Apply migrations
python backend/manage.py migrate
- Run the Django development server:
# Run server
python backend/manage.py runserver
Now, your local server should be running, and you can access this Django/Angular application through your web browser at http://localhost:8000.