Yoonjunhyeon

자동화 부분 수정 (자동화 미완성...)

1 #!/bin/bash 1 #!/bin/bash
2 +cd ../frontend
3 +npm install
4 +npm run build
5 +
6 +cd ../backend
2 . env/bin/activate 7 . env/bin/activate
3 pip install -r requirements.txt 8 pip install -r requirements.txt
9 +rm -rf static
10 +./manage.py collectstatic
11 +rm -rf static/admin
12 +rm -rf static/rest_framework
13 +
14 +python manage.py makemigrations
4 python manage.py migrate 15 python manage.py migrate
5 -python manage.py runserver 0.0.0.0:8000
...\ No newline at end of file ...\ No newline at end of file
16 +
17 +# python vue2djangoTemplate.py (자동화 - 작성예정, 어캐함??ㅠ)
18 +
19 +# 현재 vue index를 django template으로 자동화 하는 코드를 작성하지 못하여,
20 +# 수동으로 바꿔야 합니다.
21 +# 이 스크립트를 실행 후에 생기는 static/index.html의
22 +# href, src 링크를 templates/index.html의 href, src로 변경하면 정상적으로 작동합니다.
...\ No newline at end of file ...\ No newline at end of file
......
1 #!/bin/bash 1 #!/bin/bash
2 cd ../frontend 2 cd ../frontend
3 +npm install
3 npm run build 4 npm run build
5 +
4 cd ../backend 6 cd ../backend
5 . env/bin/activate 7 . env/bin/activate
8 +pip install -r requirements.txt
6 rm -rf static 9 rm -rf static
7 ./manage.py collectstatic 10 ./manage.py collectstatic
8 rm -rf static/admin 11 rm -rf static/admin
9 rm -rf static/rest_framework 12 rm -rf static/rest_framework
13 +
14 +python manage.py makemigrations
15 +python manage.py migrate
10 python vue2djangoTemplate.py 16 python vue2djangoTemplate.py
17 +python manage.py runserver 0.0.0.0:8000
...\ No newline at end of file ...\ No newline at end of file
......
1 #!/bin/bash 1 #!/bin/bash
2 +. env/bin/activate
2 python manage.py migrate 3 python manage.py migrate
3 python manage.py runserver 0.0.0.0:8000 4 python manage.py runserver 0.0.0.0:8000
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -26,29 +26,3 @@ ...@@ -26,29 +26,3 @@
26 </body> 26 </body>
27 27
28 </html> 28 </html>
...\ No newline at end of file ...\ No newline at end of file
29 -
30 -<!DOCTYPE html>
31 -<html lang=en>
32 -
33 -<head>
34 - <meta charset=utf-8>
35 - <meta http-equiv=X-UA-Compatible content="IE=edge">
36 - <meta name=viewport content="width=device-width,initial-scale=1">
37 - <link rel=icon href=/favicon.ico>
38 - <title>Profit-Hunter</title>
39 - <link href=/css/app.1dc1d4aa.css rel=preload as=style>
40 - <link href=/css/chunk-vendors.abb36e73.css rel=preload as=style>
41 - <link href=/js/app.a2bbd68a.js rel=preload as=script>
42 - <link href=/js/chunk-vendors.c489da91.js rel=preload as=script>
43 - <link href=/css/chunk-vendors.abb36e73.css rel=stylesheet>
44 - <link href=/css/app.1dc1d4aa.css rel=stylesheet>
45 -</head>
46 -
47 -<body><noscript><strong>We're sorry but front doesn't work properly without JavaScript enabled. Please enable it to
48 - continue.</strong></noscript>
49 - <div id=app></div>
50 - <script src=/js/chunk-vendors.c489da91.js></script>
51 - <script src=/js/app.a2bbd68a.js></script>
52 -</body>
53 -
54 -</html>
...\ No newline at end of file ...\ No newline at end of file
......
1 +import os
2 +read = open("static/index.html", 'r')
3 +write = open("templates/index.html", 'w')
4 +
......