Saravanan666/pypi-org huggingface dataset:
Package: wagtailinvoices
Version 1.0 is under development!wagtailinvoicesA plugin for Wagtail that provides invoice functionalityDocumentation on ReadTheDocsInstallingInstall using pip:pip install wagtailinvoicesIt works with Wagtail 1.0b2 and upwards.UsingCreate invoice models for your application that inherit from the relevantwagtailinvoicesmodels:fromdjango.dbimportmodelsfromwagtail.wagtailadmin.edit_handlersimportFieldPanelfromwagtail.wagtailcore.fieldsimportRichTextFieldfromwagtail.wagtailcore.modelsimportPagefromwagtailinvoices.modelsimportInvoiceIndexMixin,AbstractInvoicefromwagtailinvoices.decoratorsimportinvoiceindex# The decorator registers this model as a invoice index@invoiceindexclassInvoiceIndex(InvoiceIndexMixin,Page):# Add extra fields here, as in a normal Wagtail Page class, if requiredinvoice_model='Invoice'classInvoice(AbstractInvoice):# Invoice 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 ``InvoiceIndex`` Pagefull_name=models.CharField(max_length=255)organization=models.CharField(max_length=255)phone_number=models.CharField(max_length=255)panels=[FieldPanel('full_name',classname='full'),FieldPanel('organization'),FieldPanel('phone_number')]+AbstractInvoice.panelsdef__unicode__(self):returnself.full_name
Package: wagtail-jotform
Wagtail JotformEmbedableJotformforms for Wagtail pages.Wagtail Jotform works by providing a newEmbeddedFormPagepage type with a form choice field. Values for this form field are populated from the Jotform API.InstallationInstall frompypi:pipinstallwagtail-jotformConfigurationYou will need an API key from Jotform. Add the following variables to your settings:WAGTAIL_JOTFORM={"API_KEY":"somekey","API_URL":"https://api.jotform.com","LIMIT":50,}LIMITis the number of results in each result set for form list. Default is 50. Maximum is 1000.If your Jotform account is inEU safe mode, yourJOTFORM_API_URLshould behttps://eu-api.jotform.com.Add the following to yourINSTALLED_APPSin settings, and note thatwagtail_jotformdepends onroutable_page:INSTALLED_APPS=[..."wagtail_jotform","wagtail.contrib.routable_page",]Thank you pageThank you pages work via Wagtail'sRoutablePageMixin.When a form is created, the Jotformthankurlis set with your created form's thank you page URL, e.g.https://mysite.com/formpage/thank-you. When the form is submitted, the user will be redirected accordingly and be show the 'thank you' data specified on on the form page added.Overriding templatesWagtail Jotform has two templates:embedded_form_page.htmlthank_you.htmlYou can override these templates in your project by adding them in the following location:your_project_root/templates/wagtail_jotform/embed_form_page.htmlthank_you.htmlContributingWe welcome contributions to this project. Please follow thecontributing instructionsto get started.Release processTo release a new version, theRelease documentationshould be followed.
Package: wagtail-json-widget
Wagtail JSON WidgetJSON editing for Wagtail Admin withjosdejong / jsoneditor. Provides widgets for Page and StreamField.InstallationInstall fromPyPI:pip install wagtail-json-widgetThen add the following to your project'sINSTALLED_APPS.'wagtail_json_widget',UsageAs a field:fromdjango.dbimportmodelsfromdjangoimportformsfromwagtail.admin.panelsimportFieldPanelfromwagtail.admin.formsimportWagtailAdminPageFormfromwagtail.core.modelsimportPagefrom.blocksimportMyStreamBlockfromwagtail_json_widget.widgetsimportJSONEditorWidgetclassMyPageForm(WagtailAdminPageForm):myjson=forms.JSONField(widget=JSONEditorWidget,required=False)classMyPage(Page):myjson=models.JSONField(null=True,blank=True)content_panels=Page.content_panels+[FieldPanel('myjson'),]base_form_class=MyPageFormAs a StreamField block:fromwagtailimportblocksfromwagtail_json_widget.blocksimportJSONBlockclassMyBlock(blocks.StructBlock):my_json_block=JSONBlock(default='{}')...
Package: wagtail-katex
Math typesetting forWagtail CMSpowered byKaTeX.This package is forked fromgatensj/wagtail-draftail-katex.This package contains svg icon fromFont Awesome, which is licensed under theCC BY 4.0 License.Quick StartInstall the package using the following command:pipinstallwagtail-katexAddwagtailkatexto theINSTALLED_APPSsection in yoursettings.pyfile:INSTALLED_APPS=[..."wagtailkatex",...]Now you will see the math typesetting icon displayed in the toolbar of
rich text fields in Wagtail admin views.
Package: wagtail-knowledgebase
Knowledgebase Site Pages for Wagtail.Usagepip installwagtail-knowledgebaseAdd “wtknowledgebase” toINSTALLED_APPSin your settings.pyOptionally add a list of('name', **kwargs)tuples toWTKNOWLEDGEBASE_STATIC_BLOCKSsetting to define static
blocks to be included in page types.Reuse stream blocksThe block designed for these pages could be useful for other pages,
you can use the stream builder that is defined in blocks to make use
of the blocks defined for knowledgebase pages.from wagtail.models import Page
from wagtail.fields import StreamField
from wtknowledgebase import blocks

