Git Product home page Git Product logo

wagtail / wagtail Goto Github PK

View Code? Open in Web Editor NEW
17.2K 17.2K 3.7K 205.69 MB

A Django content management system focused on flexibility and user experience

Home Page: https://wagtail.org

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.01% Python 78.61% Shell 0.07% CSS 0.03% HTML 5.47% JavaScript 8.89% Dockerfile 0.02% SCSS 2.24% TypeScript 4.65% MDX 0.01%
cms django hacktoberfest python wagtail

wagtail'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.

wagtail's People

Contributors

ababic avatar allcaps avatar bertrandbordage avatar chosak avatar cnk avatar danielswain avatar davecranwell avatar dependabot[bot] avatar gasman avatar jacobtoppm avatar kaedroho avatar kalobtaulien avatar kira009 avatar laymonage avatar lb- avatar lovelyfin00 avatar m1kola avatar mx-moth avatar nealtodd avatar nimasmi avatar paarthagarwal avatar realorangeone avatar spapas avatar stevedya avatar stormheg avatar th3hamm0r avatar thibaudcolas avatar tijani-dia avatar tomdyson avatar zerolab 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  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  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  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  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

wagtail's Issues

"Your most recent edits" shows same page multiple times

On the dashboard the "Your most recent edits" can show the same page multiple times if you've edited that single page a lot. For this UI feature to be beneficial it should show only the most recent edit for a page, allowing other pages to appear in the list too.

Not L10N aware

Post date date-selection widget defaults to writing the date in the following format 14 Feb 2014

The admin won't accept the date unless it's written in 2014-02-14 format.

Page URL construction assumes that Wagtail is serving pages from the root path

We want it to be possible to incorporate Wagtail into a Django project at a base URL other than the root, e.g. http://example.com/pages/ . However, the methods for constructing page URLs (Page.full_url, Page.url, Page.relative_url in wagtailcore/models.py) do not take this into account, and just return the path that Wagtail knows about from its tree (/path/to/page/ rather than /pages/path/to/page/).

A quick fix would be to run the generated path through django.core.urlresolvers.reverse so that it picks up any prefix defined in the URL config - however, this wouldn't work for multi-site installations that have Wagtail rooted at different places on different sites. (This would typically be done by setting up a separate wsgi instance for each site, with its own settings module and urlconf, in which case the instance generating the URL may not even be able to see the relevant urlconf.) A more robust approach would be to extend the Site record to define a root path as well as a hostname.

Support for page revisions

One of the features we really wanted in Mezzanine (but couldn't get) is page revision support. Are there any plans to add this features into Wagtail?

Improve behavior when embedly is not used

When there is no EMBEDLY_KEY setting in settings.py an exception will be thrown when POSTing to /admin/embeds/chooser/ so pressing the button won't do anything.

The exception is because of line 17 of embeds.py: client = Embedly(key=settings.EMBEDLY_KEY). The best way to handle this is check if there is no EMBEDLY_KEY and show an error message to the user ("Please configure an EMBEDLY_KEY in your settings") similar to the one that is already shown now if the URL is not correct ("This URL is not recognised").

When title contain non english characters the slug field is not populated

For instance if the title of your page is "Ξ”ΞŸΞšΞ™ΞœΞ—" the slug field will be empty. If it is "Ξ”ΞŸΞšΞ™ΞœΞ— 1" the slug field will be "-1". This is because of the cleanForSlug function in wagtail/wagtailadmin/static/wagtailadmin/js/page-editor.js.

Instead of this the django/contrib/admin/static/admin/js/urlify.js tool could be used.

Video content

How does Wagtail handle video content? Can you upload a video and have it rendered in an embedded player? What about providing a link to a video on Youtube or Vimeo and having that embedded on the site?

Hallo editor mispositioned when used in rich text field inside repeating object

If a repeating object contains a rich text field the hallo editor toolbar appears where it would if the input were not inside a repeating object.

As the Hallo.js toolbar is always appended to the body, not somewhere nearer the input on which it was invoked, there's no way of using CSS inheritance to reposition the toolbar in different situations.

Ideally we should find a way of getting Hallo to append nearer the element or giving it a class which can be used to alter it's position in different situations.

Status tag of pages is unreadable when hovered as part of the page move mechanism

When moving a page the user is provided with a tree menu to choose the destination parent page. The status tag of pages in this appears...

  • to have 'None' as an href. Links should be suppressed on this view as they're just a distraction.
  • to be invisible once hovered. This seems to just be an error as a result of css specificity and the fact that links ought not to be displayed at all, but rather spans.

Django 1.7 compatibility

ref Marc Tamlyn's 'How does Django start?' talk at Django Weekend Cardiff - it sounds like there'll be a fair bit of work involved in making Wagtail compatible with Django 1.7 (while keeping it backwards-compatible with 1.6 for the time being) - moving module code to app startup() methods and avoiding 'for app in INSTALLED APPS'.

Post errors should be more helpful

Tried adding a post, saw an error and had no idea what to do. Not until I used pdb to figure out what was going on did I realize the error might be in another tab:

2014-02-14 at 6 32 am 2x

2014-02-14 at 6 32 am 2x 1

Remove lxml dependency for developers

BeautifulSoup (and consequently lxml) is used for whitelisting of HTML elements rich text fields when they're submitted, and as a dependency of django-compressor. Can we avoid lxml installation (which in turn requires libxml2 and libxslt) by specifying html5lib as the parser for BS and django-compressor?

Recommended method for changing runtests.py configuration?

wagtaildemo has a local.py mechanism for changing the db auth info and other settings but what is the recommended mechanism for doing the same with running tests for wagtail? Making a copy of runtests.py and then changing the values in the copy?

Searching for R throws exception

If you search for R or Roo or Root etc you will get a 500 exception (probably because it finds the Root page that has no parent):

NoReverseMatch at /admin/pages/search/

The problem is in this line

<td class="parent"><a href="{% url 'wagtailadmin_explore' page.get_parent.id %}">{{ page.get_parent.title }}</a></td>

of

\wagtail\wagtail\wagtailadmin\templates\wagtailadmin\pages\list.html

Generating 'fake' assets for performance testing

Hey guys, wondering if you have any advice on where to start on this subject, or if you've done something like this in development of wagtail.

My goal is to generate something on the order of 50k assets: images, pdfs, psds, docs.

Will be happy to share my process and results of course :)

