Giter VIP home page Giter VIP logo

cookiecutter-wagtail-package's Introduction

Wagtail


Build Status License Version Monthly downloads follow on Twitter

Wagtail is an open source content management system built on Django, with a strong community and commercial support. It's focused on user experience, and offers precise control for designers and developers.

Wagtail screenshot

Join the Community at Wagtail Space! πŸš€

Wagtail Space is coming in June 2024! Don't miss your chance to meet other Wagtailers in person. The Call for Participation and registration for both Wagtail Space 2024 events is open. We'd love to have you give a talk, contribute to a sprint, or join us as an attendee in June.

πŸ”₯ Features

  • A fast, attractive interface for authors
  • Complete control over front-end design and structure
  • Scales to millions of pages and thousands of editors
  • Fast out of the box, cache-friendly when you need it
  • Content API for 'headless' sites with decoupled front-end
  • Runs on a Raspberry Pi or a multi-datacenter cloud platform
  • StreamField encourages flexible content without compromising structure
  • Powerful, integrated search, using Elasticsearch or PostgreSQL
  • Excellent support for images and embedded content
  • Multi-site and multi-language ready
  • Embraces and extends Django

Find out more at wagtail.org.

πŸ‘‰ Getting started

Wagtail works with Python 3, on any platform.

To get started with using Wagtail, run the following in a virtual environment:

Installing Wagtail

pip install wagtail
wagtail start mysite
cd mysite
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

For detailed installation and setup docs, see the getting started tutorial.

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Who’s using it?

Wagtail is used by NASA, Google, Oxfam, the NHS, Mozilla, MIT, the Red Cross, Salesforce, NBC, BMW, and the US and UK governments. Add your own Wagtail site to madewithwagtail.org.

πŸ“– Documentation

docs.wagtail.org is the full reference for Wagtail, and includes guides for developers, designers and editors, alongside release notes and our roadmap.

For those who are new to Wagtail, the Zen of Wagtail will help you understand what Wagtail is, and what Wagtail is not.

For developers who are ready to jump in to their first Wagtail website the Getting Started Tutorial will guide you through creating and editing your first page.

Do you have an existing Django project? The Wagtail Integration documentation is the best place to start.

πŸ“Œ Compatibility

(If you are reading this on GitHub, the details here may not be indicative of the current released version - please see Compatible Django / Python versions in the Wagtail documentation.)

Wagtail supports:

  • Django 4.2.x and 5.0.x
  • Python 3.8, 3.9, 3.10, 3.11 and 3.12
  • PostgreSQL, MySQL and SQLite (with JSON1) as database backends

Previous versions of Wagtail additionally supported Python 2.7, 3.7 and earlier Django versions.


πŸ“’ Community Support

There is an active community of Wagtail users and developers responding to questions on Stack Overflow. When posting questions, please read Stack Overflow's advice on how to ask questions and remember to tag your question "wagtail".

For topics and discussions that do not fit Stack Overflow's question and answer format we have a Slack workspace. Please respect the time and effort of volunteers by not asking the same question in multiple places.

Join slack community

Our GitHub discussion boards are open for sharing ideas and plans for the Wagtail project.

We maintain a curated list of third party packages, articles and other resources at Awesome Wagtail.

πŸ§‘β€πŸ’Ό Commercial Support

Wagtail is sponsored by Torchbox. If you need help implementing or hosting Wagtail, please contact us: [email protected]. See also madewithwagtail.org/developers/ for expert Wagtail developers around the world.

πŸ” Security

We take the security of Wagtail, and related packages we maintain, seriously. If you have found a security issue with any of our projects please email us at [email protected] so we can work together to find and patch the issue. We appreciate responsible disclosure with any security related issues, so please contact us first before creating a GitHub issue.

If you want to send an encrypted email (optional), the public key ID for [email protected] is 0xbed227b4daf93ff9, and this public key is available from most commonly-used keyservers.

πŸ•’ Release schedule

Feature releases of Wagtail are released every three months. Selected releases are designated as Long Term Support (LTS) releases, and will receive maintenance updates for an extended period to address any security and data-loss related issues. For dates of past and upcoming releases and support periods, see Release Schedule.

πŸ•› Nightly releases

To try out the latest features before a release, we also create builds from main every night. You can find instructions on how to install the latest nightly release at https://releases.wagtail.org/nightly/index.html

πŸ™‹πŸ½ Contributing

If you're a Python or Django developer, fork the repo and get stuck in! We have several developer focused channels on the Slack workspace.

You might like to start by reviewing the contributing guidelines and checking issues with the good first issue label.

We also welcome translations for Wagtail's interface. Translation work should be submitted through Transifex.

πŸ”“ License

BSD - Free to use and modify for any purpose, including both open and closed-source code.

πŸ‘ Thanks

We thank the following organisations for their services used in Wagtail's development:

Browserstack
BrowserStack provides the project with free access to their live web-based browser testing tool, and automated Selenium cloud testing.

squash.io
Squash provides the project with free test environments for reviewing pull requests.

Assistiv Labs
Assistiv Labs provides the project with unlimited access to their remote testing with assistive technologies.

cookiecutter-wagtail-package's People

Contributors

chris48s avatar kaedroho avatar lb- avatar mgax avatar nickmoreton avatar zerolab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cookiecutter-wagtail-package's Issues

Consistently use or don't use `version` variable

In cookiecutter.json we define a version param, which we then use in

## [{{ cookiecutter.version }}] - {% now 'local', '%Y-%m-%d' %}

but in

we just hard-code VERSION = (0, 1, 0)

