Skip to content

Commit ffcef97

Browse files
authored
Merge pull request #18 from lqez/main
Apply styles and add fixtures
2 parents 34cb90f + 3da659c commit ffcef97

File tree

25 files changed

+1983
-90
lines changed

25 files changed

+1983
-90
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,6 @@ cython_debug/
169169

170170
# PyPI configuration file
171171
.pypirc
172+
173+
# Misc
174+
.DS_Store

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
# python.or.kr-wip
22

3-
# 개발 환경 구축
3+
## 개발 환경 구축
44

5-
```
6-
docker compose up
7-
```
5+
### 1. Docker compose 이용
86

9-
http://localhost:8080/cms/
7+
테스트용 계정 정보
8+
- id: test
9+
- password: test
1010

11-
test / test
11+
```
12+
$ docker-compose up
13+
```
14+
- 접속 URL: http://localhost:8080/cms/
1215

1316

14-
# settings
17+
### 2. Django runserver 이용
18+
19+
```
20+
$ source .venv/bin/activate
21+
$ cd pythonkr_backend
22+
$ python manage.py migrate
23+
$ python manage.py runserver
24+
```
25+
26+
Tailwind CSS 작업을 위해 다른 창에서 다음을 실행
27+
```
28+
$ python manage.py tailwind start
29+
```
30+
31+
## Django settings
1532
- pythonkr_backend.settings # local sqlite testing
1633
- pythonkr_backend.settings.localtesting # docker compose testing
1734
- pythonkr_backend.settings.prod # production

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ uv sync
77
cd /app/pythonkr_backend
88
export DJANGO_SETTINGS_MODULE="pythonkr_backend.settings.localtesting"
99
./manage.py migrate --no-input
10+
./manage.py tailwind build
1011
./manage.py collectstatic --clear --noinput
1112
export DJANGO_SUPERUSER_PASSWORD=test
1213
./manage.py createsuperuser --username test --email [email protected] --noinput
1314
gunicorn --workers=2 \
1415
-b :8080 \
1516
--access-logfile - \
1617
--error-logfile - \
17-
pythonkr_backend.wsgi
18+
pythonkr_backend.wsgi

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ requires-python = ">=3.12"
77
dependencies = [
88
"beautifulsoup4>=4.13.3",
99
"django>=5.1.7",
10+
"django-tailwind[reload]>=3.8.0",
1011
"gunicorn>=23.0.0",
1112
"httpx>=0.28.1",
1213
"llm>=0.24.2",

pythonkr_backend/pythonkr/fixtures/pythonkr.json

Lines changed: 37 additions & 0 deletions
Large diffs are not rendered by default.

pythonkr_backend/pythonkr/migrations/0001_initial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Migration(migrations.Migration):
3030
name='PKHomePage',
3131
fields=[
3232
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
33-
('body', wagtail.fields.RichTextField(blank=True)),
33+
('content', wagtail.fields.RichTextField(blank=True)),
3434
],
3535
options={
3636
'abstract': False,

pythonkr_backend/pythonkr/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Meta:
1313
abstract = True
1414

1515
def get_context(self, request, *args, **kwargs):
16-
"common context for PK"
16+
"common context for Python Korea"
1717
context = super().get_context(request, *args, **kwargs)
1818

1919
SponsorPageModel = apps.get_model("pythonkr", "PKSponsors")
@@ -81,17 +81,17 @@ def save(self, *args, **kwargs):
8181

8282
class PKHomePage(PKBasePage):
8383
template = "pythonkr/pk_home.html"
84-
body = RichTextField(blank=True)
84+
content = RichTextField(blank=True)
8585

8686
subpage_types = [
8787
PKPage,
8888
PKDocPage,
8989
]
9090

9191
content_panels = Page.content_panels + [
92-
FieldPanel("body"),
92+
FieldPanel("content"),
9393
]
9494

9595
def get_context(self, request, *args, **kwargs):
9696
context = super().get_context(request, *args, **kwargs)
97-
return context
97+
return context
Binary file not shown.
Binary file not shown.
38.2 KB
Loading

0 commit comments

Comments
 (0)