Set up a mailing list.

Would be nice to have a place to discuss wagtail things related and ask questions if need be.

Make it easier to change the home page

If I have understand correctly, a new installation of wagtail will always have a "Welcome to your new Wagtail site!" page as the home page, and the only way for the user to change that is to got to the normal django admin and change the root page for the site.

I find it confusing for the end-user to need to go to the django-admin to change this -- even if it would need to be done just once.

Probably the easiest way to resolve this would be instead of creating the homepage and localhost site in 0002_initial_data.py to provide a management command that would explain to the user what is going to happen and ask the user of the type of the page he wants to have as a homepage (with Page) being the default.

Also, even if the default behavior doesn't change there could be a change_homepage_type management command that would change the homepage for a specific site.

Hide 'View Live' links in page listings when there is no reachable URL to the page

When a page is published but has no reachable URL - e.g. it exists at the root level alongside 'home' and has no Site record pointing to it - we still show a 'View Live' link in page listings, but with an href of "None". We should hide this.

(Ideally we ought to give editors a warning message at the point that they create an un-routeable page, but that needs separate design consideration)

Remove the over-reliance on jQuery

Inside core.js there is arguably a small amount of jQuery abuse taking place.

Relying on jQuery to add / remove / toggle classes and add event listeners isn't necessary in modern browsers. Without adding polyfils this would drop support for IE9 and below.

The performance increases are going to be minimal but when using the admin on a low powered device it's advantageous to keep things as lean as possible.

I'd be happy to refactor the code.

Tag releases

There is a CHANGELOG.txt but no releases tagged in git matching the releases.

Default tests are being run

Right now a bunch of default tests are being run when the test runner is run. The assertion where 1+1 = 2.

I think you can add a skip there at least if you're looking to keep the files around for testing later so at least the test pass count is accurate.

@skip("Don't want to test")

Wagtail template tags could stand rationalising

From an implementer's perspective the tags needed to build a page are a bit muddled.

pageurl is called as {% pageurl %}, image_tags is called as {% image %}, then rich_text is called as the filter |richtext.

The spaces and underscores seem intended to trick me! Can they be made more uniform? And given that a page would rarely be built without images, urls or rich text, could these be loaded as a single tag somehow?

Don't allow creating editor's picks without recommended pages

I can add an editor's pick just by defining the search term and without adding any recommended pages. This will display the "Editor's picks for 'dasd' created." however nothing will be visible in the editor's pick list.

Also, if I click on "Add recommended page" and click save immediately without filling any info I will get a 500 error (exception: 'EditorsPickFormSet' object has no attribute 'ordered_forms')

