Saravanan666/pypi-org huggingface dataset:
Package: wagtail-graphql
wagtail-graphqlAn app to automatically add GraphQL support to a Wagtail websiteThisWagtailapp addsGraphQLtypes to other Wagtail apps. The objective is for this library to interact with an existing website in a generic way and with minimal effort.
In particular, it makes minimal assumptions about the structure of the website
to allow for a generic API.Installing / Getting startedTo install as a general app:pipinstallwagtail-graphqlAdd it together withgraphene_djangoto the Django INSTALLED_APPS:INSTALLED_APPS=[...'wagtail_graphql','graphene_django',...]Initial ConfigurationAdd the requiredgrapheneschemaGRAPHENEand aGRAPHQL_APIdictionary.
Include all the Wagtail apps the library should generate bindings to in theAPPSlist and optionally specify the prefix for each app inPREFIX. To remove a leading part of all the urls for a specific site, specify theURL_PREFIXparameter for each needed host.GRAPHENE={'SCHEMA':'wagtail_graphql.schema.schema',}GRAPHQL_API={'APPS':['home'],'PREFIX':{'home':''# optional, prefix for all the app classes generated by the wrapper},'URL_PREFIX':{'localhost':'/home'# optional, read from the site information if not specified}}The example above generates bindings for thehomeapp, .  Every url in this example
will be stripped of the initial/homesubstring.Finally, set up the GraphQL views in the projecturls.py.
For example, to add two endpoints for GraphQL and theGraphiQLIDE:fromdjango.views.decorators.csrfimportcsrf_exemptfromgraphene_django.viewsimportGraphQLViewurlpatterns=[...url(r'^api/graphql',csrf_exempt(GraphQLView.as_view())),url(r'^api/graphiql',csrf_exempt(GraphQLView.as_view(graphiql=True,pretty=True)),...]Note that the urls above need to appear before thewagtail_urlscatchall entry.ImagesTo be able to generate urls for images the following also needs to be included in the project'surls.py:fromwagtail.images.views.serveimportServeViewurlpatterns=[...url(r'^images/([^/]*)/(\d*)/([^/]*)/[^/]*$',ServeView.as_view(),name='wagtailimages_serve'),...]Multi-site configurationThis library works transparently with a multi-site Wagtail install without any extra configuration required.  To strip a custom leading prefix for each site, specify each host in theURL_PREFIX.  For exaple, for two hostshost1.example.comandhost2.example.com:GRAPHQL_API = {
    ...
    'URL_PREFIX': {
        'host1.example.com': '/prefix1',
        'host2.example.com': '/prefix2'
    }
    ...
}Note that the prefix for a site is taken from the root page url if a host is not included in theURL_PREFIXdictionary.DevelopingTo develop this library, download the source code and install a local version in your Wagtail website.FeaturesThis project is intended to require minimal configuration and interaction. It currently supportsPage modelsSnippetsImagesDocumentsStreamFieldswithBasic BlocksandStructBlocksContributingIf you'd like to contribute, please fork the repository and use a feature
branch. Pull requests are welcome.LinksRepository:https://github.com/tr11/wagtail-graphqlIssue tracker:https://github.com/tr11/wagtail-graphql/issuesLicensingThe code in this project is licensed under MIT license.
Package: wagtail-guide
Wagtail GuideWhat is it?The Wagtail Guide app adds functionality for creating and editing a guide for editors and publishers to help them create good content.InstallationWagtailguide has a pypi package and can be installed with:pipinstallwagtail-guideAfter installing, add it to your settings file along withwagtail.contrib.settings, the settings inclusion should be placed with your other wagtail.contrib libraries:INSTALLED_APPS=[...'wagtail_guide','wagtail.contrib.settings',]Settings and configurationWagtail guide has some customisation options...WAGTAIL_GUIDE_MENU_LABELUse this setting to define your own menu label for viewing the guide.ADD_WAGTAIL_GUIDE_TO_HELP_MENUThis setting will place the guide within the 'Help' menu.HIDE_WAGTAIL_CORE_EDITOR_GUIDEYou can use this setting to turn off the Wagtail core Editor Guide linkExamples of customisation via settingsHere is an example of a custom menu label (outlined here in orange),
and placing the editor guide link in the help menu:WAGTAIL_GUIDE_SETTINGS={"ADD_WAGTAIL_GUIDE_TO_HELP_MENU":True,"WAGTAIL_GUIDE_MENU_LABEL":"CMS Publishing Guide","HIDE_WAGTAIL_CORE_EDITOR_GUIDE":False,}Here is an example of hiding the core Editor Guide link and just using ours:WAGTAIL_GUIDE_SETTINGS={"ADD_WAGTAIL_GUIDE_TO_HELP_MENU":True,"WAGTAIL_GUIDE_MENU_LABEL":"CMS Publishing Guide","HIDE_WAGTAIL_CORE_EDITOR_GUIDE":True,}You can define them in your project settings file like this:WAGTAIL_GUIDE_SETTINGS={"ADD_WAGTAIL_GUIDE_TO_HELP_MENU":False,"WAGTAIL_GUIDE_MENU_LABEL":"WG guide menu label","HIDE_WAGTAIL_CORE_EDITOR_GUIDE":True,}UsageTo edit the guide, the user needs to be an admin, or have theManage editor guide'change' value checked in their user group permissions.Editing the guideTo edit the guide, from the left hand menu open settings > then click 'Manage editor guide'. Edit your content and then save.Guide navigation menuIf more than one 'heading' blocks are added to the content, an automatic menu will be displayed at the top of the guide under the heading 'Contents'Viewing the guideOnce logged in, a new menu icon towards the bottom of the left hand menu will be visible labeled as 'Editor guide':DependenciesWagtail Guide requireswagtail>=4.1ContributingWe welcome contributions to this project, seeCONTRIBUTING.mdfor more details.
Package: wagtailhavetheabilitytoactuallyseefieldsintheadmin
Alright… you messed up. Maybe you didn’t think your content through well enough. Maybe you really need to meet a deadline and nesting StreamField blocks is the only way through.Look, I don’t judge you. I’m here to help. Justpip install wagtailhavetheabilitytoactuallyseefieldsintheadmin, add it to your installed apps, and you’re good to go. Just don’t say you got it from me, okay?It’ll basically just make nested fields wide enough to see without getting claustrophobic.For instance, when you’ve got a StreamField like this:![Without wagtailhavetheabilitytoactuallyseefieldsintheadmin](without-wagtailhavetheabilitytoactuallyseefieldsintheadmin.png)We can make it look like this:![With wagtailhavetheabilitytoactuallyseefieldsintheadmin](with-wagtailhavetheabilitytoactuallyseefieldsintheadmin.png)Much better. By the way, it basically just expands nested fields to cover the help text placeholders. If you use help text inside of StreamField, you can’t use this. It doesn’t affect top level fields, though.But, is there a better way?Yeah, probably. [It’s being discussed](https://github.com/torchbox/wagtail/issues/2305), so hold your horses. This reason this happens in the first place is because some space on the side is saved for help text, which is obviously a good thing to have. So this is gonna take some time to solve long-term if we want to keep that feature.For complex fields, you should probably just make them look right anyway. See [wagtailblocks_cards](https://github.com/alexgleason/wagtailblocks_cards) for an example of this. If you have time, I suggest giving that a shot. Otherwise, wagtailhavetheabilitytoactuallyseefieldsintheadmin is your friend.LicenseThis is free and unencumbered software released into the public domain. View the UNLICENSE file in this repository for more details.
Package: wagtail-heroicons
Wagtail HeroiconsAddHeroiconsto the Wagtail admin.Note: SVG icons within the Wagtail admin are a relatively new feature in Wagtail, and the hook used within this package is not publically documented. As such, the API provided by Wagtail may change and cause breakage within this package. See Issue#6107and PR#6028in the Wagtail repository for more information.InstallationInstall the package using pip:pipinstallwagtail-heroiconsAddwagtail_heroiconsto yourINSTALLED_APPSsetting in yoursettings.pyfile:INSTALLED_APPS=[...'wagtail_heroicons',]UsageAll icons follow the following naming convention:heroicons-<name>-<style>.For example, thesolid Adjustments iconwould beheroicons-adjustments-solid.To see all available icons, names and styles, visit theHeroicons website.See theWagtail documentationfor more information on using icons in Wagtail.LicenseThis package is licensed under the MIT License. See theLICENSEfile for details.Heroicons are licensed under the MIT License and are Copyright (c) 2020 Refactoring UI Inc.
Package: wagtail-humanitarian-icons
Wagtail Humanitarian IconsThis Wagtail package bringsOcha Humanitarian Iconsto Wagtail Admin.NOTE: The recent versions of Wagtail supports uploading SVGs directly to the images section of the CMS interface. If
you just need to upload SVG images and use them on you frontend, consider using that. This package aims to provide a way
to select and use predefined humanitarian icons from OCHA.Installationpip install wagtail-humanitarian-iconsAddwagtailhumanitarianiconsto your installed appsINSTALLED_APPS = [
        ...
        "wagtailhumanitarianicons",
        ...
        ]UsageThis package uses the Wagtailregister_iconshook to register all the Ocha Humanitarian svg icons. For more details on
how this works, please look at theWagtail Docsand
thewagtail_hooks.pyfile of this packageYou can find a list of all the icons in the filewagtailhumanitarianicons/icons.json. You can refer any icon by the
name, without the.svgextension.The best way to visually choose an icon is to use the packagewagtail-icon-chooseras below:First install thewagtail-icon-chooserpackagepipinstallwagtal-icon-chooserAdd towagtailiconchooserto your installed appsINSTALLED_APPS = [
          ...
          "wagtailhumanitarianicons",
          "wagtailiconchooser",
          ...
          ]Then you can use the widgets provided bywagtal-icon-chooser. Refer
thepackage docsfor specific details on how to use the widgets, and
how to show selected icons on your frontend templates.Have a look on thesandbox/home/models.pyfor a complete example, andsandbox/home/templatesfor an example on
rendering on the frontend.The code used to prepare the OCHA icons can be found atwagtailhumanitarianicons/utils.py
Package: wagtailiconify
WAGTAIL ICONIFYLibrary developed forWagtail CMS, its purpose is to provide icon blocks from various librariesSpecial thanks toAlex Gleason, as well as for hiswagtail-fontawesomelibrary (V4.7), which helped me many times, as well as to support me in part of his code for the configuration of some thingsACTUAL SUPPORTED ICONSFontAwesome V5.15.4INSTALATION// TODO: CREATE PIP PACKAGE MODULEAdd to INSTALLED_APPS in settings/base.pyINSTALLED_APPS=[...,'wagtailiconify',...USE EXAMPLEfromwagtail.core.modelsimportPagefromwagtail.core.fieldsimportStreamFieldfromwagtail.admin.edit_handlersimportStreamFieldPanelfromwagtailiconify.blocksimportFontAwesomeBlockclassHomePage(Page):body=StreamField([('icon',FontAwesomeBlock())],null=True,blank=False)content_panels=Page.content_panels+[StreamFieldPanel('body')]CONTRIBUTIONSAll support for the library is well accepted, in fact I would appreciate it very much since I am the only one who is giving supportAny questions, comments or suggestions can be made known to me with an "Issue" notification or make a contribution with a pull request.Any closer attention can write to me at:victorarmenta30@gmail.comTODO WORKPip package installation (READY)Remove js empty generated by npm run buildAdmin icons support (Fontawesome have troubleshoots with Wagtail svg icons )Support for FeatherIconsMore docs for developersA niceeeee logo for this little library...Why not?
Package: wagtailimagecaptions
Captions for Wagtail ImagesA Django app for extending the Wagtail Image model to add captions and alt fields as
well as the extraction of IPTC image meta data.InstallingInstall using pip:pipinstallwagtailimagecaptionsSettingsIn your settings file, addwagtailimagecaptionstoINSTALLED_APPS:INSTALLED_APPS=[# ..."wagtailimagecaptions",# ...]You will also need to set a custom Image model in your setting files:# settings.pyWAGTAILIMAGES_IMAGE_MODEL="wagtailimagecaptions.CaptionedImage"MigratingHeads up! If you have existing images, you will need to create adata migration operationto move the old images into
the new model.How to UseThe custom Image model,CaptionedImage, adds four new fields to the Wagtail Image model:alt,caption,credit,iptc_data. When a new image is uploaded via Wagtail's media library, the app will attempt to extract any IPTC meta data found in the file and fill
thealt,captionandcreditfields. All IPTC meta data  extracted is also stored iniptc_data.Example use in a template:{%loadwagtailcore_tags%}<imgsrc="{{ image.url }}"alt="{{ image.alt }}">{{image.caption|richtext}}Adding date paths to image uploads.To add date paths to the image upload path, you can setWAGTIALIMAGECAPTIONS_UPLOAD_TO_DATE_PATHin your Django settings file with a valid date format.# settings.pyWAGTIALIMAGECAPTIONS_UPLOAD_TO_DATE_PATH="%Y/%m"
Package: wagtail-images-deduplicator
Wagtail Images De-duplicatorwagtail-images-deduplicatoris a Wagtail app to detect duplicate images in the admin. It's built withimagehash.RequirementsWagtail Images De-duplicator works withwagtail>=3.0.InstallationUsepipto install this package:pipinstallwagtail-images-deduplicatorConfigurationAddwagtail_images_deduplicatorto yourINSTALLED_APPSin your project's settings.Add theDuplicateFindingMixinto yourcustom image model. An example of doing it is shown below:fromwagtail.images.modelsimportImage,AbstractImage,AbstractRenditionfromwagtail_images_deduplicator.modelsimportDuplicateFindingMixinclassCustomImage(DuplicateFindingMixin,AbstractImage):admin_form_fields=Image.admin_form_fieldsclassCustomRendition(AbstractRendition):image=models.ForeignKey(CustomImage,on_delete=models.CASCADE,related_name="renditions")classMeta:unique_together=(("image","filter_spec","focal_point_key"),)If you choose to add the mixin and have existing image data, you will need to callsave()on all existing instances to fill in the new hash value:fromwagtail.imagesimportget_image_modelforimageinget_image_model().objects.all():image.save()SettingsWAGTAILIMAGESDEDUPLICATOR_HASH_FUNCThis setting determines thehash functionto use.Hash functionReferenceSetting nameAverage hashinghttp://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.htmlaverage_hashPerceptual hashinghttp://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.htmlphash(default)Difference hashinghttp://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.htmldhashordhash_verticalWavelet hashinghttps://fullstackml.com/2016/07/02/wavelet-image-hash-in-python/whashHSV color hashingcolorhashCrop-resistant hashinghttps://ieeexplore.ieee.org/document/6980335crop_resistant_hashWAGTAILIMAGESDEDUPLICATOR_MAX_DISTANCE_THRESOLDThis setting determines the maximum distance between 2 images to consider them as duplicates.The default value is5.To help you assess how these different algorithms behave and to learn more about hash distances, check out theexamples sectionof the imagehash library's README.
Package: wagtail-import-export
wagtail-import-exportPage export from one Wagtail instance into another.A published page and its published descendants can be exported via API or file from a source site and imported into a destination site under an existing page.The destination site should have the same page models as the source site, with compatible migrations.Installationpip install wagtail-import-exportNow add to your project'sINSTALLED_APPS:INSTALLED_APPS = [
    # ...
    'wagtailimportexport',
    # ...
]Add the following to your project's urls.py (note that theinclude(wagtailimportexport_urls)line must appear above theinclude(wagtail_urls)line that defines Wagtail's default routes):from wagtailimportexport import urls as wagtailimportexport_urls

urlpatterns = [
    # ...
    url(r'', include(wagtailimportexport_urls)),
    url(r'', include(wagtail_urls)),
](wagtailimportexport.urlscontains the export API endpoint. The admin urls are inwagtailimportexport.admin_urlsand
are automatically registered.)You should now see an 'Import / Export' item in the Wagtail admin menu.ConfigurationWhen importing via the API, only published pages are exported by default. If a descendant page is unpublished it and all its descendants are pruned (even if some of those descendants are themselves published).It is possible to export all pages under a source page by adding a setting on the source site:WAGTAILIMPORTEXPORT_EXPORT_UNPUBLISHED = TrueThis shouldnotbe used in a public source site because the API is unauthenticated and would thus expose unpublished content to anyone.LimitationsIf the imported content includes any foreign keys to page models, these will be updated to reflect the new page IDs if the target page is also part of the import, or left unchanged otherwise. If the target page is neither part of the import nor does it already exist on the destination site, this is likely to fail with a database integrity error.Page references within rich text or StreamField content will not be rewritten to reflect new page IDs.Imports are processed in tree path order; first the basePagerecords are imported, followed by the data for specific page subclasses. If a model is imported which includes a foreign key to a specific subclass ofPage, and the target page of that foreign key appears in the import but later in tree path order, this will fail with an integrity error (as the relevant record will not have been created at that point).Non-page data, such as images, documents or snippets, is not included in the import; the user is responsible for ensuring that any objects referenced from imported pages are already present on the destination site (with matching IDs).
Package: wagtail-import-export-tool
Wagtail Import/Export ToolImport/Export tool for Wagtail CMS (built on top of Django), that supports pages, images, documents, and snippets.InstallationInstallwagtail-import-export-toolusing PIP.pip install wagtail-import-export-toolAddwagtailimportexportto your Django project settings.INSTALLED_APPS = [
    ...
    'wagtailimportexport',
    ...
]ConfigApp settings can be found inwagtailimportexport/config.pyfile.Known LimitationsPage models should be consistent across both source and destination environments. Otherwise, importing may fail due to mismatching fields.Exporting snippets is not implemented yet.CreditsThis project is based ontorchbox/wagtail-import-export. Because they use the same Django application name, both cannot be used on the same project at the same time.
Package: wagtail-import-export-updated
wagtail-import-export-updatedImport/Export for Wagtail CMS pages, images, and documents from CSV, JSON, and API. Forked and updated for usability with new versions of Django/Wagtail, as the original library from Torchbox has not been edited since Apr 2019.
Improvements in functionality, performance, documentation, views, etc will be published time after time.A published page and its published descendants can be exported via API or file from a source site and imported into a destination site under an existing page.The destination site should have the same page models as the source site, with compatible migrations.Installationpip install wagtail-import-export-updatedNow add to your project'sINSTALLED_APPS:INSTALLED_APPS = [
    # ...
    'wagtailimportexport',
    # ...
]Add the following to your project's urls.py (note that theinclude(wagtailimportexport_urls)line must appear above theinclude(wagtail_urls)line that defines Wagtail's default routes):from wagtailimportexport import urls as wagtailimportexport_urls

