jean-zombie / cookiecutter-django-wagtail Goto Github PK
View Code? Open in Web Editor NEWCookiecutter Django + Wagtail
License: BSD 3-Clause "New" or "Revised" License
Cookiecutter Django + Wagtail
License: BSD 3-Clause "New" or "Revised" License
Hello,
I've built the project, added a new field to the HomePage model, and added data via the admin panel.
However, when I'm trying to render {{page.body}} to the template, I get nothing. When I create a child page of the home page, it seems to work. But I need to be able to use all this for my home page. Not sure whats going on :(
models.py
`from wagtail.models import Page
from wagtail.fields import RichTextField
from wagtail.admin.panels import FieldPanel
class HomePage(Page):
body = RichTextField(blank=True)
content_panels = Page.content_panels + [
FieldPanel('body'),
]`
templates/home/home_page.html
`{% extends "base.html" %}
{% load wagtailcore_tags %}
{% block body_class %}template-homepage{% endblock %}
{% block content %}
{{page.title}}
{{ page.body|richtext }}
{% endblock %}`
When you first fire up the project, it gives you django.urls.exceptions.NoReverseMatch
because index.html
doesn't find the about
route.
django.urls.exceptions.NoReverseMatch: Reverse for 'about' not found. 'about' is not a valid view function or pattern name.
I have provided a quick solution in a pull request
Version of cookiecutter CLI (get it with cookiecutter --version
): 1.7.3
OS name and version: Ubuntu 20.04
Python version, run python3 -V
:
Docker version (if using Docker), run docker --version
: Docker version 20.10.11, build dea9396
docker-compose version (if using Docker), run docker-compose --version
: docker-compose version 1.25.0, build unknown
...
{
"cookiecutter": {
"project_name": "wagtail-cookie-test",
"project_slug": "wagtail_cookie_test",
"description": "uau project",
"author_name": "deleyva",
"domain_name": "example.com",
"email": "[email protected]",
"version": "0.1.0",
"open_source_license": "MIT",
"timezone": "Europe/Madrid",
"windows": "n",
"use_pycharm": "n",
"use_docker": "y",
"postgresql_version": "13.2",
"js_task_runner": "None",
"cloud_provider": "None",
"mail_service": "Mailgun",
"use_async": "n",
"use_drf": "y",
"custom_bootstrap_compilation": "n",
"use_compressor": "n",
"use_celery": "y",
"use_mailhog": "y",
"use_sentry": "y",
"use_whitenoise": "y",
"use_heroku": "n",
"ci_tool": "None",
"keep_local_envs_in_vcs": "y",
"debug": "n",
"_template": "[email protected]:Jean-Zombie/cookiecutter-django-wagtail.git"
}
}
4.0 requirements tables
Name | Version in Master | 4.0 Compatible Version | OK |
---|---|---|---|
pytz | 2021.3 | n/a | ✅ |
python-slugify | 5.0.2 | n/a | ✅ |
Pillow | 8.4.0 | n/a | ✅ |
rcssmin | 1.0.6 | n/a | ✅ |
argon2-cffi | 21.1.0 | n/a | ✅ |
whitenoise | 5.3.0 | 6.0.0 | ✅ |
redis | 4.0.1 | n/a | ✅ |
hiredis | 2.0.0 | n/a | ✅ |
celery | 5.2.0 | n/a | ✅ |
django-celery-beat | 2.2.1 | ❌ | |
flower | 1.0.0 | n/a | ✅ |
uvicorn | 0.15.0 | n/a | ✅ |
django | 3.1.13 | n/a | ✅ |
django-environ | 0.8.1 | ❓ | |
django-model-utils | 4.2.0 | ❌ | |
django-allauth | 0.46.0 | 0.48.0 | ✅ |
django-crispy-forms | 1.13.0 | 1.14.0 | ✅ |
crispy-bootstrap5 | 0.6 | 0.6 | ✅ |
django-compressor | 2.4.1 | 3.1 | ✅ |
django-redis | 5.0.0 | 5.2.0 | ✅ |
djangorestframework | 3.12.4 | 3.13.1 | ✅ |
django-cors-headers | 3.10.0 | 3.11.0 | ✅ |
wagtail | 2.14.1 | 2.16.1 | ✅ |
Name | Version in Master | 4.0 Compatible Version | OK |
---|---|---|---|
Werkzeug | 2.0.2 | n/a | ✅ |
ipdb | 0.13.9 | n/a | ✅ |
psycopg2 | 2.9.2 | n/a | ✅ |
psycopg2-binary | 2.9.2 | n/a | ✅ |
watchgod | 0.7 | n/a | ✅ |
mypy | 0.910 | n/a | ✅ |
django-stubs | 1.8.0 | ❌ | |
pytest | 6.2.5 | n/a | ✅ |
pytest-sugar | 0.9.4 | n/a | ✅ |
djangorestframework-stubs | 1.4.0 | n/a | ✅ |
sphinx | 4.3.0 | n/a | ✅ |
sphinx-autobuild | 2021.3.14 | n/a | ✅ |
flake8 | 4.0.1 | n/a | ✅ |
flake8-isort | 4.1.1 | n/a | ✅ |
coverage | 6.1.2 | n/a | ✅ |
black | 21.11b1 | n/a | ✅ |
pylint-django | 2.4.4 | ❓ | |
pylint-celery | 0.3 | n/a | ✅ |
pre-commit | 2.15.0 | n/a | ✅ |
factory-boy | 3.2.1 | ❌ | |
django-debug-toolbar | 3.2.2 | 3.2.4 | ✅ |
django-extensions | 3.1.5 | ❌ | |
django-coverage-plugin | 2.0.2 | ❌ | |
pytest-django | 4.4.0 | 4.5.2 | ✅ |
Name | Version in Master | 4.0 Compatible Version | OK |
---|---|---|---|
gunicorn | 20.1.0 | n/a | ✅ |
psycopg2 | 2.9.2 | n/a | ✅ |
Collectfast | 2.2.0 | n/a | ✅ |
sentry-sdk | 1.5.0 | n/a | ✅ |
hiredis | 2.0.0 | n/a | ✅ |
django-storages | 1.12.3 | ❌ | |
django-anymail | 8.4 | 8.5 | ✅ |
Used Cookiecutter, went through the set up, followed the instructions. Images and containers all built with no problems, but when trying to migrate the database or anything with Postgres, it just locks up the terminal by printing "Waiting for Postgres to become available" repeatedly.
It should have connected and created the tables and migrations.
I didn't make any changes to the project that the install instructions didn't instruct me to do.
cookiecutter --version
): Cookiecutter 1.7.2"project_slug": "dj_grimmstar",
"description": "Test env",
"author_name": "Cyriina Grimm",
"domain_name": "grimmstar.online",
"email": "[email protected]",
"version": "0.1.0",
"open_source_license": "MIT",
"timezone": "EST",
"windows": "n",
"use_pycharm": "n",
"use_docker": "y",
"postgresql_version": "12.3",
"js_task_runner": "Gulp",
"cloud_provider": "None",
"mail_service": "Mailgun",
"use_async": "n",
"use_drf": "n",
"custom_bootstrap_compilation": "n",
"use_compressor": "n",
"use_celery": "n",
"use_mailhog": "n",
"use_sentry": "n",
"use_whitenoise": "y",
"use_heroku": "n",
"ci_tool": "Github",
"keep_local_envs_in_vcs": "y",
"debug": "y",
"_template": "https://github.com/Jean-Zombie/cookiecutter-django-wagtail/"
$ cookiecutter https://github.com/pydanny/cookiecutter-django project_name [Project Name]: ...
Upstream removed first_name
and last_name
on the user model and I am still trying to get them back without braking github actions (i.e. the Docker tests) ;-)
3.2 requirements tables
Name | Version in Master | 3.2 Compatible Version | OK |
---|---|---|---|
pytz | 2021.3 | n/a | ✅ |
python-slugify | 5.0.2 | n/a | ✅ |
Pillow | 8.4.0 | n/a | ✅ |
rcssmin | 1.0.6 | n/a | ✅ |
argon2-cffi | 21.1.0 | n/a | ✅ |
whitenoise | 5.3.0 | 6.0.0 | ✅ |
redis | 4.0.1 | n/a | ✅ |
hiredis | 2.0.0 | n/a | ✅ |
celery | 5.2.0 | n/a | ✅ |
django-celery-beat | 2.2.1 | ❌ | |
flower | 1.0.0 | n/a | ✅ |
uvicorn | 0.15.0 | n/a | ✅ |
django | 3.1.13 | n/a | ✅ |
django-environ | 0.8.1 | ❓ | |
django-model-utils | 4.2.0 | 4.2.0 | ✅ |
django-allauth | 0.46.0 | 0.48.0 | ✅ |
django-crispy-forms | 1.13.0 | 1.14.0 | ✅ |
crispy-bootstrap5 | 0.6 | 0.6 | ✅ |
django-compressor | 2.4.1 | 3.1 | ✅ |
django-redis | 5.0.0 | 5.2.0 | ✅ |
djangorestframework | 3.12.4 | 3.13.1 | ✅ |
django-cors-headers | 3.10.0 | 3.11.0 | ✅ |
wagtail | 2.14.1 | 2.16.1 | ✅ |
Name | Version in Master | 3.2 Compatible Version | OK |
---|---|---|---|
Werkzeug | 2.0.2 | n/a | ✅ |
ipdb | 0.13.9 | n/a | ✅ |
psycopg2 | 2.9.2 | n/a | ✅ |
psycopg2-binary | 2.9.2 | n/a | ✅ |
watchgod | 0.7 | n/a | ✅ |
mypy | 0.910 | n/a | ✅ |
django-stubs | 1.8.0 | 1.9.0 | ✅ |
pytest | 6.2.5 | n/a | ✅ |
pytest-sugar | 0.9.4 | n/a | ✅ |
djangorestframework-stubs | 1.4.0 | n/a | ✅ |
sphinx | 4.3.0 | n/a | ✅ |
sphinx-autobuild | 2021.3.14 | n/a | ✅ |
flake8 | 4.0.1 | n/a | ✅ |
flake8-isort | 4.1.1 | n/a | ✅ |
coverage | 6.1.2 | n/a | ✅ |
black | 21.11b1 | n/a | ✅ |
pylint-django | 2.4.4 | ❓ | |
pylint-celery | 0.3 | n/a | ✅ |
pre-commit | 2.15.0 | n/a | ✅ |
factory-boy | 3.2.1 | 3.2.1 | ✅ |
django-debug-toolbar | 3.2.2 | 3.2.4 | ✅ |
django-extensions | 3.1.5 | 3.1.5 | ✅ |
django-coverage-plugin | 2.0.2 | 2.0.2 | ✅ |
pytest-django | 4.4.0 | 4.5.2 | ✅ |
Name | Version in Master | 3.2 Compatible Version | OK |
---|---|---|---|
gunicorn | 20.1.0 | n/a | ✅ |
psycopg2 | 2.9.2 | n/a | ✅ |
Collectfast | 2.2.0 | n/a | ✅ |
sentry-sdk | 1.5.0 | n/a | ✅ |
hiredis | 2.0.0 | n/a | ✅ |
django-storages | 1.12.3 | 1.12.3 | ✅ |
django-anymail | 8.4 | 8.5 | ✅ |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.