Overview
The DjangoRest & React+ThreeJsTemplate repository is a project that uses Django as a backend REST API and React with ThreeJs as the frontend. It allows users to create a new project and provides instructions on how to install and run the project.
Features
- Backend built with Django
- Frontend built with React and ThreeJs
- REST API using DjangoRestFramework
Installation
To start the project, you will need to have the following installed:
- Node.js - for executing React and installing dependencies such as ThreeJs
- Python + pip - needed for Django and DjangoRestFramework
After installing Node.js, you can install Django and DjangoRestFramework.
- Django: Follow the documentation provided (link not provided).
- DjangoRestFramework: Install using pip.
Once Django is installed, you need to create a superuser for the database before running.
- Enter a username and password for the superuser.
After creating the superuser, you can run the development server.
- If Python has not been added to PATH, you can use
py -3(for Python 3 or higher) orpy -2(for Python 2).
You can view the database information at http://localhost:8080/api.
To install the required dependencies for the React-app (ThreeJs is already included), run the installation command mentioned.
Once the installation finishes, you can run the JavaScript code.
- This will open a browser window at http://localhost:3000 (if not, open it manually).
- You should see a blue spinning cube in the center of the screen. The code for this cube is located in the App.js file.
Summary
The DjangoRest & React+ThreeJsTemplate repository is a project that combines Django, DjangoRestFramework, React, and ThreeJs. It provides a backend REST API using Django, a frontend using React and ThreeJs, and instructions on how to install and run the project. With the ability to create a new project and view database information, this template is a valuable resource for developers looking to work with these technologies.