Saravanan666/pypi-org huggingface dataset:
Package: django-postgres-vault
django_postgres_vaultA simple Django database backend that allows rotating PostgreSQL access credentials viaHashiCorp VaultUsageIn your Django settings:DATABASES={'default':{'ENGINE':'django_postgres_vault','NAME':os.getenv('DB_NAME'),'HOST':os.getenv('DB_HOST'),'PORT':os.getenv('DB_PORT'),'VAULT_ADDR':os.getenv('VAULT_ADDR'),'VAULT_TOKEN':os.getenv('VAULT_TOKEN'),'VAULT_ROLE_NAME':os.getenv('VAULT_ROLE_NAME'),'VAULT_DB_MOUNT_POINT':os.getenv('VAULT_DB_MOUNT_POINT'),}}Explanation of settings:NAME: The name of the Postgres database to connect to, as per Django standards.HOST: The host location of the Postgres database to connect to, as per Django standards.PORT: The host location port of the Postgres database to connect to, as per Django standards.VAULT_ADDR: The URL of the Vault server that will be providing rotating access credentials for the database. This is the same value as theVAULT_ADDRenvironment variable used by the Vault CLI command. Example:https://vault-host-name:8200VAULT_DB_MOUNT_POINT: The mount point of the database secrets engine in Vault. Default:databaseVAULT_ROLE_NAME: The name of a Vault database secrets engine role configured to provide Postgres credentials.VAULT_TOKEN: A Vault authentication token with read access to the database secrets engine role.There are noUSERorPASSWORDsettings required because those will be dynamically provided by the Vault server. The settings can be provided, but will be ignored.Installationpip install django_postgres_vaultRequirementsDjango>=3.0psycopg2hvacDjangoandhvacshould be automatically installed by pip, butpsycopg2will require manual installation.psycopg2orpsycopg2-binaryare both acceptable, but explicitly requiring either one insetup.pywill make the library less usable for some users, so we defer on that front.CompatibilityWe officially support the most recent version of Django (3.0), as well as its supported Python versions (3.6, 3.7, 3.8). Other versions will most likely work, but there are no guarantees.LicenceMIT Licensed (seeLICENSE)TestingTesting is done using Tox and PyTest. A super-simple Dockerfile is provided to allow running Tox in an isolated container.Authorsdjango_postgres_vaultwas written byJoe Ciskey.
Package: django-postgun
Send email using Mailgun with Mailgun specific attributes.It also includes an API-compatible send_mail function that allows you to pass
custom Mailgun-specific attributes when sending email including:campaigndeliverytimedkimtracktracking clickstracking openstagsQuick startInstall django_postgunpipinstalldjango_postgunAdd “postgun” to INSTALLED_APPS:INSTALLED_APPS=(...'postgun')Add the following settings to your settings.py:EMAIL_BACKEND='postgun.backends.MailgunEmailBackend'MAILGUN_DOMAIN='example.com'MAILGUN_API_KEY='key-my-api-key'MAILGUN_PUBLIC_KEY='pubkey-my-public-key'#Only needed for email validationSending Emailfrompostmanimportsend_mailresponse_data={}send_mail('Test Email',#subject'This is your test message.',#text content'admin@example.com',#from address['james@example.com',],#recipientshtml_message='This is your <strong>test</strong> message.',#html (optional)campaign='test',#Mailgun campaign idtags=['testing','august','beta'],#Mailgun tags - 3 maxreply_to='jacob@example.com',#Reply to addressresponse_data=response_data,#Variable to save response data from mailgun i.e. id and message)Getting Email EventsPull in Mailgun Events for a given period of time and by filter. Accepts all of the regular Mailgun API arguments
for events and collects results spread across multiple pages into a single list for processing.begin: datetime The time to start getting events.end: datetime The time to grab events until.ascending: True/False Ascending or descending (defult True)limit: integer Limit to x number of items per page (default 300)field: string Mailgun field filters (default no filter)importdatetimefrompostman.eventsimportget_eventsbegin=datetime.datetime.now()-timedelta(days=1)items=get_events(begin=begin,limit=100)foreventinitems:#Process individual JSON events hereValidating EmailValidate email checks against the Mailgun validation API to see if an
address is valid.If an address is invalid and there are no suggestions a ValidationError is raised.
If an address is invalid and therearesuggestions a ValidationError is raised with the suggestion in the message.
Returns True on valid email or ConnectionError, AttributeErrorsfrompostman.validatorsimportvalidate_email_mailgunis_valid=validate_email_mailgun('james@hotmail.co.uk')
Package: django-postie
django-postieThis project allows you to send emails and manage them in the admin
panel.
By default package uses celery to send emails.InstallationUpdate INSTALLED_APPSINSTALLED_APPS=[...'postie','parler','codemirror2','ckeditor','des',...]Run migrations:`python manage.py migrate`Available settingsPOSTIE_TEMPLATE_CHOICES- Tuple of tuples. Where the first value is
the value to use in code and second is verbose(translated).POSTIE_TEMPLATE_CONTEXTS- dictionary with template choices as keys
and dictionaries as valuesFor example:POSTIE_TEMPLATE_CONTEXTS={'mail_event':{'context_var1':_('Context variable 1 description'),'context_vae2':_('Context variable 2 user description'),...},...}POSTIE_INSTANT_SEND- whether to send letters instantly or to use
celery task. IfFalseceleryis required.POSTIE_HTML_ADMIN_WIDGET- dictionary with default widget for HTML field
in Template model in django admin interfaceFor example:POSTIE_HTML_ADMIN_WIDGET={'widget':'TinyMCE','widget_module':'tinymce','attrs':{'attrs':{'cols':80,'rows':10}}}POSTIE_DEBUG_MODE- controls whether to raise exceptions onsend_mail. By default equalsDEBUGBasic example to use:# your_module.pyfrompostie.shortcutsimportsend_mailsend_mail(event='MAIL_EVENT',recipients=['email@email.com','email1@email1.com'],context={'var1':'variable context','var2':'another value'},from_email='noreply@email.com',attachments=[{'file_name':open('path-to-the-file')}])Full documentation check here -https://cyberbudy.gitlab.io/django-postie/IntegrationsTildaTo usehttps://tilda.cc/add integration to settingsINSTALLED_APPS=[...'postie.integrations.tilda','solo',...]Run migrations
Now you can edit Tilda preferences and add corresponding tilda id to your mail templates in the admin.SignalsThere are two signals available:tilda_webhook_received- This is send on webhook call.Argumets:request- request instance.credentials-Credentialsused to validate requesttilda_page_fetched- This is send when tilda_html is updated in the template.Argumets:project_id- Tilda project id.page_id- Tilda page id.template- MailTemplate was updated. If None - template with such page_id was not found.
Package: django-postleware
django-postlewareA simple django middleware class which injects aCache-Control: no-cacheheader onto POST responses.Installingpip install django-postlewareAdd the middleware tosettings.pyMIDDLEWARE_CLASSES=('postleware.PostResponseCachebusterMiddleware',# ...)Why?Mobile Webkit (iOS4+ and Android stock bowser) has a bug that causes it to
cache similar POST requests when it clearly shouldn’t. Rather than only caching
requests that have a specificCache-Controlheader, it does the opposite and
caches the request unless theno-cachevalue is present in the POST response.Not working for you?Let me know by opening an issue or pull request. This was enough for me, but I
have read around the webs that other devs needed to add additional headers to
the response before it would stop caching.
Package: django-postman
==============Django Postman==============This is an application for the Django web framework.It provides a messaging functionality, mainly for a User-to-User exchange,and with these convenient features:- A non-User (email is undisclosed) can write to a User and get a reply(can be disabled by configuration)- Exchanges can be moderated (with auto-accept and auto-reject plug-ins)- Optional recipient filter plug-ins- Optional exchange filtering plug-ins (blacklists)- Multi-recipient writing is possible (can be disabled by configuration)with min/max constraints- Messages are managed by conversations- Messages in folders are sortable by sender|recipient|subject|date- 'Archives' folder in addition to classic Inbox, Sent and Trash folders- A Quick-Reply form to only ask for a response text- A cleanup management command to clear the old deleted messagesIt has support for optional additional applications:- Autocomplete recipient field (default is 'django-ajax-selects'),with multiple recipient management- New message notification (default is 'django-notification')- Asynchronous mailer (default is 'django-mailer')See the docs/ directory for Sphinx documentation.For example, build the HTML version with >make htmland open docs/_build/html/index.htmlCopyright (C) 2010, Patrick SamsonThis program is licensed under the BSD License (see the file LICENSE).
Package: django-postman1
=====Postman=====Postman is a simple Django app for user to user messaging with additional fieldDetailed documentation is in the "docs" directory.Quick start-----------1. Add "postman" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'postman',]2. Include the polls URLconf in your project urls.py like this::url(r'^polls/', include('polls.urls')),3. Run `python3 manage.py migrate` to create the postman models.4. Start the development server and visit http://127.0.0.1:8000/admin/to create a poll (you'll need the Admin app enabled).5. Visit http://127.0.0.1:8000/postman/ to participate in the poll.
Package: django-postmaniac
=====Django_postmaniac=====Django-postmaniac is a simple django application.Just keep posting like a maniac.Installation and Setup-----------1. Add "django-postmaniac" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'django_postmaniac',)2. Include the polls URLconf in your project urls.py like this::url(r'^postmaniac/', include('django_postmaniac.urls')),3. Run `python manage.py migrate` to create the post model.4. Start the development server and visit http://127.0.0.1:8080/admin/to create a posts.5. Visit http://127.0.0.1:8080/postmaniac/ and you will see your posts.
Package: django-postmark
django-postmark is a reusable app that includes an EmailBackend for sending email
with Django as well as models and view that enable integration with Postmark’s
bounce hook api.InstallationYou can install django postmark with pip by typing:pip install django-postmarkOr with easy_install by typing:easy_install django-postmarkOr manually by downloading a tarball and typing:python setup.py installOnce installed addpostmarkto yourINSTALLED_APPSand run:python manage.py syncdbOr if you are using south:python manage.py migrateDjango ConfigurationIf you want to use django-postmark as your default backend, you should add:EMAIL_BACKEND = "postmark.backends.PostmarkBackend"to your settings.pySettingsdjango-postmark adds 1 required setting and 2 optional settings.Required:Specifies the api key for your postmark server.:POSTMARK_API_KEY = 'POSTMARK_API_TEST'Optional:Specifies a username and password that the view will require to be passed
in via basic auth. (http://exampleuser:examplepassword@example.com/postmark/bounce/):POSTMARK_API_USER = "exampleuser"
POSTMARK_API_PASSWORD = "examplepassword"Postmark Bounce HookPostmark has the optional ability to POST to an url anytime a message you have
sent bounces. django-postmark comes with an urlconf and view for this purpose. If
you wish to use this then add:url(r"^postmark/", include("postmark.urls")),to your root urls.py. This will cause your bounce hook location to live
at /postmark/bounce/. Then simply add in the url to your Postmark settings (with
the username and password specified by POSTMARK_API_USER/PASSWORD if set) and
django will accept POSTS from Postmark notifying it of a new bounce.
Package: django-postmark-utils
# Django Postmark UtilsDjango utilities to help track emails sent using Postmark.## Features- Store emails (including failed attempts) sent from within your project- Receive and store webhook notifications, for email bounces and deliveries- Track sent emails for errors, bounces, and deliveries- Resend emails## Prerequisites- [Django](https://www.djangoproject.com/)- [Postmark](https://postmarkapp.com/) account## Installation```$ pip install git+https://github.com/regulusweb/django-postmark-utils.git```Django Postmark Utils makes use of the Django email backend provided by [Postmarker](https://postmarker.readthedocs.io/en/latest/), so first configure it in your project's settings, as per the [documentation](https://postmarker.readthedocs.io/en/latest/django.html).```pythonEMAIL_BACKEND = 'postmarker.django.EmailBackend'POSTMARK = {'TOKEN': '<YOUR POSTMARK SERVER TOKEN>','TEST_MODE': False,'VERBOSITY': 0,}```Add the app to your project's `INSTALLED_APPS` setting:```pythonINSTALLED_APPS = ('django_postmark_utils',)```Create the required database tables:```$ python manage.py migrate django_postmark_utils```To receive [bounce](https://postmarkapp.com/developer/webhooks/bounce-webhook) and [delivery](https://postmarkapp.com/developer/webhooks/delivery-webhook) [webhook notifications](https://postmarkapp.com/developer/webhooks/webhooks-overview) from Postmark, configure the webhook URLs in your project's URL configuration:```pythonurlpatterns = [url(r'^postmark/', include('django_postmark_utils.urls')),]```In your project's settings, configure a secret to be added to the webhook URLs:```pythonPOSTMARK_UTILS_SECRET = '<YOUR WEBHOOK URLS SECRET>'```Add the webhook URLs to your Postmark account:`https://example.com/postmark/<YOUR WEBHOOK URLS SECRET>/bounce-receiver/``https://example.com/postmark/<YOUR WEBHOOK URLS SECRET>/delivery-receiver/`Optionally change the default email header field name (`X-DjangoPostmarkUtils-Resend-For`) used to match resent emails to the messages they are for, in your project's settings:```pythonMESSAGE_ID_HEADER_FIELD_NAME = '<YOUR CUSTOM EMAIL HEADER FIELD NAME>'```## UsageEmails (including failed attempts) sent via the Postmarker email backend will be stored in the database, and can be viewed in the admin.In the email change page, clicking on the `Go to resend list` link next to the `Resend` field will send you to a list from where you can use the `Resend emails` admin action to resend the email.
Package: django-post-request-task
A celery task class whose execution is delayed until after the request
finishes, usingrequest_startedandrequest_finishedsignals from django
and thread locals.This is useful if your views are wrapped in transactions (as they should if
you’re making database modifications in them), as you can end up triggering a
celery task too soon before the transaction has been committed (or even trigger
a task when the corresponding transaction has been rolled back).By listening to therequest_startedandrequest_finisheddjango signals, we
can safely trigger a task after all transactions created from@atomicorATOMIC_REQUESTShave been committed.UsagefromceleryimportCeleryfrompost_request_task.taskimportPostRequestTaskapp=Celery('myapp',task_cls=PostRequestTask)@app.taskdefmy_task():# If .delay() is called on this task inside a django request-response# cycle it will be called once the request is finished, and not before.passOr, if you are using the decorator directly:frompost_request_task.taskimportshared_task@shared_taskdefmy_task():passThat’s it. If the task is called from outside the django request-response
cycle, then it will be triggered normally.As a bonus feature, if the same task is called with the same argument several
times during a request-response cycle, it will only be queued up once.Running tests$maketestenv$maketestBy default, tests are run with whatever django version is installed. If you want to run tests for other versions
use tox:$maketestenv$tox-e3.7-2.0.x# or any other environment defined in our tox.ini
Package: django-posts
django-posts============A generic django application to kick start nearly any kind of post handling.## Key features* very generic implementation and modular structure* easy to customize and extend## InstallationIf you want to install the latest stable release from PyPi:$ pip install django-postsIf you want to install the latest development version from GitHub:$ pip install -e git://github.com/byteweaver/django-posts#egg=django-postsAdd `posts` to your `INSTALLED_APPS`:INSTALLED_APPS = (...'posts',...)Hook this app into your ``urls.py``:urlpatterns = patterns('',...url(r'^posts/', include('posts.urls', namespace='posts')),...)## VersionsThe last upgrade, as starting with version 0.2.x, is incompatible with all versions below and does no longer feature south support!- version 0.2.x requires Django 1.5- all versions below run with Django1.4 (and maybe below, not tested)
Package: django-potato-test
Potato is a Django app for blogging.Detailed documentation is in the “docs” directory.Quick startAdd “potato” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'potato',
]Include the potato URLconf in your project urls.py like this:path('potato/', include('potato.urls')),Runpython manage.py migrateto create the potato models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/potato/to participate in the poll.
Package: django-po-translate
Add “po_translate” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...,
    "po_translate",
]If you already have a makemessges command defined somewhere in your application, remove your command or specify the po_translate application on top of it like this:INSTALLED_APPS = [
    ...,
    "po_translate",
    "app"
]Run the command as usual:python manage.py makemessages -l en -d djangoIf your .po file contains lines without translation, then the translation of the specified locale will be added to them4.If you do not want translation to be added, run the command with the -no–translate switch:python manage.py makemessages -l en -d django --no-translate
Package: django-po-translation-message
Python PO translationDescription:A package that will read key values and get the translated value from django.po fileIssue & Why the package is created:I need to send English value and Arabic value to use it in a single page application. I searched for a package or tool to get the translated text from django.py file to use it in my SPA without duplicate the request and specify the language in the header in each request.This package is useful for developers who need migrate from purly backend to have separated backend and front end and they want to send translated values from their backend to frontend without duplicate the request OR translate the same value in the front end and backend.Steps:python manage.py makemessages -l [your-language]Write the translation value in django.po file. Thenpython manage.py compilemessages -l [your-language]LicenseMIT
Package: django-po-translator
django-po-translatorDjango package allows you to translate PO files automatically and fix all the fuzziness in your files ... with only one command
The package will detect all your PO files and translate or fix them based on the file language ... without any interaction by you.You can checkpypifor more information.InstallationInstall the packagepip install django-po-translatorAdd the package to your installed appsINSTALLED_APPS = [
    ..., 
    'django_po_translator',
    ...
]Important stepsMake sure your app is ready to support localization ... you should havelocalefolder in the root of your project andall related settingsare added.How to use the package?After installing the package and making sure that all is looking fineRunpython manage.py translateExtra arguments will be mentioned downYou will need to compile messages to reflect the new translationsEnjoy :)po-translator command arguments--translate-existed: This argument will allow the command to translate the already existed translation .. use it carefully .. as it will override all your existing translations--resolve-fuzzy: This argument will resolve all fuzzy translations in your po fileEx:python manage.py translate --translate-existed --resolve-fuzzyTestsTo run testspython manage.py test django_po_translatorNoteIf you have any issue while using the package ... don't hesitate to report it and it will be fixed ASAP. Thank you.
Package: django-powcaptcha
Django PowCaptchaDjango PowCaptcha form field/widget integration app.InstallationInstall withpip install django-powcaptcha.Add'django_powcaptcha'to yourINSTALLED_APPSsetting.INSTALLED_APPS=[...,'django_powcaptcha',...]Add settings.For example:POWCAPTCHA_API_URL='https://captcha.yourdomain.com'POWCAPTCHA_API_TOKEN='MyPOWCAPTCHAPrivateKey456'UsageFormThe quickest way to add PowCaptcha to a form is to use the includedPowCaptchaFormclass. For example:fromdjango_powcaptcha.formsimportPowCaptchaFormclassFormWithCaptcha(PowCaptchaForm):...
Package: django-powerbank
Extra power for included batteriesFree software: MIT licenseDocumentation:https://django-powerbank.readthedocs.io.Work in progressThis package was created withwooyek/cookiecutter-django-appproject template.
It may fool you by having a lot of cookie filling just ready from the start.
Be warned! It may not be ready for eating!FeaturesPending :DDemoTo run an example project for this django reusable app, click the button below and start a demo serwer on HerokuQuickstartInstall Django Powerbank:pip install django-powerbankAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_powerbank.apps.DjangoPowerbankConfig',...)Add Django Powerbank’s URL patterns:fromdjango_powerbankimporturlsasdjango_powerbank_urlsurlpatterns=[...url(r'^',include(django_powerbank_urls)),...]Running TestsDoes the code actually work?$ pipenv install --dev
$ pipenv shell
$ toxWe recommend usingpipenvbut a legacy approach to creating virtualenv and installing requirements should also work.
Please installrequirements/development.txtto setup virtual env for testing and development.CreditsThis package was created withCookiecutterand thewooyek/cookiecutter-django-appproject template.History0.2.1 (2017-07-14)First release on PyPI.
Package: django-power-cms
django-power-cmsA power content management system based on django admin framework.Installpipinstalldjango-power-cmsReleasev0.3.3 2020/04/03Fix django-changelist-toolbar-admin upgraded problem.Fix fontawesome css missing problem in portlet registering.v0.3.2 2020/03/31Add Widget type categorizing and sorting support.Add site limit to page widget in page changeform.Add CardsWidth support.PageWidget's slot options dynamically changes with page's template value.Change topbar brand style.v0.3.1 2020/03/22Site use a tabbed changeform.Widget use a tabbed changeform.Article use a tabbed changeform.Set Page's site field to current selected site.Set Widget's site field to current selected site.Set Article's site field to current selected site.Limit Page queryset to current selected site.Limit Widget queryset to current selected site.Limit Article queryset to current selected site.Add template preview images.Command django-power-cms-template add register-all sub-command.Command django-power-cms-theme add register-all sub-command.Add page's parent filed limit choice to current selected site.Add article's parent field limit choice to current selected site.Add preview link in site changelist card.Fix requirements.txt missing libraries problem.v0.3.0 2020/03/21Add no-portlet template.Add site's facicon.Add page title.Add article detail widget.Article model add site field.Save current site id in session, and pages/wigets/articles are filtered with the site id.Fix topbar's brand-image and brand-title display position problem.Default template use full screen size instead of 1170px width.Topbar brand link supports site-code-url and page-code-url.v0.2.0 2020/03/08Add left-portlet, both-portlet template support.Add template and theme register commands.Add page preview button.Allow same page code in different site.Turn site admin style to django-cards-admin.v0.1.0 2020/03/05First release.