We should either drop version from cookiecutter.json and hard-code 0.1.0 in CHANGELOG.md or use the value of version in __init__.py

Add Black formatting by default

  • Now that Black is being used in Wagtail core, and a 'must' for new Wagtail projects we should adopt in this cookiecutter also

Insertion of `wagtail-` prefix on package name is inconsistent

On creating a project named wagtail-editable-help, and omitting the "wagtail-" prefix from the prompts as instructed:

$ cookiecutter [email protected]:wagtail/cookiecutter-wagtail-package.git
You've downloaded /Users/matthew/.cookiecutters/cookiecutter-wagtail-package before. Is it okay to delete and re-download it? [yes]:
full_name [Karl Hobley]: Matt Westcott
email [[email protected]]: [email protected]
github_username [kaedroho]: gasman
project_name [Localize]: Editable Help
project_name_snake [editable_help]:
project_name_kebab [editable-help]:
project_name_camel [EditableHelp]:

the name in setup.py is set to wagtail-editable-help, implying that that's what the PyPI package is going to be called. However, the two references to the PyPI package name in the readme have it without the wagtail-:

[![PyPI version](https://badge.fury.io/py/editable-help.svg)](https://badge.fury.io/py/editable-help)

and

- `pip install editable-help`

The wagtail- prefix is also (consistently) missing from the Github repo name. I'm not sure if this is intentional or not, but it goes against what all the existing packages under the Wagtail organisation do. (Probably worth noting that if we do add the prefix here, the only remaining un-prefixed occurrence of the name in the codebase will be the URL path registered in wagtail_hooks.)

Drop freezegun as a dev dependency

It is a useful package, but unlike dj-database-url I don't think there is anything in the template that actually requires it. I think we should just drop it completely as it is an unnecessary opinion. As a package author, you may not need it at all. You might need this functionality but prefer time-machine.

Replace isort/flake8 with ruff

One of the changes proposed in #51 was to replace isort and flake8 with ruff. This needed some more work though as ruff is not config-compatible with isort and flake8 so we would need to migrate the config https://github.com/wagtail/cookiecutter-wagtail-package/blob/main/%7B%7B%20cookiecutter.__project_name_kebab%20%7D%7D/setup.cfg to a ruff.toml (shouldn't be a huge job)

On the plus side, this would align us with wagtail core, which is now using ruff. Also all the cool kids are using ruff now 😎

That said, ruff is most beneficial for huge codebases. Plugins tend to be small. Isort/flake8 are still great tools so this is not the highest priority issue in the backlog right now.

add more convenience variables

There are a lot of places where we need to remember to use

  • wagtail-{{ cookiecutter.project_name_kebab }}
  • wagtail_{{ cookiecutter.project_name_snake }}

We should make convenience variables for {{ cookiecutter.project_name_kebab_prefixed }} and {{ cookiecutter.project_name_snake_prefixed }} to make it a bit easier to "fall into the pit of success". These should be cookiecutter private variables so the user is not prompted. Also probably some of our existing variables can probably be converted to private variables so we are only asking the user questions they need to answer.

Switch to GitHub Actions

  1. for this repos tests
  2. for the generated package

Rationale: keeps the management of things in one place. While GHA can be considered a single point of failure, it also removes complexity which we want here. Should a package maintainer go with Circle CI, or something else, that is their prerogative

Clarify what "BSD license" is

This is a follow-up to #19 – "BSD license" is an umbrella term for 4 different OSI-approved licenses, most commonly only the 2-clause and 3-clause variants:

I believe what this project has set up in its template is the "3-clause BSD License". I think it would be better if our cookiecutter.json used SPDX license identifiers, so BSD-3-Clause.

devise a process for keeping packages up to date

There is a need to keep this package up-to-date as new versions of python/django/wagtail are released. This does require some manual intervention to update the trove classifiers, tox matrix, etc. However it would be nice to have a bot submit a PR as a prompt for me to do this when a new release is available.
Unfortunately, for this repo it is not as simple as just pointing dependabot at it and telling it to bump the ranges because our pyproject.toml is (will be) a valid jinja template, but it is not valid toml.
Need to have a think about how to approach this.

Suggestions for improvement

Nice package @kaedroho !
A few nice to haves:

  • add Framework :: Wagtail :: 2 to classifiers in setup.py
  • make author/email configurable
  • make register_admin_urls a placeholder (currently it has a very specific package implementation)

Consistently do or don't delegate linting concerns to pre-commit

As of #28 packages generated from this template come with a pre-commit config, but it feels like our approach to this is all over the map. I probably should have identified this more clearly in the review of #28 . We got trigger happy on the merge :(

In the generated package:

  • Python-based tooling is completely delegated to pre-commit. Black, flake8, isort etc are specified in .pre-commit-config.yaml but they're not specified as dev dependencies in pyproject.toml.
  • We specify a version of prettier in .pre-commit-config.yaml Independently we specify a different version of prettier in package.json.
  • Also in package.json we specify versions of eslint and stylelint + commands for running them, but they aren't run as pre-commit hooks.

In the template repo:

  • We pip install flake8 (which doesn't necessarily check the same version pinned in .pre-commit-config.yaml ) in the CI build and check the generated package against it.
  • We check the generated package against the versions of stylelint/eslint/prettier specified in package.json
  • We don't run black/isort/any of the other checks

As it stands, this is not very consistent. We need to fundamentally pick an approach and apply it consistently everywhere. Either dev tools are managed entirely by pre-commit and not installed as dev dependencies or they're both (regardless of ecosystem) and the tools/versions we run against in the template repo CI should be the same what is in the generated package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.