Saravanan666/pypi-org huggingface dataset:
Package: django-mailrobot
Stores and sends canned email responses.Ever had to change the signature or add a recipient to N hardcoded emails
spread all throughout your code? Hardcode no more! Use mailrobot instead.Depends on Django, with a version between 1.11 and 2.2, inclusive.InstallationInstall the library, for instance with pip:pip install django-mailrobotAdd the library to your INSTALLED_APPS of an exiting project:INSTALLED_APPS += ['mailrobot']Add the tables to the existing project.$ ./manage.py migrateDemoCopy the entire django-mailrobot directory somewhere, set up and enter a
virtualenv, then provided you are on some Un*x:make demoThis’ll create a demo-user “demo” with the password “demo”.The demo should now be running onhttp://127.0.0.1/TestsTo run the tests, first install the testing-requirements:pip install -r requirements/test.txtthen run the tests with:make test APP=mailrobotDevelopmentInstall the dev-requirements with:pip install -r requirements/test.txtThis’ll give you ipython for a prettier shell-experience, but more importantly
it’ll install pre-commit. Pre-commit will check for syntax errors and merge
conflicts, and fix trailing whitespaces and mixed line-endings for you.UsageAdd mails and addresses through the django admin.In codeFetch a mail-template:template = Mail.objects.get(name='hello-world').Fill it:mail = template.make_message(
    sender='Yep <overridden-from@example.com'>,
    recipients=('extra1@example.com', u'Blåbærsyltetøy <extra2@example.com>'),
    context={'world': 'Mailrobot'}
)Have a look:print mail.messageSend it:mail.send()NicetiesIn case you need to send an email somewhere else for
testing/debugging, clone an existing email in the admin:Select itChoose “Clone selected mails” in the action listHit “Go”The clone will share everything with its original except the name,
which will be suffixed with a timestamp.Edit the name of the clone to what you need, change recipients,
CCs, BCCs. Then, where you send the mail from, choose the clone if
settings.DEBUG is True.Version:0.8.0
Package: django-mailru-money
django-mailru-money - это приложение для подключения django-сайта
к платежной системеденьги@mail.ru.Лицензия - MIT.
Поддерживается python 2.6, 2.7 и 3.2; django 1.3 и 1.4.Установка$ pip install django-mailru-moneyВ settings.py пропишите данные своего магазина:MAILRU_MONEY_SHOP_ID = 'my_shop_id'
MAILRU_MONEY_SECRET_KEY = 'my_secret_key'Подключите обработчик приема платежей в urls.py:urlpatterns = patterns('',
    # ...
    url(r'^mailru-money/', include('mailru_money.urls')),
    # ...
)ResultURL (который нужно сообщить в money.mail.ru) в этом случае
будетhttp://your-site.com/mailru-money/result/.Затем добавьте'mailru_money'в INSTALLED_APPS и выполните syncdb
(migrate, если используется South).В INSTALLED_APPS также должны быть'django.contrib.auth'и'django.contrib.contenttypes'.ИспользованиеНа странице оплаты используйтеmailru_money.forms.MailruOrderFormдля вывода формы оплаты и формирования заказа:# views.py
from django.shortcuts import get_object_or_404, render
from mailru_money.forms import MailruOrderForm
from myapp.models import Item

