Skip to content

Commit d9b0537

Browse files
committed
Fixes to reduce confusion of column names
1 parent 0aa48a3 commit d9b0537

File tree

5 files changed

+9
-19
lines changed

5 files changed

+9
-19
lines changed

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

pythonkr_backend/pythonkr/templates/pythonkr/pk_base.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
3636
<div class="container">
3737
<a class="navbar-brand" href="{% pageurl current_site.root_page %}">
38-
<img src="{% static 'pao/01-Main2.png' %}" alt="Python Asia Organization Logo"
38+
<img src="{% static 'pythonkr/pythonkr-badge.png' %}" alt="Python Korea Logo"
3939
height="80"/>
4040
</a>
4141
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
@@ -53,7 +53,9 @@
5353

5454
<!-- Main Content -->
5555
<main class="container mt-5 pt-5">
56-
{% block content %}{% endblock content %}
56+
{% block content %}
57+
{{ page.content|richtext }}
58+
{% endblock %}
5759
</main>
5860

5961
<!-- Footer -->
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
{% extends 'pythonkr/pk_base.html' %}
22
{% load wagtailcore_tags %}
3-
4-
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5-
6-
{% block content %}
7-
{{ page.body|richtext }}
8-
{% endblock %}
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
{% extends 'pythonkr/pk_base.html' %}
22
{% load wagtailcore_tags %}
3-
4-
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5-
6-
{% block content %}
7-
{{ page.body|richtext }}
8-
{% endblock %}

0 commit comments

Comments
 (0)