class HomePage(Page):
    body = StreamField(blocks.stream_builder.blocks([
        ('my_extra_static', StaticBlock(
            template='_my_template.html',
            label="Admin UI Label",
            icon='doc-full',
            admin_text="This is a deeper description",
    ])
Package: wagtail-lazyimages
Wagtail Lazy ImagesTemplate tags that generate tiny blurry placeholder images alongside your wagtail images in order to lazy-load them medium.com style.InstallingInstall using pip:pip install wagtail-lazyimagesUsageAddwagtail_lazyimagesto yourINSTALLED_APPSsetting like this:INSTALLED_APPS = [
    ...
    'wagtail_lazyimages',
]Load thelazyimages_tagstemplate tag library in your template:{% load "lazyimages_tags" %}Replace wagtail'simagetag withlazy_imagefor images that should lazy load:{% lazy_image page.photo width-960 class="lazy" %}This template tag behaves just like wagtail'simagetag with the exception that it generates an additional scaled down and blurred placeholder image. The URL of the placeholder image will appear in thesrcattribute of the image tag while the large version will be referenced indata-src:<img src="/path/to/placeholder-image.jpg" data-src"/path/to/image.jpg" class="lazy" />In the front end: Implement the lazy loading functionality yourself or use a dedicated JavaScript library likelozad.js:const observer = lozad('.lazy');
observer.observe();Alternative attributeIf you want to use a different attribute for referencing the original image thandata-srcuse the parameterlazy_attrfor that:{% lazy_image page.photo width-960 lazy_attr="data-lazy-url" class="lazy" %}As syntaxIf you need to assign the image data to a template variable using Django'sassyntax, the URL of the placeholder image is stored in thelazy_urlattribute:{% load "lazyimages_tags" %}

{% lazy_image page.photo width-960 as img %}

<img data-src="{{ img.url }}" src="{{ img.lazy_url }}" width="{{ img.width }}"
     height="{{ img.height }}" alt="{{ img.alt }}" />attrsshortcutIn case you need to use Wagtail'sattrs shortcutuselazy_attrsinstead:{% load "lazyimages_tags" %}

{% lazy_image page.photo width-960 as img %}

<img {{ img.lazy_attrs }} class="custom-class" />
Package: wagtailleafletwidget
Wagtail-Leaflet-WidgetThis is aLeaflet JSbased wagtail panel for picking geo location on a map, inspired bywagtail-geo-widget.The map usesOpen Street Mapwhich is open source, thus no API Key is required.FeaturesReal spatial support (with GeoDjango and PointField)Storing coordinates as strings (for no-GeoDjango setups)StreamField integrationInline panel supportDocumentationGetting startedSettingsAdding the widget to a PageIntegrating with GeoDjangoAdding to a StreamFieldFAQContributingWant to contribute? Awesome. Just send a pull request.LicenseWagtail-Leaflet-Widget is released under theMIT License.
Package: wagtail-lightadmin
FeaturesThis app customises the wagtail admin as follows:Rich textSome of the less useful features are removed (HR, undo/redo, H4, H5).Headings/paragraph come first (thoughhttps://stackoverflow.com/questions/10773813/adding-something-to-the-top-of-a-json-object).The active state of the rich text (.expand) does not expand anymorePublication flowThe “submit for moderation” button is hidden (it’s mostly confusing for the type of clients we have).Provides a LinkBlockIt has the same UI as when you insert a link in a RichText but has the advantage of being avialable out of it.In case you are using this block to replace a PageChooserBlock you can also use the pagechooser_fallback template tag.
The PageChooserBlock initially only saves the pk of the page you want to link to. This template tag gets the corresponding
page and extracts the URL and the page title from it to try and display what you would expect.
A similar logic is used to try and keep the page the editor initially picked on the admin side.Install & setuppip install wagtail_lightadminAddwagtail_lightadminto your installed apps.Tell Wagtail to use the light rich text widget in your settings_default.py:WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'default': {
        'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea',
        'OPTIONS': {
            'plugins': {
                'halloheadings': {'formatBlocks': ['p', 'h2', 'h3']},
                'halloformat': {},
                'hallolists': {},
                'hallowagtaillink': {},
                'hallorequireparagraphs': {},
                'hallowagtailembeds': {},
                'hallowagtailimage': {},
                'hallowagtaildoclink': {},
            },
        }
    },
}Make sure django knows about the new static filesmanage.py collectstatic –no-input
Package: wagtail-link-block
A link block to use as part of other StructBlocks which
lets the user choose a link either to a Page, Document,
external URL, Email, telephone or anchor within the current page
and whether or not they want the link to open in a new window.It hides the unused fields, making the admin clearer and less cluttered.UsageTo install:$pipinstallwagtail-link-blockEdit your Django project’s settings module, and add the application toINSTALLED_APPS:INSTALLED_APPS=[# ..."wagtail_link_block",# ...]To use in a blockfromwagtail_link_block.blocksimportLinkBlockclassMyButton(StructBlock):text=CharBlock()link=LinkBlock()classMeta:template="blocks/my_button_block.html"And the blocks/my_button_block.html<ahref="{{ self.link.get_url }}"{%ifself.link.new_window%}target="_blank"{%endif%}>{{ self.text }}</a>DevelopingWe’re usingblack,isort&flake8for formatting & linting, and there arepoetrycommands in theMakefilefor building, etc.
Package: wagtail-linkchecker
A tool/plugin to assist with finding broken links on your wagtail site.
This tool works asynchronously using celery.InstallingInstall using pip:pip install wagtail-linkcheckerIt works with Wagtail 1.0 and upwards.UsingTo use, firstly you will need to addwagtaillinkcheckerto yourINSTALLED_APPSand run the migrations.
There will now be an extra item on the settings panel of the wagtailadmin. Inside here you can enable or disable automated
scanning (See below for more detail) or conduct a scan.For scans to be conducted from the admin, you must be running a celery daemon.
You can run the celery worker withcelery-Awagtaillinkchecker worker-linfo. See theCelery Documentationfor more information.
For production you’ll want to run celery as a daemon using something like systemd. SeeCelery Daemonizationfor more information.Conducting a scanConducting a scan will scan all of your wagtail pages, and detect all images and anchors with asrcorhrefrespectively.
Utilising therequestsandBeautifulSouplibraries, requests will be made to each link to make sure an appropriate response
is received, and if no appropriate response is received, once the scan is complete, all broken links along with their status codes and
reasons will appear.Scan results will be stored.Automated ScanningIf you want automated scanning to work youHAVEto set up a cron job. The cron job will need to run the management commandlinkcheckerat
an interval of your choosing.
The automated scans will do the same as manually conducting a scan, but instead will email the last person to edit the page with broken links/images.Command options--do-not-send-mailDon’t send an email to administrators once scan is complete.--run-synchronouslySkip celery and run command synchronously (useful for automated scanning)-v2Show more output in the logs
Package: wagtail-links
PurposeWagtail links has two goals:Provide a consistent way to refer to links, which may be of different types, so as to reduce decision fatigueMinimize broken links as much as possible.InstallInstall wagtail-links via Pip.pipinstallwagtail-linksAddwagtail_linksto your Django project’s INSTALLED_APPS setting.Run database migrations.pythonmanage.pymigrateUsageAdd a foreign key to the page you wish to add links to.my_link=models.ForeignKey('wagtail_links.Link',null=True,blank=True,on_delete=models.SET_NULL,related_name='+')Neat:You may use it like:<ahref="{{ self.link.url }}">Link here</a>From a template, you can also load a link by its name:{% load get_wagtail_link_url from wagtail_links %}<ahref="{% get_wagtail_link_url 'my-link' %}">Link here</a>This is useful for global page links, navigation, etc.Validation and loggingThe Link model will validate that one and only one field is set.
It will also disallow invalid Django reverse view names.If a URL cannot be determined, we’ll log the issue as a warning. We won’t throw an exception as that would be bad for users. You are responsible for capturing this log warning, perhaps using Sentry.For example - let’s say you make a Django view name called admin:index. This would typically give you/admin/. Later the admin application is removed from the program, now this link fails. It will now display “” and generate a warning in your server logs.
Package: wagtail-lite-youtube-embed
Wagtail Lite YouTube EmbedA Wagtail embed finder to uselite-youtubefor more efficient and private YouTube embeds.Installationpip install wagtail-lite-youtube-embedThen, configureWAGTAILEMBEDS_FINDERSto useLiteYouTubeEmbedFinderbefore the default OEmbed finder:WAGTAILEMBEDS_FINDERS=[{"class":"lite_youtube_embed.LiteYouTubeEmbedFinder",},{"class":"wagtail.embeds.finders.oembed",},]Note: This library does not configure your frontend to uselite-youtube- you will need to install and load this yourself.
Package: wagtail-live
Wagtail LiveWagtail Liveis a Wagtail CMS package to create live blog pages.AboutWith Wagtail Live:Reporters caninstantly publish to a live blogby submitting messages via mobile apps.Audience can read the posts right away as the live blog page instantly updates.Content editors can edit messages via the Wagtail Admin. The internal format is a normal Wagtail page with streamfield and blocks.Create, update, delete operations.Rich text, images, emojis, URLs are converted to embeds.Slack and a Live blog page:Content is also editable via the Wagtail admin:CompatibilityWagtail Live works with:Wagtail 2.12 or higherDjango 2.2 or higherPython 3.7 or higherGetting startedTo get started with Wagtail Live, check out theWagtail Live tutorial.DocumentationAll documentation is in the "docs" directory and online atwagtail.github.io/wagtail-live/.CommunityWe have awagtail-livechannel inWagtail's Slack workspacefor discussions about the project.Contributing - TestingTo contribute to Wagtail Live or run the test suite, refer to thedevelopment sectionof the docs.Google Summer of CodeThis project is part of Google Summer of Code 2021 by Tidiane Dia. Check out theGSOC report.SponsorsWagtail-live provides apublisher based on PieSocket.PieSocket offers a 'free-plus' plan to all our users. See the link above for details.
Package: wagtail-localize
Wagtail localizeWagtail Localize is a translation plugin for theWagtail CMS. It allows pages or snippets to be translated within Wagtail's admin interface. It also provides integrations with external translations services such asPontoonorDeepL, and importing/exporting translations with PO files.DocumentationChangelogRequirementsWagtail Localize requires the following:Python (3.8, 3.9, 3.10, 3.11)Django (3.2, 4.1, 4.2)Wagtail (4.1, 5.1, 5.2) withinternationalisation enabledwagtail-modeladminifusing wagtail_localize.modeladminand Wagtail >= 5.0InstallationInstall usingpip:pipinstallwagtail-localizeAddwagtail_localizeandwagtail_localize.localesto yourINSTALLED_APPSsetting:INSTALLED_APPS=[# ..."wagtail_localize","wagtail_localize.locales",# This replaces "wagtail.locales"# ...]wagtail-localizeloads additional assets for the editing interface. Run thecollectstaticmanagement command to collect all the required assets.pythonmanage.pycollectstaticContributingAll contributions are welcome!InstallTo make changes to this project, first clone this repository:gitclonegit@github.com:wagtail/wagtail-localize.gitcdwagtail-localizeWith your preferred virtualenv activated, install testing dependencies:Using pippipinstallpip>=21.3
pipinstall-e'.[testing]'-UUsing flitpipinstall"flit>=3.8.0"flitinstallpre-commitNote that this project usespre-commit. To set up locally:# go to the project directory$cdwagtail-localize# 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.8-django3.2-wagtail4.1or specific testtox -e python3.9-django3.2-wagtail4.1-sqlite -- wagtail_localize.tests.test_edit_translation.TestGetEditTranslationViewTo run the test app interactively, usetox -e interactive, visithttp://127.0.0.1:8020/admin/and log in withadmin/changeme.SupportFor support, please useGitHub Discussionsor ask a question on the#multi-languagechannel onWagtail's Slack instance.ThanksMany thanks to all of our supporters, contributors, and early adopters who helped with the initial release. In particular, to The Mozilla Foundation and Torchbox who sponsored the majority of the initial development and Wagtail core's internationalisation support.
Package: wagtail-localize-git
wagtail-localize-gitThis plugin enables translating Wagtail content using a PO files in a git repository.It works by committing source content into the repository then polling it for updates. When the PO files are translated, this will automatically create translated pages in Wagtail.This is useful for when you are using external translation tools for translating your Wagtail content. Currently, this plugin supports Mozilla'sPontoon, but PRs are welcome for other translation tools!InstallationThis plugin requires Wagtail >= 5.2 withinternationalisation enabledandWagtail Localize.Install bothwagtail-localizeandwagtail-localize-git, then add the following to yourINSTALLED_APPS:# settings.pyINSTALLED_APPS=[# ..."wagtail_localize","wagtail_localize.locales",# Replaces 'wagtail.locales'"wagtail_localize_git",# ...]Then set the following settings:WAGTAILLOCALIZE_GIT_URL- This is a URL to an empty git repository thatwagtail-localize-gitwill push source strings to and fetch translations from.WAGTAILLOCALIZE_GIT_CLONE_DIR- The local directory where the git repository will be checked out.By default,wagtail-localize-gitwill try to checkout and work with themainbranch. To change that, setWAGTAILLOCALIZE_GIT_DEFAULT_BRANCHto your repository's default branch (e.g.master)SynchronisationOnce this is configured, you can use thesync_gitmanagement command to push/pull changes. This management command should be set up in your server's crontab to run often (preferably, every 10 minutes).How it worksThis plugin useswagtail-localizeto convert pages into segments and build new pages from translated segments.wagtail-localizeprovides a web interface for translating these segments in Wagtail itself and this plugin plays nicely with that (translations can be made from the Wagtail side too).Pages/snippets are submitted to the git repo when they are submitted for translation from the default locale. Pages authored in other locales are not supported yet.ContributingAll contributions are welcome!InstallTo make changes to this project, first clone this repository:gitclonegit@github.com:wagtail/wagtail-localize-git.gitcdwagtail-localize-gitWith your preferred virtualenv activated, install testing dependencies:pipinstall-e.[testing]-Upre-commitNote that this project usespre-commit. To set up locally:# if you don't have it yet, globally$pipinstallpre-commit# go to the project directory$cdwagtail-localize-git# 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 py3.11-django4.2-wagtail5.2or specific testtox -e py3.11-django4.2-wagtail5.2-sqlite -- tests.test_git.TestRepositoryTo run the test app interactively, usetox -e interactive, visithttp://127.0.0.1:8020/admin/and log in withadmin/changeme.
Package: wagtail-lottie
Wagtail+Lottieis a Wagtail package
for playingAdobe After Effectsanimations
exported as json withBodymovin.UsageExport your animation from Adobe After Effect with Bodymovin.Compress the folder in zip format.Create a Lottie animation from Wagtail and add this zip file.Can be used like this at Wagtail page level :fromwagtail_lottie.modelsimportLottieAnimationfromwagtail_lottie.widgetsimportLottieAnimationChooserfromwagtail_lottie.blocksimportLottieAnimationChooserBlockclassHomePage(Page):lottie_animation_foreign_key=models.ForeignKey(LottieAnimation,on_delete=models.SET_NULL)lottie_animation_stream_field=StreamField([('lottie_animation_block',LottieAnimationChooserBlock()),('rich_text',blocks.RichTextBlock())])content_panels=[FieldPanel('lottie_animation_foreign_key',widget=LottieAnimationChooser),StreamFieldPanel('lottie_animation_stream_field')]And rendered this way at html level :<!-- For ForeignKey -->{% include 'wagtail_lottie/lottie_animation.html' with value=page.lottie_animation_foreign_key %}<!-- For StreamField -->{% for block in page.lottie_animation_stream_field %}
    {% include_block block %}
{% endfor %}<!-- These scripts are required to launch animations --><scriptsrc="{% static 'wagtail_lottie/lottie-player.js' %}"></script><scriptsrc="{% static 'wagtail_lottie/lottie-animation.js' %}"></script>SetupInstall with pip :pip install wagtail_lottieAddwagtail_lottieto Django apps installed :INSTALLED_APPS=['wagtail_lottie','wagtail.contrib.modeladmin','generic_chooser',...]Run some Django commands :python manage.py collectstatic
python manage.py migrateSet if neededWagtail Lottiedownload folder in the Django settings (default value is ‘wagtail_lottie’) :WAGTAIL_LOTTIE_UPLOAD_FOLDER='custom_location'
Package: wagtail-lxp
E-learning platform for Wagtail 4.x. LXP stands for Learning eXperience Platform.Key featuresAllows multiple courses in multiple topic groupsCourses of different visibility, from fully open (no sign-in) to hidden for non-logged in usersSupports content in multiple formats: text, images, videos, PDFs, etc.Has basic quizzes/tests built in, with multiple choice and T/F items.Quick startAdd "lxp" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
        ...
        'lxp',
    ]Include the lxp URLconf in your project urls.py like this::path('lxp/', include('lxp.urls')),Runpython manage.py migrateto create the lxp models.DocumentationSee here fordocumentationContact & supportPlease useGithub's Issue Trackerto report bugs, request features, or request support.