-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdrf_react.sh
More file actions
124 lines (101 loc) · 1.63 KB
/
Copy pathdrf_react.sh
File metadata and controls
124 lines (101 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
cat <<EOF >.gitignore
.DS_Store
EOF
echo 'Which version of Django do you want: '
read django_version
mkdir backend && mkdir frontend && cd backend && python3 -m venv ./env && source env/bin/activate && pip install django==$django_version && pip install djangorestframework && pip install django-environ && pip freeze > requirements.txt
echo 'Enter Django project name: '
read django_proj_name
django-admin startproject $django_proj_name .
cat <<EOF >.gitignore
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.manifest
*.spec
pip-log.txt
pip-delete-this-directory.txt
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
*.mo
*.pot
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
instance/
.webassets-cache
.scrapy
docs/_build/
.pybuilder/
target/
.ipynb_checkpoints
profile_default/
ipython_config.py
.pdm.toml
__pypackages__/
celerybeat-schedule
celerybeat.pid
*.sage.py
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.spyderproject
.spyproject
.ropeproject
/site
.mypy_cache/
.dmypy.json
dmypy.json
.pyre/
.pytype/
cython_debug/
.DS_Store
EOF
cd $django_proj_name
cat <<EOF >.env.template
SK=secretkey
DEBUG=debug_boolean
EOF
cat <<EOF >.env
SK=
DEBUG=True
EOF
cd ../../frontend
npx create-react-app .
# Removing unwanted React files
rm -rf readme.md && cd public && rm -rf logo192.png logo512.png favicon.ico && cd ../src && rm -rf App.css index.css App.test.js reportWebVitals.js setupTests.js logo.svg