-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented wagtail cookiecutter #250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, a Wagtail cookiecutter! Looking good, @antidipyramid, though I spotted a few areas for improvement, particularly in the docs. Comments inline.
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/cookiecutter.json
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/tests/conftest.py
Outdated
Show resolved
Hide resolved
...templates/new-wagtail-app/{{ cookiecutter.app_name }}/{{ cookiecutter.module_name }}/urls.py
Show resolved
Hide resolved
...tail-app/{{ cookiecutter.app_name }}/{{ cookiecutter.module_name }}/static/js/hello-react.js
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
@antidipyramid , can you pull in the publish_docker_image.yml from the django cookie-cutter |
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
@antidipyramid Bumped a couple of threads and left some comments inline. Looks like a bit more work needed here... would you like my feedback on anything in the interim? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple more little things inline... very close!
...il-app/{{ cookiecutter.app_name }}/{{ cookiecutter.module_name }}/migrations/0001_initial.py
Outdated
Show resolved
Hide resolved
...il-app/{{ cookiecutter.app_name }}/{{ cookiecutter.module_name }}/migrations/0001_initial.py
Outdated
Show resolved
Hide resolved
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/docker-compose.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small snafus. :-c
Site.objects.all().delete() | ||
Page.objects.all().delete() | ||
PageRevision.objects.all().delete() | ||
Image.objects.all().delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these also removes the default Wagtail page, and since the content fixtures are empty, this causes an error on the admin site (and a 404 on the homepage). Is it necessary to flush these instances?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do want to flush existing content, how about checking whether there are pages in the fixture? If not, exit the command. Otherwise, we're safe to proceed with flushing and loading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since load_cms_content
will be used anytime we can to update the default content, we do want to flush existing content before loading a Django dump. I think checking if initial_cms_content.json
is empty is a great idea.
docker/templates/new-wagtail-app/{{ cookiecutter.app_name }}/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as advertised. Thanks, @antidipyramid!
I get it when trying to run |
23c102a
to
2c27f98
Compare
… into add-wagtail-cookiecutter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me - just made a few edits to the Readme with commands you need to run the first time you set it up.
I think we can bring this in!
this is good to go. lets merge |
Overview
My implementation of a Wagtail Cookiecutter.
Handles #249
Notes
Though I haven't found any stray tags and the Docker containers runs locally, this involved a lot of search and replace text operations. Please be on the lookout for errors caused by incorrect or missing Cookiecutter template tags or hardcoded app/module names.
Testing Instructions
After cloning the repo, follow the instructions in `docker/README.md' to create the Wagtail template.
Then, follow the instructions in the README file in the root of the newly created Wagtail project template.