urlpatterns = [
    # ...
    url(r'', include(wagtailimportexport_urls)),
    url(r'', include(wagtail_urls)),
](wagtailimportexport.urlscontains the export API endpoint. The admin urls are inwagtailimportexport.admin_urlsand
are automatically registered.)You should now see an 'Import / Export' item in the Wagtail admin menu.ConfigurationWhen importing via the API, only published pages are exported by default. If a descendant page is unpublished it and all its descendants are pruned (even if some of those descendants are themselves published).It is possible to export all pages under a source page by adding a setting on the source site:WAGTAILIMPORTEXPORT_EXPORT_UNPUBLISHED = TrueThis shouldnotbe used in a public source site because the API is unauthenticated and would thus expose unpublished content to anyone.LimitationsIf the imported content includes any foreign keys to page models, these will be updated to reflect the new page IDs if the target page is also part of the import, or left unchanged otherwise. If the target page is neither part of the import nor does it already exist on the destination site, this is likely to fail with a database integrity error.Page references within rich text or StreamField content will not be rewritten to reflect new page IDs.Imports are processed in tree path order; first the basePagerecords are imported, followed by the data for specific page subclasses. If a model is imported which includes a foreign key to a specific subclass ofPage, and the target page of that foreign key appears in the import but later in tree path order, this will fail with an integrity error (as the relevant record will not have been created at that point).Non-page data, such as images, documents or snippets, is not included in the import; the user is responsible for ensuring that any objects referenced from imported pages are already present on the destination site (with matching IDs).CreditsThis project is based ontorchbox/wagtail-import-export. Because they use the same Django application name, both cannot be used on the same project at the same time.
Package: wagtail-indexnow
Wagtail IndexnowA Wagtail package to automatically submit published pages for search engine indexing.This package implements theIndexNowstandard (which is also used byCloudflare's Crawler Hints).Whenever a page is published, apingis sent to supporting search engines to inform them of a content change. To reduce spamming, pages which have been published within the last 10 minutes are ignored.Installationpip install wagtail-indexnowThen, addwagtail_indexnowtoINSTALLED_APPS.Finally, register the required URLs (Note that these must be loaded without a prefix):urlpatterns+=[path("",include("wagtail_indexnow.urls"))]
Package: wagtail-inventory
wagtail-inventorySearch Wagtail pages by block type.Wagtail Inventory adds the ability to search pages in your Wagtail site by the StreamField block types they contain. It adds a new report to the Wagtail admin site that allows you to search for pages that do or do not contain certain blocks. It supports searching both by Wagtail built-in blocks (likeCharBlock) as well as any custom blocks you might define.SetupInstall the package using pip:$pipinstallwagtail-inventoryThis will also installdjango-autocomplete-light.Adddal,dal_select2, andwagtailinventoryas installed apps in your Django settings:# in settings.pyINSTALLED_APPS=(...'dal','dal_select2','wagtailinventory',...)Run migrations to create required database tables:$manage.pymigratewagtailinventoryRun a management command to initialize database tables with current pages:$manage.pyblock_inventoryAdmin users should now be able to search pages in the Wagtail admin site, under Reports > Block Inventory.Other user groups may be granted access to the report by giving them the “Can view” “Page block” permission in Wagtail Group settings.CompatibilityThis code has been tested for compatibility with:Python 3.8+Django 3.2 (LTS), 4.2 (LTS), 5.0Wagtail 3.0+, including 5.2 (LTS) and 6.0It should be compatible with all intermediate versions, as well.
If you find that it is not, pleasefile an issue.TestingRunning project unit tests requirestox:$toxTo run the test app interactively, run:$tox-einteractiveNow you can visithttp://localhost:8000/admin/in a browser and log in withadmin/changeme.Open source licensing infoTERMSLICENSECFPB Source Code Policy