File tree Expand file tree Collapse file tree 1 file changed +29
-37
lines changed
Expand file tree Collapse file tree 1 file changed +29
-37
lines changed Original file line number Diff line number Diff line change 1-
2- # Django-React-Typescript-Vite Starter Template
1+ # Django-React Starter Template
32
43## Stack
54
1312```
1413$PROJECT_ROOT
1514│
16- ├── web # backend file
15+ ├── src/backend # backend file
1716│
18- ├── frontend # React files
17+ ├── src/ui # React files
1918│
20- ├── web /templates # Django Templates
19+ ├── src /templates # Django Templates
2120│
22- ├── web/static-dev # Django Static Files
21+ ├── src/staticfiles # Django Static Files
2322```
2423---
2524
@@ -29,77 +28,70 @@ $PROJECT_ROOT
2928
3029- Clone Repo
3130
32- ```
31+ ``` bash
3332mkdir django_react
3433cd django_react
3534git clone https://github.com/Arvind-4/django-react-typescript-webpack.git .
3635```
3736- Create Virtual Environment for Python
3837
39- ```
40- pip install virtualenv
41- python -m venv .
38+ ``` bash
39+ python3.10 -m pip install virtualenv
40+ python3.10 -m virtualenv .
4241```
4342
4443- Activate Virtual Environment
4544
46- ```
45+ ``` bash
4746source bin/activate
4847```
4948
5049- Install Dependencies
5150
52- ```
51+ ``` bash
52+ cd src
5353pip install -r requirements.txt
5454```
5555
56- > ** _ NOTE:_ ** To Install Latest Dependencies run command <br />
57- > ``
58- > pip install -r required.txt
59- > ``
60-
6156- Install Dependencies (For Poetry)
6257
63- ```
58+ ``` bash
59+ cd src
6460poetry install
6561```
6662
6763- Make Migrations
6864
69- ```
65+ ``` bash
66+ cd src
7067python manage.py makemigrations
7168python manage.py migrate
7269```
7370- Run Server
7471
75- ```
72+ ``` bash
73+ cd src
7674python manage.py runserver
7775```
7876
7977#### For Frontend
8078
8179- Install Dependencies
8280
83- ```
84- cd frontend/
85- yarn
81+ ``` bash
82+ cd src/ui
83+ pnpm i
8684```
8785- Run Vite
8886
87+ ``` bash
88+ cd src/ui
89+ pnpm dev
8990```
90- yarn dev
91- ```
92- <br />
93-
9491
95- > ** _ NOTE:_ ** To Use Django & React in With hot reload in Django Templates Run: <br />
96- > ```
97- > cd web/
98- > python manage.py runserver
99- > ```
100- > and
101- > ```
102- > cd frontend/
103- > yarn dev
104- > ```
92+ - For production
10593
94+ ``` bash
95+ cd src/ui
96+ pnpm collectstatic
97+ ```
You can’t perform that action at this time.
0 commit comments