wagtail_site_root_paths cache is not updated when moving a page which is a site root

  • From an empty Wagtail build, create a page called 'newhome' under the default homepage
  • In django-admin, change the default Site record to point to newhome
  • Move newhome to the root level
  • The url for newhome (as seen in the 'View live' link on the page listing) now shows up as None, because it still has the old location of newhome (home/newhome) cached in wagtail_site_root_paths, and so it thinks that the current path (/newhome) is unrouteable. In this scenario, we should update/clear the cached record when the page is moved.

Add Developer setup instructions to gh-pages

We should add what is essentially explained in the link below to the instructions on gh-pages. It currently says "Edit code locally", however you cannot edit locally until shared folders are setup.

The instructions are here already:
https://gist.github.com/gasman/8802632

They just need to be explained and put into the readme.

What is the modelcluster for? Is that needed for backend/ui development?

Display 500 errors on page preview

If a 500 error occurs when previewing a page from the edit interface, the JS to insert the response into the newly-opened window simply aborts, leaving the spinner in place. We should push the error response into that window instead.

Problems when trying to edit rich text from a tablet

When I tried editing rich text content from my Nexus table (through google chrome) I observed that if I selected bold or italic I couln't unselect it so it kept writing bold and italic text no matter what (until of course I saved the page).

Exception when editing page with sqlite3 db backend

This is because of line 251 of wagtail\wagtailcore\models.py:

cursor.execute("""
        UPDATE wagtailcore_page
        SET url_path = %s || substring(url_path from %s)
        WHERE path LIKE %s AND id <> %s
    """, [new_url_path, len(old_url_path) + 1, self.path + '%', self.id]) 

substring is not available in sqlite3 and should be replaced with substr.

Pasting content into Hallo rich text fields retains HTML text styles from source

If you copy any section of text from wagtail.io (for example) and paste it into a text area, it retains lots of styles you wouldn't want to be copied into your site.

Of course wagtail strips style attribute upon saving but I'd expect most users would probably grimace and try to somehow undo it, fail, and get themselves in a complete mess before thinking of saving.

This example is somewhat contrived, but as we know from users of Word, people paste anything from anywhere without thinking, and why not? If we're to make content entry the experience we want it to be, this needs addressing.

Bad behavior when trying to run migrate with sqlite3

Hello,

I tried installing wagtaildemo using sqlite3 as a backend database.

running python manage.py syncdb works fine, however running python manage.py migrate produces a series of exception. More specifically, I can see the following (I will copy just the important bits):

The first time the exception is because of:

File "..\..\wagtail\wagtail\wagtailcore\migrations\0002_initial_data.py", line 11, in forwards model='page', app_label='wagtailcore', defaults={'name': 'page'})

The second time I run migrate, the exception is because of:

File "..\..\wagtail\wagtail\wagtaildocs\migrations\0002_initial_data.py", line 11, in forwards  model='document', app_label='wagtaildocs', defaults={'name': 'document'})

The third time I run migrate, the exception is because of:

File "..\..\wagtail\wagtail\wagtailimages\migrations\0002_initial_data.py", line 11, in forwards model='image', app_label='wagtailimages', defaults={'name': 'image'})

The fourth time, the migrate completes without problems!

In all cases, the error I see is the following:

- Migration 'wagtailimages:0002_initial_data' is marked for no-dry-run.
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.
! You *might* be able to recover with:   (migration cannot be dry-run; cannot discover commands)
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.

followed by a stacktrace (originating from the place I wrote before) and ending with:

"Your database backend doesn't behave properly when "
django.db.transaction.TransactionManagementError: Your database backend doesn't behave properly when autocommit is off. Turn it on before using 'atomic'.

Does anybody know what is happening ? This is very confusing and I believe that it leaves my database in a not so good state :-(

Need a way to specify which user accounts have access to Wagtail admin

Currently various views in Wagtail admin, such as the homepage and page explorer, are guarded by a simple @login_required decorator. This means that if the site is making use of user accounts on the front end, those users will be able to access Wagtail admin (albeit with no permission to actually do anything).

A quick fix would be to restrict Wagtail admin to users with the is_staff flag set (i.e. use the staff_member_required decorator from django.contrib.admin.views.decorators in place of login_required). However, this isn't always appropriate - student editors on RCA would not have is_staff set, for example. A more thorough solution would be to define a 'can access Wagtail admin' permission (slightly messy, as it isn't attached to a specific model) and add this to our default groups.

Remove Redis dependency

We will continue to recommend Redis for production, but Wagtail should fall back e.g. to the standard Django cache framework in development environments.

Tests

If you want people to contribute to this, there is no obvious way to run a test suite. This is vital for future development.

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.