Saravanan666/pypi-org huggingface dataset:
Package: wagtail-feedback
wagtail_feedbackA simple wagtail application for letting users give feedback on your wagtail pages - provides easily readable and accessible aggregates in the page admin viaFeedbackPanelQuick startAddwagtail_feedbackanddjango_filtersto your INSTALLED_APPS setting like this:INSTALLED_APPS=[# ...,'feedback','django_filters',]includefeedback.urlsin your URLconf.urlpatterns=[...include('feedback.urls')]In your template, load the feedback template tag to use the feedback form.{% load feedback %}

{# Loads the appropriate CSS styles. `{% static 'feedback/css/feedback.css'%}` #}
{% feedback_css %} 

{# Loads HTMX, if you have HTMX loaded in your template this is not nescessary. `{% static 'feedback/js/feedback.js'%}` #}
{% feedback_js %}  

{% feedback page=self %}(Optional)Include the feedback panel in your page definition:fromwagtail.modelsimportPagefromfeedback.panelsimportFeedbackPanelclassMyPage(Page):content_panels=Page.content_panels+[FeedbackPanel()]Easily configurable settings:A class for creating custom implementations of a feedback modelFEEDBACK_MODEL_NAMEdefault:feedback.FeedbackA form class for saving custom fields on your own custom feedback model:FEEDBACK_FORM_CLASSdefault:feedback.forms.FeedbackFormFilters for the admin in-panel list-view.FEEDBACK_FILTER_CLASSdefault:feedback.filters.AbstractFeedbackFilterBackends for validating feedback before and after submitFEEDBACK_BACKENDdefault:FEEDBACK_BACKEND=getattr(settings,"FEEDBACK_BACKEND",{"CLASS":"feedback.backends.IPBasedFeedbackend","OPTIONS":{# ... Options passed to class}})Other backends include:feedback.backends.SessionBasedFeedbackendfeedback.backends.PageBasedFeedbackendfeedback.backends.Feedbackend(base implementation)Django proxy settings to get IP-adressUSE_X_FORWARDED_HOSTdefault:FalseUsed for setting the appropriate IP-adress on thefeedback model / when using the backend.
Package: wagtail-flags
Wagtail-FlagsFeature flags allow you to toggle functionality based on configurable conditions.Wagtail-Flags adds a Wagtail admin UI and Wagtail Site-based condition on top ofDjango-Flags. For a more complete overview of feature flags and how to use them, please see theDjango-Flags documentation.DependenciesInstallationUsageExtended conditionsSignalsGetting helpGetting involvedLicensingCredits and referencesDependenciesPython 3.8+Django 3.2 (LTS)+Django-Flags 4.2Wagtail 4.0+It should be compatible at all intermediate versions, as well.
If you find that it is not, pleasefile an issue.InstallationInstall Django-Flags and Wagtail-Flags:pipinstalldjango-flags
pipinstallwagtail-flagsAddflagsandwagtailflagsas installed apps in your Djangosettings.py:INSTALLED_APPS=(...'flags','wagtailflags',...)UsagePlease see theDjango-Flags documentationfor the most current information about defining and checking feature flags.First, define the flag in Djangosettings.py:FLAGS={'MY_FLAG':[]}Then use the flag in a Django template (mytemplate.html):{%loadfeature_flags%}{%flag_enabled'MY_FLAG'asmy_flag%}{%ifmy_flag%}<div class="flagged-banner">I’m the result of a feature flag.</div>{%endif%}Next, configure a URL for that template (urls.py):fromdjango.urlsimportpathfromdjango.views.genericimportTemplateViewurlpatterns=[path(r'mypage/',TemplateView.as_view(template_name='mytemplate.html')),]Finally, add conditions for the flag in the Wagtail admin under "Settings", "Flags", "MY_FLAG":Extended conditionsWagtail-Flags adds the following conditions to Django-Flags:siteAllows a flag to be enabled for a Wagtail site that matches the hostname and port in the condition value.FLAGS={'MY_FLAG':[{'condition':'site','value':'staging.mysite.com'}],}SignalsWagtail-Flags includesflag_enabledandflag_disabledsignals that can be received when the "Enable for all requests" and "Disable for all requests" buttons are pressed in the admin. This is intended to enable things like front-end cache invalidation.fromdjango.dispatchimportreceiverfromwagtail.contrib.frontend_cache.utilsimportpurge_url_from_cachefromwagtailflags.signalsimportflag_disabled,flag_enabled@receiver(flag_enabled)defpurge_on_flag_enabled(sender,**kwargs):flag_name=kwargs["flag_name"]purge_url_from_cache(...)@receiver(flag_disabled)defpurge_on_flag_disabled(sender,**kwargs):flag_name=kwargs["flag_name"]purge_url_from_cache(...)Please note:These signals are only sent for manual presses of the "Enable for all requests" and "Disable for all requests" buttons in the admin. Other flag conditions may vary within and only be valid for a specific request cycle.Getting helpPlease add issues to theissue tracker.Getting involvedGeneral instructions onhowto contribute can be found inCONTRIBUTING.LicensingTERMSLICENSECFPB Source Code PolicyCredits and referencesForked fromcfgov-refresh
Package: wagtail-foliage
Wagtail FoliageUtilities for programmatically building page trees in Wagtail for automated
tests, default site structures, and more.RequirementsWagtail Foliage supports:Python 3.4, 3.5, 3.6, and 3.7Django 1.11, 2.0, and 2.1Wagtail 1.13, 2.3, and 2.4These are the currently supported versions for each project as of December
2018, excepting the exclusion of Python 2.7 from this list.Installationpipinstallwagtail-foliageUsageUse as a context managerfromdjango.dbimportTestCasefromfoliage.contextmanagersimportpage_treefrommyapp.modelsimportHomePage,InsidePageclassMyAppTestCase(TestCase):deftest_with_pages(self):PAGES=[(HomePage(title='Home Page'),[InsidePage(title='Inside Page'),(InsidePage(title='Inside Page With Children'),[InsidePage(title='Third Level Page'),InsidePage(title='Another Third Level Page')])])]withpage_tree(PAGES):# Tests that rely on that page tree go here. The context manager# will automatically set the top level page as the Wagtail site's# root pageUse as a decoratorfromdjango.dbimportTestCasefromfoliage.contextmanagersimportpage_treefrommyapp.modelsimportHomePage,InsidePagePAGES=[(HomePage(title='Home Page'),[InsidePage(title='Inside Page'),(InsidePage(title='Inside Page With Children'),[InsidePage(title='Third Level Page'),InsidePage(title='Another Third Level Page')])])]classMyAppTestCase(TestCase):@page_tree(PAGES)deftest_with_pages(self):# Tests that rely on that page tree go here. The context manager# will automatically set the top level page as the Wagtail site's# root pageUse the low-level APIfromfoliage.utilsimportbuild_page_treefrommyapp.modelsimportHomePage,InsidePagenew_pages=build_page_tree([(HomePage(title='Home Page'),[InsidePage(title='Inside Page'),(InsidePage(title='Inside Page With Children'),[InsidePage(title='Third Level Page'),InsidePage(title='Another Third Level Page')])])])
Package: wagtailfontawesome
AddFontAwesome 4.7icons to your Wagtail project.Installpip install wagtailfontawesomeThen addwagtailfontawesometo your installed apps.UsageStreamFieldAdd FontAwesome icons to StreamFieldthe regular way, just seticon=”fa-something”. Referencethe full list.For example, usingfa-exclamation-triangleon a block that’s a class:classNoticeBlock(StructBlock):message=RichTextBlock()indicator=ChoiceBlock()classMeta:icon='fa-exclamation-triangle'The same block, but inline:notice=StructBlock([('message',RichTextBlock()),('indicator',ChoiceBlock())],icon='fa-exclamation-triangle')Using IconBlockWagtail FontAwesome contains a dropdown chooser you can use to select a block from the available options. For example,fromwagtailfontawesome.blocksimportIconBlockclassCardBlock(StructBlock):icon=IconBlock()title=CharBlock()You are responsible for including the FontAwesome CSS yourself somewhere on the page. See the section “On the front-end” below for a way to do that with Wagtail FontAwesome.ModelAdminModelAdminis supported if you’re using Wagtail 1.5 or above. Similar to StreamField, just seticon=”fa-something”on your menu item.Other parts of the adminYou can include icons anywhere in the admin with:<iclass="icon icon-fa-something"></i>In Wagtail 1.3.x and below you can only use icons on the page editor screen.On the front-endYou can also include the CSS on the front end, and follow FontAwesome’s documentation.{%loadwagtailfontawesome%}{%fontawesome_css%}This will generate equivalent markup to:<linkrel="stylesheet"href="{%static'wagtailfontawesome/css/fontawesome.css'%}">Then include icons anywhere on the front-end with:<iclass="fa fa-something"></i>Using wagtailfontawesome as an optional dependencyIf you want to distribute a Wagtail plugin with FontAwesome icons, you can use this package as an optional dependency by checking if it’s installed in Django, and falling back otherwise.fromdjango.appsimportappstry:fromwagtail.core.blocksimportStructBlockexceptImportError:# fallback for Wagtail <2.0fromwagtail.wagtailcore.blocksimportStructBlockclassBlockquoteBlock(StructBlock):quote=TextBlock()author=TextBlock()classMeta:ifapps.is_installed('wagtailfontawesome'):icon='fa-quote-left'(in this case, the fallback is to do nothing)
Package: wagtail-font-awesome-svg
Wagtail Font Awesome SVGAddFont AwesomeSVG icons to your Wagtail project.Installpip install wagtail-font-awesome-svgAddwagtailfontawesomesvgto your installed apps.INSTALLED_APPS = [
    'wagtailfontawesomesvg',
]UsageThis is anoverview of available icons.
Choose an icon and add it via yourwagtail_hooks.py:from wagtail import hooks

@hooks.register("register_icons")
def register_icons(icons):
    return icons + [
        'wagtailfontawesomesvg/brands/facebook.svg',
        'wagtailfontawesomesvg/regular/face-laugh.svg',
        'wagtailfontawesomesvg/solid/yin-yang.svg',
        ...
    ]
Package: wagtail-footnotes
Wagtail FootnotesAdd footnotes functionality to your Wagtail project.UsageAdd the app toINSTALLED_APPS:INSTALLED_APPS=[# ..."wagtail_footnotes",# ...]Add the footnotesurls.pyto your project'surls.py:fromwagtail_footnotesimporturlsasfootnotes_urlsurlpatterns=[# ...path("footnotes/",include(footnotes_urls)),# ...]Note: The URL has to be defined as above as it is currently hardcoded in the Javascript.Update your page models to show the footnotes field:classInformationPage(BasePage):# ...content_panels=[# ...InlinePanel("footnotes",label="Footnotes"),]Update yourRichTextBlocksAdd"footnotes"to thefeaturesarg for eachRichTextBlockthat you want to have this functionalityYou will also need to change anyRichTextBlocks towagtail_footnotes.blocks.RichTextBlockWithFootnotesUpdate your page templates to include{% include "wagtail_footnotes/includes/footnotes.html" %}Make and run migrations:./manage.pymakemigrations
./manage.pymigrateSettingsWAGTAIL_FOOTNOTES_TEXT_FEATURESDefault:["bold", "italic", "link"]Use this to update a list of Rich Text features allowed in the footnote text.Common issuesI click on theFnbutton in the editor and it stops workingThis is likely because the URL in the JS does not match the URL of the footnotes view. Check the URL inwagtail_footnotes/static/footnotes/js/footnotes.jsmatches the URL you set.NoneTypeerror when rendering page.Make sure you are rendering the field in the template using{% include_block page.field_name %}
Package: wagtail-formation
Build forms from wagtail blocksFree software: MIT licenseDocumentation:https://wagtail-formation.readthedocs.io.FeaturesImplement truly dynamic forms in a wagtail CMSTechnical details are handled by the developer, everything else is contentForm content is as dynamic as page content can be, fully leveraging the power of StreamBlocksForms can be created on a page itself, or reused accross multiple pagesCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: wagtailforums
Wagtail Forums==============This repo contains a simple forum system built on Wagtail CMS.It allows a forum to be built and structured through the Wagtail admin interface. All users posts are Wagtail pages so benefit from all the features Wagtail offers to pages such as moderation workflow and revisions.Installation============This can be installed through pip:pip install wagtailforumsYou can then add it to the ``INSTALLED_APPS`` setting in your Django settings:INSTALLED_APPS = [...# Put this after the wagtail imports'wagtailforums',]Warning=======This project is in very early development and doesn't include many of the features that are essential for forums (patches welcome).It is also likely to change in backwards-incompatibile ways so be aware of that if you would like to use this in a project.
Package: wagtail-freezer
Wagtail FreezerGenerates static HTML sites from a Wagtail projectLinksDocumentationChangelogContributingDiscussionsSecuritySupported versionsPython 3.7 - 3.10Django 3.2 - 4.0Wagtail 3.xInstallationpip install wagtail-freezerAdd"wagtail_freezer"to INSTALLED_APPSAdd aFREEZER_BUILD_DIRsetting indicating where the static files will be output. To write into a folder namedbuildat the project root, use:FREEZER_BUILD_DIR = os.path.join(BASE_DIR, "build")UsageRun./manage.py buildstaticsite. This will generate one folder per site within FREEZER_BUILD_DIR, with subfolders making up the page tree and the pages themselves saved asindex.htmlat the appropriate point.While building the static files, wagtail-freezer will scan the HTML for anyhreforsrcattributes that reference files underSTATIC_URLorMEDIA_URL, and copy these files to corresponding folders under the site root. This step only takes place ifSTATIC_URLorMEDIA_URLare local URLs beginning with '/'.If you have additional static / media files that can't be found by parsing HTML (for example, images referenced within CSS, JavaScript or JSON), you can provide afreezer_follow_urlsmethod on the page model that returns a list of media / static URLs to be followed:classHomePage(Page):@propertydeffreezer_follow_urls(self):urls=['/static/images/background.jpg']foriteminself.playlist.select_related('video'):urls.append(item.video.url)returnurlsDeployingWhen you're happy with how the local static site works (test it by runningpython -m http.serverfrom the root folder), you can deploy it to Amazon S3 by installing the AWS command line tool (pip install awscli), creating a bucketconfigured for static website hosting, and running:aws s3 sync build/localhost s3://mysite.example.com/ --acl public-readLimitationswagtail-freezer was created as a "minimum viable product" substitute for static site generators such asdjango-bakery, which at the time of writing are lagging behind in support for current Django (and Wagtail) versions. It has only been tested against very simple sites, and will probably not work with custom URL routes (RoutablePageMixin), pages with multiple preview modes (wagtail.contrib.forms, although that's not too usable on a static site anyhow), non-standard middlewares and no doubt lots of other things. Use at your own risk!
Package: wagtailfroala
Extends Wagtail to use the amazing Froala editor.
This Wagtail extension requires Wagtail 1.5.x, as it usesWAGTAILADMIN_RICH_TEXT_EDITORS.InstallationRun the commandpip install wagtailfroalaAddwagtailfroalato yourINSTALLED_APPS.Addwagtailfroala.rich_text.FroalaRichTextAreatoWAGTAILADMIN_RICH_TEXT_EDITORSin your settings.For example, to use Froala for allRichTextFieldandRichTextBlockinstances:WAGTAILADMIN_RICH_TEXT_EDITORS={'default':{'WIDGET':'wagtailfroala.rich_text.FroalaRichTextArea','OPTIONS':{'key':'xxxxxxxxxxxx'}}}Or, to use Froala only for defined instances…WAGTAILADMIN_RICH_TEXT_EDITORS={'default':{'WIDGET':'wagtail.wagtailadmin.rich_text.HalloRichTextArea'},'froala':{'WIDGET':'wagtailfroala.rich_text.FroalaRichTextArea','OPTIONS':{'key':'xxxxxxxxxxxx','toolbarButtons':['paragraphFormat','fontFamily','bold','italic','underline','formatOL','formatUL','align','color','|','insertHR','insertLink','|','undo','redo']}},'froala_small':{'WIDGET':'wagtailfroala.rich_text.FroalaRichTextArea','OPTIONS':{'key':'xxxxxxxxxxxx','toolbarButtons':['fontFamily','bold','italic','underline','color','|','insertLink'],'editorClass':'editor-small'}}}html_field=RichTextField(editor='froala')stream_field=StreamField([('html',RichTextBlock(editor='froala_small'))])OptionsYou will need to ensure that thekeyoption is correctly set with your Froala license key.By default, Codemirror HTML syntax highlighting is enabled, you can disable it if you wish.FROALA_CODEMIRROR=FalseFont Awesome is required by Froala for toolbar icons, so it is included by default. If you don’t want to include it or already have a version included, you can disable it.FROALA_FONT_AWESOME=FalseTo Do[ ] Implement image replace button.[ ] Incoorperate Froala eventshttps://www.froala.com/wysiwyg-editor/docs/events.Please feel free to contribute.
Package: wagtail-gallery
IntroductionThis is a very basic gallery app that integrates with Wagtail. It allows a person to upload images and order them on a gallery page. Said gallery page then shows the low-res thumbnails, and when clicked it opens up a high res version with captions.This app is simple, and not feature rich. It does the basics and thats it. I will probably add more features and options to it as time permits, but only if requests are made.It is also not production ready as there areno tests currently writtenfor it. I did put this up on a site and they have been using it extensively and haven’t had any reported issues. That said,apps without tests should always be treated sceptically.I hope to write tests in a month or so when I get a bit of free time. I also hope to add a bunch of features in the near future.Please report any errors you encounter. I will try resolve them quickly and then add tests for them as things come up so it doesn’t reoccur. Please visitwagtail_gallery gitto make pull requests or log issues etc. Documentation is at readthedocs.io:wagtail_gallery documentationInstallationTo install runpip install wagtail_galleryIt should automatically install all the necessary dependencies.Remember to addwagtail_gallery(along with the others mentioned) to your installed apps in settings.py i.e.INSTALLED_APPS=[...'wagtail_gallery','wagtail.contrib.routable_page','wagtail.contrib.modeladmin','django_social_share',]Requirements:python3wagtaildjangodjango-social-shareI’m not quite sure how far back this app works; however, it should work going back quite far. It’s currently tested on Python3 with Wagtail >2 and Django >2 on openSUSE. It should work on all platforms and shouldn’t break anytime soon. Let me know if you have a combo that doesn’t work and I’ll see what I can do to support it.CaveatsI haven’t implemented sub-categories at all. Its a planned feature.You can only have one Gallery Root Page at this point in time. I really do want to add the ability to have many. I just haven’t gotten round to it. It should be quite simple.URLs are not yet fully internationalised as/category/isn’t translated. I’ll get to this eventually.All galleries are public. No permissions have been integrated; however, this is a planned feature.
Package: wagtailgeowidget
Wagtail-Geo-WidgetWagtail-Geo-Widget is the complete map solution for your Wagtail site.FeaturesSupports Google Maps or any tile provider supported by Leaflet (such as Open Street Map or Mapbox)Real spatial support (with GeoDjango and PointField)Storing coordinates as strings (for no-GeoDjango setups)StreamField integrationSearching with geocoding (supports Google Geocoding, Nominatim and Mapbox)Inline panel supportOptional address search fieldLanguage supportDocumentationGetting started with Google MapsGetting started with LeafletSettingsAdding the widget to a PageIntegrating with GeoDjangoAdding to a StreamFieldSupported GeocodersFAQContributeIf you have ideas for improvement, please share your thoughts through an issue.Issue Tracker:https://github.com/Frojd/wagtail-geo-widget/issuesSource Code:https://github.com/Frojd/wagtail-geo-widgetContribution documentationWe also welcome Pull Requests (PR). Please note that this project uses git-flow so please use thedevelopbranch when creating PR's.SecurityIf you believe you have found a security issue with any of our projects please email us atsecurity@frojd.se.LicenseWagtail-Geo-Widget is released under theMIT License.
Package: wagtail-grafl
Wagtail-GraflCreate charts in Wagtail streamfields using theGrafl.ioplotting service.InstallationInstall fromPyPI:pip install wagtail-graflThen add the following to your project'sINSTALLED_APPS.'wagtail_grafl',Out of the boxThere are currently three blocks available inwagtail-grafl.GraflBlockThe primary block used for creating basic Grafl plots.It consists of a single JSON field for entering Grafl plot data. It inherits fromBaseGraflBlock.JsonBlockSimple formatted JSON field with basic validation and included inGraflBlock.BaseGraflBlockTheBaseGraflBlockis provided to make it easy to extendwagtail-grafland build your own bespoke Grafl blocks.It provides theget_grafl_datamethod that needs to be overridden in any blocks that inherit from this.Theget_grafl_datamethod should return a dictionary of Grafl compatible data.This make it possible for custom blocks to pull in data from other sources and generate Grafl plots programatically.SettingsWAGTAIL_GRAFL_PLOT_DEFAULTS - a optional dictionary of default parameters that is merged with the blocks grafl data. This is useful for specifying parameters that should be consistent across all Grafl plot blocks.Example useAdd the StreamBlock to a StreamField on a Wagtail page:from wagtail.core import blocks
from wagtail_grafl.blocks import GraflBlock

class MyStreamBlock(blocks.StreamBlock):
    grafl_plot = GraflBlock()Add theStreamBlockto aStreamFieldon a Wagtail page:from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.core.fields import StreamField
from wagtail.core.models import Page

from .blocks import MyStreamBlock


class MyPage(Page):

    body = StreamField(MyStreamBlock(), null=True)

    content_panels = Page.content_panels + [
        StreamFieldPanel('body'),
    ]Then in the page template:{% load static wagtailcore_tags %}

{% include_block page.body %}About GraflGrafl is a plotting service that can be used to generate plots from basic JSON data. It's based on Plotly, free to use and very flexible.