You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Setup.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,11 @@ Environment:
18
18
19
19
4.`uv sync`
20
20
21
-
5.Make directory for builds of static files: `mkdir staticfiles`
21
+
5.`uv run pre-commit install` (for installing git hook in .git)
22
22
23
-
6. Create .env file for storing secrets. The contents should be like:
23
+
6. Make directory for builds of static files: `mkdir staticfiles`
24
+
25
+
7. Create .env file for storing secrets. The contents should be like:
24
26
25
27
```ini
26
28
# PostgreSQL
@@ -34,9 +36,9 @@ Environment:
34
36
OFFERINGS_THRESHOLD_FOR_TERM_UPDATE=100
35
37
```
36
38
37
-
7. Build static files: `make collect`
39
+
8. Build static files: `make collect`
38
40
39
-
8. Configure database
41
+
9. Configure database
40
42
41
43
1. Install Postgres:
42
44
@@ -89,11 +91,11 @@ Environment:
89
91
90
92
10. Auto setup database connection and static file routes in Django: `make migrate`, `make makemigrations`
91
93
92
-
9. Install cache database redis: `sudo apt install redis-server`, `sudo systemctl start redis`. Run `sudo systemctl enable redis` to auto-start redis service on start-up.
94
+
10. Install cache database valkey: `sudo apt install valkey`, `sudo systemctl start valkey`. Run `sudo systemctl enable valkey` to auto-start valkey service on start-up.
93
95
94
-
10. `make run`and visit <http://127.0.0.1:8000/>
96
+
11. `make run`and visit <http://127.0.0.1:8000/>
95
97
96
-
11. Add local admin:
98
+
12. Add local admin:
97
99
98
100
1. `make createsuperuser`. The email can be blank. Use a strong password in production.
99
101
@@ -110,7 +112,7 @@ Environment:
110
112
u.save()
111
113
```
112
114
113
-
12. Crawl data from JI official website:
115
+
13. Crawl data from JI official website:
114
116
115
117
1. Edit `COURSE_DETAIL_URL_PREFIX`in`apps/spider/crawlers/orc.py`: Add a number after url param `id`like this: `...?id=23`, so only course id starting from23 (e.g. 230-239, 2300) will be crawled, so as to save time during development. Remember not to commit this change.
116
118
@@ -123,4 +125,4 @@ Environment:
123
125
crawl_and_import_data()
124
126
```
125
127
126
-
13. Run frontend (dev mode): `make dev-frontend`and visit http://127.0.0.1:5173/
128
+
14. Run frontend (dev mode): `make dev-frontend`and visit http://127.0.0.1:5173/
0 commit comments