Saravanan666/pypi-org huggingface dataset:
Package: wagtail-multiple-chooser-panel
Wagtail Multiple Chooser PanelAn InlinePanel variant allowing multiple items to be quickly selectedAboutThis package provides an improved user interface for the common setup of a chooser widget inside an InlinePanel - for example, an image gallery consisting of a list of images chosen from the Wagtail image library. Normally, this would require adding a new child form for each item, opening the chooser modal and selecting an individual item each time. With theMultipleChooserPanelprovided by this package, the "Add item" button now opens the chooser modal immediately, with the ability to select multiple items - all selected items are then added as child forms.In this version, only choosers implemented viawagtail-generic-chooserare supported; it is planned that this functionality will be incorporated into a future Wagtail release, with support for all of Wagtail's built-in choosers as well as custom choosers created throughChooserViewSet.LinksDocumentationChangelogContributingDiscussionsSecuritySupported versionsPython 3.7 - 3.11Django 3.2 - 4.1Wagtail 4.1InstallationEnsure you havewagtail-generic-chooserversion 0.5 or above installedpip install wagtail-multiple-chooser-panelAdd"wagtail_multiple_chooser_panel"to INSTALLED_APPSUsageBeginning from anInlinePanelsetup where the child model has a field with a chooser widget defined throughwagtail-generic-chooser, such as:classBlogPersonRelationship(Orderable,models.Model):page=ParentalKey("BlogPage",related_name="blog_person_relationship",on_delete=models.CASCADE)person=models.ForeignKey("base.Person",related_name="person_blog_relationship",on_delete=models.CASCADE)panels=[FieldPanel("person",widget=PersonChooser)]classBlogPage(Page):content_panels=Page.content_panels+[# ...InlinePanel("blog_person_relationship",label="Author(s)",min_num=1),]ImportMultipleChooserPanelfromwagtail_multiple_chooser_panel.panels, replaceInlinePanelwithMultipleChooserPanel, and add a newchooser_field_nameparameter that specifies the field of the child model that has the chooser widget:fromwagtail_multiple_chooser_panel.panelsimportMultipleChooserPanel# BlogPersonRelationship definition remains unchangedclassBlogPage(Page):content_panels=Page.content_panels+[# ...MultipleChooserPanel("blog_person_relationship",chooser_field_name="person",label="Author(s)",min_num=1),]
Package: wagtail-nav-menus
Wagtail Nav Menus is a app to provide highly customizable menus in wagtail by leveraging StreamFields.WhyRemember when websites had tree structures with logical menus that followed the same structure? For many those days are gone. We are asked to create arbitrary menu items, place value props in menus that aren’t even links, and build highly interactive menus with Javascript.Wagtail Nav Menus addresses this by using stream fields to support arbitrary items in the menu and gives you options to render the menus as both django templates or json for your js tooling to consume.Built in ComponentsNav Category - a grouping of other components - for things like sub navigationPage Link - Link to a wagtail PageExternal Link - Django URLField linkDjango Link - Reverse django view lookupsRelative URL - Regex enforced relative linksImageHtmlInstallInstallwagtail-nav-menuswith pip.Addwagtail_nav_menustoINSTALLED_APPS.SettingsYou can add other streamfields like this:from wagtail_nav_menus.defaults import WAGTAIL_NAV_MENU_TYPES_DEFAULT

