Code Monkey home page Code Monkey logo

wagtailcommonblocks's Introduction

wagtailcommonblocks PyPI

Common StreamField blocks for Wagtail.

Check out Awesome Wagtail for more awesome packages and resources from the Wagtail community.

Quickstart

Assuming you have a Wagtail project up and running:

pip install wagtailcommonblocks

Add commonblocks to your settings.py in the INSTALLED_APPS section, before the core wagtail packages:

...
    'commonblocks',
    'wagtail.contrib.wagtailsitemaps',
...

Available blocks

  • CommonPageChooserBlock
  • SimpleRichTextBlock
  • CommonImageBlock
  • CommonQuoteBlock
  • CommonHeadingBlock
  • CommonVideoBlock
  • CommonInternalLink
  • CommonExternalLink
  • CommonLinksBlock

You can override the headings of the CommonHeadingBlock block:

...
COMMONBLOCKS_HEADING = (
    ('h1', 'h1'),
    ('h2', 'h2'),
)

Development

Releases

  • Make a new branch for the release of the new version.
  • Update the CHANGELOG.
  • Update the version number in setup.py, following semver.
  • Make a PR and squash merge it.
  • Back on master with the PR merged, use make publish (confirm, and enter your password).
  • Finally, go to GitHub and create a release and a tag for the new version.
  • Done!

wagtailcommonblocks's People

Contributors

jordij avatar loicteixeira avatar stuartalexwhitehead avatar thibaudcolas avatar

Stargazers

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

Watchers

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

wagtailcommonblocks's Issues

This project needs a maintainer

Hi,

This repository seems to lack maintenance, I propose myself as a new maintainer.

Could you give me the right to push in your repository or just transfer it on my account in github?

Thank you!

Not compatible with wagtail 1.5.x and above

Due to a change in concept and structure in wagtails:

  • wagtail.wagtailcore.fields
  • page-editor.js

This needs to be revised and fixed in a non breaking manner for existing content.

Update SimpleRichTextBlock and SimpleRichTextField to Draftail?

I believe SimpleRichTextBlock and SimpleRichTextField have been broken for a long time. Indeed, despite defining a small set of available elements, with Wagtail prior 1.12, the toolbar shows some additional elements:

1_8_toolbar

In addition, it is now outdated:

  • Wagtail 1.12 introduced RichText features
  • Wagtail 2.0 uses Draftail as a default editor

#7 make just make it work™, but given the confusing behaviour (see above) and that there is no tests, I woulnd't feel too confident upgrading the package on a production website which is using either SimpleRichTextBlock or SimpleRichTextField.


It looks like the expected behaviour was:

  1. Restrict the list of features to: paragraphs, bold, italic, unordered lists, ordered lists, links and document links
  2. Allow some attributes on links?
  3. Allow arbitrary html to be pasted in

Assuming we were update it to use the Draftail editor:

  1. Should be achievable with features
  2. Will need investigation
  3. I'm afraid it's not possible at the moment so it might be an issue

Describe the blocks ?

It would be good if the README included info on what these blocks do, or what the advantage is over existing blocks (e.g. CommonImageChooser over the standard ImageChooser).

I feel like this project is something that could be useful to me, but I can't tell from the README.

Not compatible with Wagtail 2.0

Running the project returns:

ImportError: No module named 'wagtail.wagtailcore'

The package is now named wagtail.core so it needs a fallback.

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.