@login_required
def pay(request, item_id)

    # товар, который будем оплачивать
    item = get_object_or_404(Item, id=item_id)

    # создаем заказ
    form = MailruOrderForm(
        amount = item.price,
        description = item.description,
        user = request.user
        pay_for = item,
    )

    return render(request, 'myapp/pay.html', {'form': form})В шаблоне требуется сформировать форму оплаты:{# myapp/pay.html #}
{# ... #}

<form method='post' action='{{ form.ACTION }}'>
    {{ form }}
    <input type='submit' value='Оплатить через Деньги@mail.ru'>
</form>

{# ... #}Обратите внимание, что {% csrf_token %} использовать не нужно.
Форма будет выведена как набор скрытых полей.Обработку платежей можно осуществлять в сигналеmailru_money.signals.order_status_changed:from mailru_money.models import MailruOrder
from mailru_money.signals import order_status_changed

from myapp.models import Item

def mailru_payment_received(sender, order, old_status, **kwargs):
    item = order.pay_for
    if order.state == MailruOrder.PAID:
        item.deliver_to(order.user)
    elif order.state == MailruOrder.REJECTED:
        item.unblock()

order_status_changed.connect(mailru_payment_received)Сигнал шлется только когда у заказа изменился статус. Оплаченный заказ при
этом стать неоплаченным не может.django-mailru-money поддерживает и другую схему работы
(можно не использовать встроенные средства для контроля заказов).
См. исходный код, если описанная выше схема не устраивает.РазработкаРазработка идет на bitbucket.org и github.com:https://bitbucket.org/kmike/django-mailru-money/https://github.com/kmike/django-mailru-money/Баг-трекер - на битбакете:https://bitbucket.org/kmike/django-mailru-money/issues/newДля запуска тестов склонируйте репозиторий, установитеtoxи запустите$ toxиз корня репозитория.
Package: django-mails
django-mailsdjango-mails is Django App to send simple or HTML template Emails by calling just hit of single function.Quick StartAdd 'email_service' to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
    ...
    'email_service',
    'ckeditor',
]Runpython manage.py migrateto create the django-mails models.Set Email Settings in setting.py fileEMAIL_FROM = ""
EMAIL_BCC = ""
EMAIL_HOST = ""
EMAIL_PORT = ""
EMAIL_HOST_USER = ""
EMAIL_HOST_PASSWORD = ""
EMAIL_USE_TLS = True
EMAIL_USE_SSL = FalseAdd Templates path to your TEMPLATES in setting.pyimport method to send emailfrom email_service.utils import send_custom_emailsetLOGO_IMAGE_NAMEvariable in setting.py file to add logo in email (Name should include subfolder inside static folder)To send html email : Create html and txt files for email content and subject respectively. Name of both file should be same and txt file name should contain "_subject" as suffix.for example :welcome_email.htmlandwelcome_email_subject.txtDescriptionsend_custom_email(
    recipient: List[str] | str,
    path: str | None = None,
    template: any = None,
    template_prefix: str | None = None,
    context: Dict = {},
    subject: str | None = None,
    body: str | None = None,
    attachment: any = None,
    parts:list[dict] = None,
    enable_logo : bool = False
)recipient : List of Receivers emailspath : path to html file for email content and subject (path should be upto parent folder of html file inside template folder)template : Object of Template Model if exists (Optional)template_prefix : html file namecontext : context to replace variable name in templatesubject : subject of email as stringbody : content of email as stringattachment: attach file to send email as attachementparts (list[dict]): list of dictionaries with part name and dataenable_logo : set true to enable logo in emailSetup guidelinebuild: Create the build and runtime imagesdocker-compose buildup: Start up the projectdocker-compose upTo see services and their portsdocker psshell: Shell into the running Django containerdocker exec -it CONTAINER ID /bin/bashmigrate: Changes you have made to your modelspython manage.py makemigrations
   python manage.py migrate
   python manage.py createsuperuser
Package: django_mail_save
Saves all emails sent to the database and can be viewed in django’s admin interface.
Includes attachments and alternative email formats such as text/html.Tests and more backends to follow. Also to follow is the abilit to resend emails, create new etc.InstallationInstallation withpip:$ pip install django_mail_saveSetupAdd the following apps to theINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'mail_save',
    ...
)Override the EMAIL_BACKEND in settings.py:EMAIL_BACKEND = 'mail_save.backends.smtp.EmailBackend'Add mail_save urls in urls.py:url(r'^mail_save/', include('mail_save.urls', namespace='mail_save')),Attachments are saved using django’s FileField so be sure to setup your MEDIA_ROOT AND URLS
Package: django-mail-templated
Send emails using Django template systemThis is a tiny wrapper around the standardEmailMessageclass andsend_mail()function that provides an easy way to create email messages
using theDjango template system.
Just passtemplate_nameandcontextas the first parameters then use as
normal.FeaturesBuilt with OOP, KISS and flexibility in mind. Really small and simple, but
yet full-featured (I hope).Extends and mimics the built-in Django’sEmailMessageandsend_mail(). Compatible as much as possible.Fully supports Django template system including template inheritance
(thanks toBradWhittingtonfor the note about the problem).Supports any possible template engines and loaders.Supports serialisation (thanks toarjandepooter).Fully covered with tests.Tested with Django 1.4-1.9.Compatible with Python 3.Documentationhttp://django-mail-templated.readthedocs.orgQuick startRun:pip install django-mail-templatedAnd register the app in your settings file:INSTALLED_APPS=(...'mail_templated')Create template:{%extends"mail_templated/base.tpl"%}{%blocksubject%}Hello{{user.name}}{%endblock%}{%blockbody%}{{user.name}}, this is a plain text message.{%endblock%}{%blockhtml%}{{user.name}}, this is an<strong>html</strong>message.{%endblock%}Send message:frommail_templatedimportsend_mailsend_mail('email/hello.tpl',{'user':user},from_email,[user.email])Advanced usage:frommail_templatedimportEmailMessagemessage=EmailMessage('email/hello.tpl',{'user':user},from_email,to=[user.email])# TODO: Add more useful commands here.message.send()More useful info and examples athttp://django-mail-templated.readthedocs.org
Package: django-mail-tester
A simple sendmail management command to send email using your django project.NOTE This tool was created for mail testing purpose, not for any kind of production mailing tasks.
But if you find it useful for any other tasks, gratz! Tell us about your experience.Installation$ pip install django-mail-testerConfigure installed apps in yoursettings.pyINSTALLED_APPS = [
    # ... your app list
    'django_mail_tester',
]UsageSend email to your address$ ./manage.py sendmail -e test@example.com This is a test messageIf you need a cheap, simple and efficient way to quickly test the quality of your own newsletters, tryMail Tester.ChangelogThe changelog can be found atrepo’s release notesContributingFork the repo, create a feature branch then send me pull request. Feel free to create new issues or contact me via email.
Package: djangomailup
Django app to integrate with MailUpDocumentationThe full documentation is athttps://djangomailup.readthedocs.org.RequirementsOAuth2tokens for the MailUp REST APIMailUp accountDjango >= 1.8python 2.7+, 3.4+QuickstartInstall djangomailup:pip install djangomailupAdd configuration in settings.py:INSTALLED_APPS=['djangomailup',]MAILUP={"default":{"client_id":"client_id","client_secret":"client_secret","username":"m1234","password":"password",},}Then use it in a project:fromdjangomailupimportMailUpClientclient=MailUpClient()FeaturesTODORunning TestsDoes the code actually work?$pipinstall-rrequirements_test.txt$pythonruntests.pyCreditsTools used this package:Cookiecuttercookiecutter-djangopackagerequestsHistory0.2.0 (2016-07-15)Behavioural Changesremove rauth from dependenciesImprovementsadd codacy badge and coverageDocumentationadd documentation for MailUpClientadd documentation for AuthenticateSessionUpdateupdate sphinx from 1.4.4 to 1.4.50.1.1 (2016-07-11)Documentationadd readme in index.rstfix python works versionsadd Usage pageadd installation pageadd rtd_themeadd requirements sectionadd sphinx for building documentationFixremove setup.py file from bumpersion config0.1.0 (2016-07-04)First release on PyPI.
Package: django-mailup
InstallationAdd ‘mailup’ in your INSTALLED_APPS.SettingsAdd in you settings the followings parameters:MAILUP_CONSOLE_URL = 'http://mailup.dominio.it' # Mailup base console url : eg: http://mailup.dominio.it
MAILUP_USER = 'mailup_user'
MAILUP_PASSWORD = 'mailup_password'TestingTo test the application set the following parameters in your settings:MAILUP_TEST_GUID = 'GUID'
MAILUP_TEST_ID_LIST = 'XX'
MAILUP_TEST_ID_GROUP = 'XXX'
MAILUP_TEST_EMAIL = 'mail@example.com'Then run:python manage.py test mailup.MailupTest
Package: django-mail-viewer
View emails in development without actually sending them.DocumentationThe full documentation is athttps://django-mail-viewer.readthedocs.io.QuickstartInstall Django Mail Viewer:pip install django-mail-viewerAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_mail_viewer',...)Add Django Mail Viewer’s URL patterns:# You may want to only include this in development environmentsurlpatterns=[...path('',include('django_mail_viewer.urls')),...]Set yourEMAIL_BACKENDin settings.py:EMAIL_BACKEND='django_mail_viewer.backends.locmem.EmailBackend'FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxTODOPassthrough backend - store the email for display in the views but also pass to another backend which may actually sendRedis backend using Redis specific functionality for cleaner code and less risk of bugs vs the django cache backendMemcached backendFile based backend - store each email as its own fileOther backends?  ElasticSearch?  MongoDB?Separate views for each of html, plaintext, attachements, etc. to allow for more customization of display?CreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackage
Package: django-maintain
Installationpip install django-maintainUsage# Django-Maintain Settings
DJANGO_SITE_MAINTAIN = False  # Default ``False``, Modify ``True`` when maintain
DJANGO_SITE_MAINTAIN_NOTICE_URL = ''Settings.py# Use `MIDDLEWARE_CLASSES` prior to Django 1.10
MIDDLEWARE = [
    ...
    # 'competion.middleware.SiteMaintainMiddleware',  # hasattr(request, 'user') == False
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'competion.middleware.SiteMaintainMiddleware',  # hasattr(request, 'user') == True
    ...
]
Package: django-maintenance
django-maintenance lets you define maintenance windows as objects. These
maintenance windows are time slots where your website or parts of it is
non-operational. django-maintenance ships with a middleware that lets you
display a friendly message to your users during the downtime.InstallingPlease refer toINSTALL.markdownfor installation instructions.UsingUsage instructions can be found indocs/overview.markdownwhich is also
available online.Changelog0.1 - 2009-10-30Initial release.
Package: django-maintenance-in-progress
Django Maintenance in ProgressIntercept possible 500 errors when site maintenance is in progress and display a friendly page.OverviewDuring system maintenance some pages may produce errors due to eg. database upgrades. A blanket rule
would take down the entire site, which is naturally undesirable.maintenance_in_progressonly displays
a maintenance message when a 500 error is encountered during the maintenance window.InstallationInstall or adddjango-maintenance-in-progressto your Python path.Addmaintenance_in_progressto yourINSTALLED_APPSsetting.Sethandler500 = 'maintenance_in_progress.views.server_error'inurls.py.UsageAdmin has aMaintenance In Progress Preferenceslink where you can choose to indicate
maintenance is in progress either by a flag in the database or by creating a file on the
filesystem.AuthorsPraekelt FoundationHedley RoosChangelog0.1Initial release.
Package: django-maintenancemode
django-maintenancemode is a middleware that allows you to temporary shutdown
your site for maintenance work.Logged in users having staff credentials can still fully use
the site as can users visiting the site from an IP address defined in
Django’sINTERNAL_IPS.Authored byRemco Wendt, and some greatcontributors.How it worksmaintenancemodeworks the same way as handling 404 or 500 error in
Django work. It adds ahandler503which you can override in your
mainurls.pyor you can add a503.htmlto your templates
directory.If user is logged in and staff member, the maintenance page is
not displayed.If user’s IP is inINTERNAL_IPS, the maintenance page is
not displayed.To override the default view which is used if the maintenance mode
is enabled you can simply define ahandler503variable in yourROOT_URLCONF, similar to how you would customize othererror handlers,
e.g. :handler503='example.views.maintenance_mode'InstallationEither checkoutmaintenancemodefrom GitHub, or install using pip :pipinstalldjango-maintenancemodeAddmaintenancemodeto yourINSTALLED_APPS:INSTALLED_APPS=(...'maintenancemode',)AddMaintenanceModeMiddlewaretoMIDDLEWARE_CLASSES, make sure it comes afterAuthenticationMiddleware:MIDDLEWARE_CLASSES=(...'django.contrib.auth.middleware.AuthenticationMiddleware','maintenancemode.middleware.MaintenanceModeMiddleware',)Add variable calledMAINTENANCE_MODEin your project’ssettings.pyfile :MAINTENANCE_MODE=True# Setting this variable to ``True`` activates the middleware.or setMAINTENANCE_MODEtoFalseand usemaintenancecommand :python./manage.pymaintenance<on|off>Please seeexampleapplication. This application is used to
manually test the functionalities of this package. This also serves as
a good example…You need only Django 1.4 or above to run that. It might run on older
versions but that is not tested.ConfigurationThere are various optional configuration options you can set in yoursettings.py# Enable / disable maintenance mode.# Default: FalseMAINTENANCE_MODE=True# or ``False`` and use ``maintenance`` command# Sequence of URL path regexes to exclude from the maintenance mode.# Default: ()MAINTENANCE_IGNORE_URLS=(r'^/docs/.*',r'^/contact')Licensedjango-maintenancemodeis released under the BSD license.
Package: django-maintenance-window
Your project description goes hereDocumentationThe full documentation is athttps://django-maintenance-window.readthedocs.io.QuickstartInstall django-maintenance-window:pip install django-maintenance-windowAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django-solo','django_maintenance_window',...)Add django-maintenance-window’s middleware to the middleware:MIDDLEWARE_CLASSES=[...'django_maintenance_window.middleware.MaintenanceModeMiddleware',...]orMIDDLEWARE=[...'django_maintenance_window.middleware.MaintenanceModeMiddleware',...]SettingsMAINTENANCE_TEMPLATE = ‘django_maintenance_window/maintenance.html’Overwrite the template that is used for the maintenance templateMAINTENANCE_DISPLAY_END_DATE = FalseIf the end date should be displayed at the bottom of the page.MAINTENANCE_EXCLUDE_ADMIN_URLS = TrueThis will allow accessing the admin even if maintenance mode is active.MAINTENANCE_EXCLUDE_SUPER_USER = FalseThis will allow super users to see the site even if maintenance mode is active.MAINTENANCE_EXCLUDE_STAFF_USER = FalseThis will allow staff users to see the site even if maintenance mode is active.Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.2.1 (2017-10-30)Fixed that the admin would give a 500 when you only set the maintenance_from.0.2.0 (2017-10-26)Now the admin exclude will work with i18n urls.MAINTENANCE_EXCLUDE_ADMIN_URLS is now a setting (default=True)MAINTENANCE_EXCLUDE_SUPER_USER is now a setting (default=False)MAINTENANCE_EXCLUDE_STAFF_USER is now a setting (default=False)0.1.0 (2017-10-26)First release on PyPI.
Package: django-makeallmessages
Django MakeallmessagesDjango Makeallmessages allows you to set default arguments to yourmakemessagecommands and covers all
the regular file extensions, including your JavaScript files, with one command!:x: Don't do this$pythonmanage.pymakemessages--locale=en--locale=fr--ignore=tests/*
$pythonmanage.pymakemessages--locale=en--locale=fr--ignore=node_modules/*--ignore=tests/*--domain=djangojs:white_check_mark: Do this!$pythonmanage.pymakeallmessagesOverviewRequirementsFetching itInstallationAvailable parametersCommand line argumentsRequirementsDjango Makeallmessages requiresDjango 2.2or later.Fetching ItYou can get Django Makeallmessages by using pip$pipinstalldjango-makeallmessagesTo install it from source, clone the repository and runsetup.py$gitclonegit://github.com/vonNiklasson/django-makeallmessages.git
$cddjango-makeallmessages
$pythonsetup.pyinstallInstallationTo adddjango_makeallmessagesto your project you must first add it toINSTALLED_APPSin the projectssettings.pyfileINSTALLED_APPS=(...'django_makeallmessages',...)ConfigurationYou can configure default values to be used when runningmakeallmessages. This is done by setting
theMAM_DEFAULTin your projectssettings.pyfile.Example:MAM_DEFAULT={"locale":["en","fr"],"extension":["php","twig"],"ignore":["node_modules/*","tests/*"],"no_wrap":True}The default settings are all derived from the arguments used in the standardmakemessagescommand.Available parameters:locale(list): A list locales you want to make messages from.extension(list): A list of extensions you want to include, beyond the standard extensions (html,txt,py,js)ignore(list): A list of files or directories to ignore matching a glob-style pattern.no_wrap(bool): A boolean that decides whether to not break long message lines into several lines.Command line argumentsTwo additional CLI arguments has been added to themakeallmessagesapart from the default ones
derived frommakemessages.Themakeallmessagescommand is derived from the defaultmakemessages, which means that you can still use any arguments
that are valid formakemessagesas well.--no-mam-default: Will ignore any default values set in theMAM_DEFAULTsetting.--quiet, -q: Suppresses any output when running the command. Fatal errors will still be printed.