WAGTAIL_NAV_MENU_TYPES = WAGTAIL_NAV_MENU_TYPES_DEFAULT + [
    ('page_link_with_image', 'nav_menus_ext.models', 'InternalPageImageBlock'),
    ('page_link_with_image', 'nav_menus_ext.models', 'NavAdvertBlock'),
]The schema here is (‘name’, ‘module_path’, ‘class name’)Edit menu name choices. The default is top and footer. These represent different menus for your webpage.
The names are arbitrary - but you will look them up by name in templates.WAGTAIL_NAV_MENU_CHOICES_DEFAULT = (
    ("top", "Top"),
    ("footer", "Footer"),
)UsageNav Menus should appear in wagtail’s settings sidebar tab. CMS uses can control them here.You may use some template tags to use these in your site.get_nav_menuUse this to insert the menu using django templates:{% load nav_menu_tags %}
{% get_nav_menu 'footer' %}See the [templates folder](wagtail_nav_menus/templates/) in this repo for examples of rendering the menu.
You will want to copy these into your project’s template folder to extend them.get_nav_menu_jsonUse this to get the menu as a json object.{% load nav_menu_tags %}
{% get_nav_menu_json 'top' as top %}
<div data-menu='{{ top }}'></div>API UsageIf using Django Rest Framework to access the menu data, this module provides some tools to get started.Add NavMenuViewSet to your Rest Framework Router.from wagtail_nav_menus.viewsets import NavMenuViewSet
Package: wagtail-nesting-box
A set of abstract and concrete models for yourWagtailwebsite.SupportIf you need support, please use theGitHub issue tracker.ContributingWe love contributions, so please feel free to fix bugs, improve things, provide documentation.
Just follow the guidelines and submit a PR.RequirementsPython 2.7, 3.3, 3.4 and 3.5Django 1.8, 1.9 and 1.10 (only with Python 2.7 and 3.4+)Wagtail 1.5 and 1.6 (required by Django 1.10+)OverviewWagtail nesting box is a powerful and flexible toolkit that helps you to build your Wagtail
websites. Out of the box without extending any model, it provides:Static web pages: you can create a static page to write, for instance, yourAbout uspage.A full fledged blog: it includes an index page that provides pagination and tag filtering (based
on tags usage).Streamfields as default: both static and post pages, use the WagtailStreamFieldto
write the text body.Template free: the package includes a set of demo template that you can copy to implement your
own styles.Flexibility: the toolkit provides a set of models, templates and generic functions. If you need
a slightly different behavior, you can simply extend our models.Getting startedThe best way to get started with this project, is following one of our tutorials:Tutorial: create a blogTutorial: create a static page(i.e.About uspage)DocumentationFull documentation for the project is available athttp://wagtail-nesting-box.readthedocs.io/Licensewagtail-nesting-box is released under the terms of theBSD license. Full details inLICENSEfile.
Package: wagtailnews
A plugin for Wagtail that provides news / blogging functionality.InstallingInstall using pip:pip install wagtailnewsIt works with Wagtail 5.2 and upwards. For older versions of Wagtail see past releases.Quick startCreate news models for your application that inherit from the relevantwagtailnewsmodels:fromdjango.dbimportmodelsfromwagtail.admin.panelsimportFieldPanelfromwagtail.fieldsimportRichTextFieldfromwagtail.modelsimportPagefromwagtailnews.modelsimportNewsIndexMixin,AbstractNewsItem,AbstractNewsItemRevisionfromwagtailnews.decoratorsimportnewsindex# The decorator registers this model as a news index@newsindexclassNewsIndex(NewsIndexMixin,Page):# Add extra fields here, as in a normal Wagtail Page class, if requirednewsitem_model='NewsItem'featured_news_item=models.ForeignKey('NewsItem',null=True,blank=True,on_delete=models.SET_NULL,related_name='+',)content_panels=Page.content_panels+[FieldPanel('featured_news_item'),# This will set up a chooser for selecting a news item]classNewsItem(AbstractNewsItem):# NewsItem is a normal Django model, *not* a Wagtail Page.# Add any fields required for your page.# It already has ``date`` field, and a link to its parent ``NewsIndex`` Pagetitle=models.CharField(max_length=255)body=RichTextField()panels=[FieldPanel('title',classname='full title'),FieldPanel('body',classname='full'),]+AbstractNewsItem.panelsdef__str__(self):returnself.titleclassNewsItemRevision(AbstractNewsItemRevision):newsitem=models.ForeignKey(NewsItem,related_name='revisions',on_delete=models.CASCADE)Old docsThe docs for Wagtail newsare severely out of date, but may still be useful for reference.
Package: wagtailnews-collection
A fork of thewagtailnewsplugin  for Wagtail that provides news / blogging functionality.  This fork exists to allow news items to belong to a collection, enforcing collection permissions and restrictions (including viewer restrictions, mirroring thePagequeryset’spublic()method and restricting unauthorized serving in the same way).  This is done to facilitate wagtailnews working with thewagtailapprovalplugin.InstallingInstall using pip:pip install wagtailnews-collectionIt works with Wagtail 1.4 and upwards.DocumentationDocumentation for Wagtail newscan be found on Read The Docs.  This fork has no specific documentation, as it works almost exactly the same.Quick startCreate news models for your application that inherit from the relevantwagtailnewsmodels:fromdjango.dbimportmodelsfromwagtail.wagtailadmin.edit_handlersimportFieldPanelfromwagtail.wagtailcore.fieldsimportRichTextFieldfromwagtail.wagtailcore.modelsimportPagefromwagtailnews.modelsimportNewsIndexMixin,AbstractNewsItem,AbstractNewsItemRevisionfromwagtailnews.decoratorsimportnewsindex# The decorator registers this model as a news index@newsindexclassNewsIndex(NewsIndexMixin,Page):# Add extra fields here, as in a normal Wagtail Page class, if requirednewsitem_model='NewsItem'classNewsItem(AbstractNewsItem):# NewsItem is a normal Django model, *not* a Wagtail Page.# Add any fields required for your page.# It already has ``date`` field, and a link to its parent ``NewsIndex`` Pagetitle=models.CharField(max_length=255)body=RichTextField()panels=[FieldPanel('title',classname='full title'),FieldPanel('body',classname='full'),]+AbstractNewsItem.panelsdef__str__(self):returnself.titleclassNewsItemRevision(AbstractNewsItemRevision):newsitem=models.ForeignKey(NewsItem,related_name='revisions')
Package: wagtail-news-image
# Wagtail News ImageThis [Django](https://www.djangoproject.com/) app provides an inline image block for the Draftail WYSIWYG editor.You can play with this plugin on a demo site [here](https://github.com/MattSegal/wagtail-news-image-demo).This image block supports:- upload- search- resize- captions- hyperlinksThis is what the image block looks like in the Draftail WYSIWYG editor:<img src="./screenshots/WYSIWYG.png" alt="Wagtail WYSIWYG view" width="500px"/>Clicking on the block reveals a modal, which allows you to edit the image:<img src="./screenshots/modal.png" alt="Wagtail editor modal" width="500px"/>## InstallationIn `settings.py` you need to register the app in `INSTALLED_APPS````python# settings.pyINSTALLED_APPS = [# ...'wagtailnewsimage',# ...]```In `urls.py` you need to add `wagtailnewsimage.urls`. The base url (`wagtailnewsimage/`) can be configured to be whatever you like.```python# urls.pyurlpatterns = [# ...path(r'wagtailnewsimage/', include('wagtailnewsimage.urls')),# ...]```In `models.py` you need to add `news-image` to your RichTextField features whitelist```python# models.pyclass MyPage(Page):body = RichTextField(features=[# ...'news-image',# ...])```## Dependencies* Wagtail (2+)* Django (1.11+)* Django Rest Framework (3+)
Package: wagtail-nhs-style
Wagtail NHS StyleA wagtail implementation of theNHS frontend v0.8.0standard components.InstallationInstall the pypi packagepip install wagtail-nhs-styleAdd to yourINSTALLED_APPSin wagtail settingsINSTALLED_APPS=[...'wagtailnhsstyle',...]Use blocks in your streamfieldsfromwagtail.admin.edit_handlersimportFieldPanel,StreamFieldPanelfromwagtail.core.modelsimportPagefromwagtail.core.fieldsimportStreamFieldfromwagtailnhsstyle.blocksimportActionLinkBlock,CalloutBlockclassHomePage(Page):body=StreamField([# Include any of the blocks you want to use.('action_link',ActionLinkBlock()),('callout',CalloutBlock()),])content_panels=Page.content_panels+[StreamFieldPanel('body'),]Use templatetags{%loadnhsstyle_tags%}<html>...<body>{%breadcrumbs%}</body></html>Use template includes{%include'wagtailnhsstyle/header.html'withshow_search=True%}See thecomponent documentationfor a list of components you can use.Include the CSS in your base template<linkrel="stylesheet"type="text/css"href="{% static 'wagtailnhsstyle/css/nhsuk-wagtail.min.css' %}">Include the Javascript in your base template<scripttype="text/javascript"src="{% static 'wagtailnhsstyle/js/nhsuk-0.8.0.min.js' %}"defer></script>Further readingSee moredocumentation
Package: wagtail-nhsuk-frontend
Wagtail NHS.UK frontendA wagtail implementation of theNHS frontend v6.1.2standard components.InstallationInstall the pypi packagepip install wagtail-nhsuk-frontendAdd to yourINSTALLED_APPSin wagtail settingsINSTALLED_APPS=[...'wagtailnhsukfrontend',...]Use blocks in your streamfieldsfromwagtail.admin.panelsimportFieldPanelfromwagtail.modelsimportPagefromwagtail.fieldsimportStreamFieldfromwagtailnhsukfrontend.blocksimportActionLinkBlock,WarningCalloutBlockclassHomePage(Page):body=StreamField([# Include any of the blocks you want to use.('action_link',ActionLinkBlock()),('callout',WarningCalloutBlock()),])content_panels=Page.content_panels+[FieldPanel('body'),]Use templatetags{%loadnhsukfrontend_tags%}<html>...<body>{%breadcrumb%}</body></html>Use template includes{%include'wagtailnhsukfrontend/header.html'withshow_search=True%}See thecomponent documentationfor a list of components you can use.Include the CSS in your base template<linkrel="stylesheet"type="text/css"href="{% static 'wagtailnhsukfrontend/css/nhsuk.min.css' %}">Include the Javascript in your base template<scripttype="text/javascript"src="{% static 'wagtailnhsukfrontend/js/nhsuk.min.js' %}"defer></script>UpgradingIf you are upgrading from v0 to v1, see thechangelog.This CSS and JS is taken directly from thenhsuk-frontend libraryand provided in this package for convenience.If you have a more complicated frontend build such as compiling your own custom styles, you might want toinstall from npminstead.ContributingSee thecontributing documentationto run the application locally and contribute changes.Further readingSee moredocumentation
Package: wagtail-opengraph-image-generator
wagtail-opengraph-image-generatorWagtail Open Graph Image Generator will assist you in automatically creatingOpen Graphimages for your pages.There are a handful of configuration options to popuplate images with your page's content.
Besides the title, there are options to provide a static company logo, subtitle, background image and page logo in the SVG format. While the resulting image will be a little bit opinionated, the defaults should work just fine in most cases.The final image will be saved in the PNG format in a configurable Wagtail collection. It then can be used in your templates and code.FeaturesAutomatic creation of Open Graph protocol compatible imagesLive preview and configuration in a seperate tab in the Edit and Create viewsSeveral dynamic fields that can be configured to supply content for your generated imageRequirementsPython 3.7+Wagtail 4Django 3.0+wagtail.contrib.settingsinINSTALLED_APPSOther versions might work but have not been tested.InstallationInstall with pip:pip install wagtail-opengraph-image-generatorAddwagtail_opengraph_image_generatorto yourINSTALLED_APPSFinally, apply the migrations withpython manage.py migrateUsageOnce the addon is installed, you will notice a new tab in your edit/create view.This new panel will allow you to preview your new Open Graph image before you save it.
Depending on your exact configuration this panel will provide slightly different options and customizations.Embedding in your templateAccessing the generated image is done with an image tag. Make sure to load it in your template and callget_existing_og_image [page-object]to save the image in a variable. You can then use it as any other Wagtail image.{% load wagtail_opengraph_image_generator_tags %}

{% get_existing_og_image self as og_image %}

{% if og_image %}
    {% image og_image original as og_image %}
    <meta property="og:image" content="{{ self.get_site.root_url }}{{ og_image.url }}">
{% endif %}ExamplesA basic example with a default background image, company logo and subtitle might look like this:A more advanced example with additional background and page logo fields might look like this:DocumentationFor more information on getting started, an overview of all available settings and release notes, please seeour documentation on Read the Docs.SupportFeel free to open issues and, even better, pull requests!The development of this plugin is supported bycandylabs GmbHIf you need commerical support developing a Wagtail site, Django application, MVP or digital platform, we'd love to hear from you atinfo@candylabs.de!
Package: wagtailosm
Open Street Map integration for WagtailFeaturesSimple integration of OpenStreetMaps for Wagtail using theosm_fieldimplementation. Use it as withosm_field: If you want maps but don’t need GIS. What it does is to maintain three columns in your database, one for latitude, one for longitude, and one for the “text search” that you have used to initially place the dot on the map in the admin.Usage:See docs.How it looksImprovements?This project took about 2 hours. Nothing is sacred, please contribute.DocumentationThe full documentation is athttp://wagtailosm.rtfd.org.History0.2 (2018-09-21)Wagtail 2 support0.1.0 (2015-12-26)First release on PyPI.
Package: wagtail-paginated-subpages
A simple Django Wagtail app to add paginated pages under a root page using
a mixin /template tag approach.Adds paginated urls under and page where the mixin is used:/the-original-page/
/the-original-page/page/1/
/the-original-page/page/99/Quick startInstall “wagtail-paginated-subpages” using pip:pip install wagtail-paginated-subpagesAdd “wagtail_paginated_subpages” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'wagtail_paginated_subpages',
]import the mixin and include it before the Page (or other) classes:from wagtail_paginated_subpages.mixins.pagination import PaginatedMixin

class ContentPage(PaginatedMixin, Page):

    passUse the paginated content in a paginated page template:<ul>
    {% for page in paginated_objects %}
        <h2>{{ page.title }}</h2>
    {% endfor %}
</ul>Use the pagination template tag to add pagination:{% load wagtail_paginated_tags %}
{% render_pagination page=page paginated_objects=paginated_objects %}Navigate to page with child pages and list of child pages should be presentCustomisationBy default page 1 is automatically redirected to the base page url
(for SEO). This can be updated to redirect the base page to /page/1/ if
preferred:PAGINATION_REDIRECT_INDEX_TO_ROOT = True # redirects /page/1/ to page.url
PAGINATION_REDIRECT_INDEX_TO_ROOT = False # redirects page.url to /page/1/Pages are paginated by 12:PAGINATION_PAGE_SIZE_DEFAULT = 99 # Number of items per pagePage size options to show in the ‘Show:’ list:PAGINATION_DEFAULT_PAGE_SIZES = [12, 24, 48, 96] # Options for page sizesBy default the mixin returns all child pages for the current page, however
this query can be changed by defining a get_child_page_queryset:class ContentPage(PaginatedMixin, BaseCMSPage):

    def get_child_page_queryset(self):
        return self.get_children().live().order_by('-first_published_at')Pagination markup can be customised by creating a new template in:templates/wagtail_paginated_subpages/pagination.htmlBy design the list of child pages has not been designed as a template tags as
there are too many ways to style the lists of content for it to be worthwhile.
These can be updated by simply updating the markup from step 3.Canonical meta tags can be added to the page header using:{% load wagtail_paginated_tags %}
{% render_pagination_meta page=page paginated_objects=paginated_objects %}
Package: wagtail-parler
Wagtail Parler 🧀 🐦Brings "omelette du fromage" 🧀 from parler into wagtail 🐦 for your custom models
(via modeladmin or wagtail snippets)Wagtail Parler helps you to usedjango-parlerinsidewagtailto translate your customs models.
It works forwagtail-modeladmin(which is now deprectaed) and also the new official way:
wagtail's snippets.Tests, QA, consistency and compatibilityThis app is tested to runs with:Django 3.2, 4.2Wagtail 4.1, 4.2, 5.0, 5.1Parler 2.3 (probably older ones to, it's just not tested)Python 3.7, 3.9, 3.11To ensure code quality and consistency:Formatted withblackValidated withflake8.Static types checked withmypyTests coverage checked withcoverage(100% tested)Tests runned in local viatoxand on github viagithub actions workflowversionned withsemverlogicWhyThere is already an internationalisation support in wagtail via their own language features
calledwagtail-localize.
This appalso support wagtail modeladmin.
But the approach of wagtail-localize could be unconvenient as translations are stored in the same
table than "main instances", resulting specific queryset and managers to manage your models.For app's like treebeard, it can break the logic of your tree.For those reasons, you could prefer to usedjango-parleras translations approach. Wagtail Parler is fit to you: it will allow you to usedjango-parlerto translate your own models and still have a usefull wagtail interface to
manage translations (via official wagtail's snippet admin but also with the oldwagtail-modeladmin)InstallationInstall the package via pip. We consider you already have django-parler and wagtail installed.pip install wagtail-parlerThen, in settings.py, addwagtail_parlerto the installed apps.# settings.pyINSTALLED_APPS=[# …"wagtail_parler",# …]Basic UsageYou just have to addParlerSnippetAdminMixinto yourSnippetViewSet(orParlerModelAdminMixinto yourModelAdmin),et voilà, you are ready to
eatomelette du fromage.fromwagtail.snippets.views.snippetsimportSnippetViewSetfromwagtail.snippets.modelsimportregister_snippetfromwagtail_parler.handlersimportParlerSnippetAdminMixinfrom.modelsimportFoodclassFoodAdmin(ParlerSnippetAdminMixin,SnippetViewSet):model=Foodregister_snippet(FoodAdmin)# or for an usage with wagtail-modeladmin:fromwagtail.contrib.modeladmin.optionsimportModelAdmin,modeladmin_registerfromwagtail_parler.handlersimportParlerModelAdminMixinfrom.modelsimportFoodclassFoodAdmin(ParlerModelAdminMixin,ModelAdmin):model=Foodmodeladmin_register(FoodAdmin)Extra 🧀🐦More advanced usage, tests, etc., are documentedin the doc.MaîtreWagtail, sur un arbre perché,Tenait en son bec une omelette du fromage.MaîtreWebu, à l'envie deparler,Lui tint à peu près ce langage :Et bonjour, MonsieurWagtail.Que de beaux commits ! quelle merveille !Sans mentir, si votre codageSe rapporte à votre plumage,Vous êtes le Phénix des hôtes de ces dépots.
…From « Le Corbeau et le Renard » by Jean de La Fontaine, 1668.
Package: wagtail-periodic-review
Wagtail Periodic ReviewA Wagtail package for periodic page content reviews for quality or audit purposes.FeaturesDashboard panelsFiltered reportConfigurable next review frequencyInstallationInstall using pip:pipinstallwagtail-periodic-reviewAfter installing the module, addwagtail_periodic_reviewandwagtail.contrib.settingsto installed apps in your settings file:# settings.pyINSTALLED_APPS=[# ..."wagtail.contrib.settings","wagtail_periodic_review",]Run migrations:$./manage.pymigrateUsageAdd thePeriodicReviewMixinto yourPagemodels:fromwagtail.modelsimportPagefromwagtail_periodic_review.modelsimportPeriodicReviewMixinclassMyPage(PeriodicReviewMixin,Page):# Add the periodic review panels to the settings panelssettings_panels=PeriodicReviewMixin.review_panels+Page.settings_panelsContributingInstallTo make changes to this project, first clone this repository:gitclonegit@github.com:zerolab/wagtail-periodic-review.gitcdwagtail-periodic-reviewWith your preferred virtualenv activated, install testing dependencies:Using pippython-mpipinstall--upgradepip>=21.3
python-mpipinstall-e.[testing]-UUsing flitpython-mpipinstallflit
flitinstallpre-commitNote that this project usespre-commit. To set up locally:# if you don't have it yet, globally$python-mpipinstallpre-commit# go to the project directory$cdwagtail-periodic-review# initialize pre-commit$pre-commitinstall# Optional, run all checks once for this, then the checks will run only on the changed files$pre-commitrun--all-filesHow to run testsNow you can run tests as shown below:toxor, you can run them for a specific environmenttox -e python3.10-django3.2-wagtail4.1or specific testtox -e python3.10-django3.2-wagtail4.1-sqlite tests.test_file.TestClass.test_methodTo run the test app interactively, usetox -e interactive, visithttp://127.0.0.1:8020/admin/and log in withadmin/changeme.