diff --git a/README.md b/README.md index efcc443..73826a7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ By popular demand, I'm building a better anonkun. It doesn't do much right now t Python 3.6+ PostgreSQL 10.4+ Redis 4.0.10+ -Python packages: `django psycopg2 channels channels_redis jinja2 argon2-cffi bleach requests python-magic` +Python packages: `django psycopg2 channels channels_redis jinja2 argon2-cffi bleach requests python-magic django-taggit` ## Install ``` @@ -17,6 +17,9 @@ postgres=# ALTER ROLE "titivillus" SET default_transaction_isolation TO 'read co postgres=# ALTER ROLE "titivillus" SET timezone TO 'UTC'; postgres=# GRANT ALL PRIVILEGES ON DATABASE "titivillus" TO "titivillus"; postgres=# \q +$ psql titivillus +titivillus=# CREATE EXTENSION unaccent; +titivillus=# \q ``` 1. Get on the floor 2. Walk the dinosaur diff --git a/create_quest/views.py b/create_quest/views.py index 00e5445..d3a9ee9 100644 --- a/create_quest/views.py +++ b/create_quest/views.py @@ -20,14 +20,20 @@ def index(request): post_form = PostForm(request.POST, instance=post) if all((quest_form.is_valid(), post_form.is_valid())): quest.save() - page = Page( + page0 = Page( + quest=quest, + page_num=0, + title="Homepage" + ) + page0.save() + page1 = Page( quest=quest, page_num=1, title="Page 1" ) - page.save() + page1.save() post.quest = quest - post.page = page + post.page = page1 post.save() return redirect('quest:quest', quest_id=quest.id) else: diff --git a/homepage/jinja2/homepage/index.html b/homepage/jinja2/homepage/index.html index e49bbd8..0c2b2bc 100644 --- a/homepage/jinja2/homepage/index.html +++ b/homepage/jinja2/homepage/index.html @@ -2,6 +2,12 @@ {% block title %}Index{% endblock %} {% block content %}
{{ quest.title }} | +