Saravanan666/pypi-org huggingface dataset:
Package: django-email-service
Django Email Service is a Django app that allows you to send emails using mailjet (for now) in a convenient way.Quick startAdd “django_email” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'django_email',
]Set the following variables in your settings file:MAILJET_API_KEY = 'mailjet-api-key'
MAILJET_SECRET_KEY = 'mailjet-secret-key'
DEFAULT_FROM_EMAIL = 'default-from-email'
DEFAULT_FROM_NAME = 'default-from-name'Include the django_email URLconf in your project urls.py like this:path('email/', include('django_email.urls')),Runpython manage.py migrateto create the django_email models.Start the development server and visithttp://127.0.0.1:8000/admin/to view email log (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/django_email/to see the email logs along with its events.Usagefromdjango_email.servicesimportEmailServicefromdjango_email.constantsimportEMAIL_PROVIDER_MAILJETEmailService.send_email(to_emails=['foo@example.com','bar@example.com'],subject='A test Email',cc_emails=['baz@example.com'],bcc_emails=['tom@example.com'],body="<html><h1>This is a test email</h1></html>",template_id=None,template_dynamic_data=None,from_email=settings.DEFAULT_FROM_EMAIL,from_name=settings.DEFAULT_FROM_NAME,email_provider=EMAIL_PROVIDER_MAILJET,reply_to='admin@example.com')NotesBy default the celery messages go into the default celery queue which is named ascelery. You can change this
be routing messages from default queue to some other queue.https://stackoverflow.com/questions/10707287/django-celery-routing-problemsYou need to configure a message broker in your application like RabbitMQ or Redis where messages are stored and
consumed by celery workers.
Package: django-emailsys
django-emailsys is a Django reusable app providing the ability to send emails using webservicesInstallationpip install django-emailsysUsageAdd'emailsys'to yourINSTALLED_APPSin your settings.pyImport default sender and Message modelfrom emailsys import defaultfrom emailsys.models import MessageNoteTo create your own webservice, make sure to implement SendMessageToEmails
Package: django-emailtemplates
django-emailtemplates*********************About=====Django app that enables developers to create default templates for emailsand Site Admins to easily override the templates via Admin Panel.Assumptions===========* Site Admins should know context for each template.* Site Admins should be familiar with Django Template System.Changelog=========1.1.2-----* EmailFromTemplate.send_email - added new param: fail_silently- When it’s False, msg.send() will raise an smtplib.SMTPException if an error occurs.1.1.1-----* Fix confusing logger stating that email was sent even though an error had occured* cosmetic changes - logging messages possible to be aggregated by tools like sentry1.1.0-----* Basic mass mailing feature. Just go to admin, create new MassEmailMessage object and fill its subject, HTML content and attachments.Click admin button to send it or use Django shell. Emails are be default sent to all active users of user model (it must have is_active and email fields).In case of many application users sending emails using admin button may require to implement sending from queue rather than synchronously.You can create custom recipients function returning list and specify reference to it in MASS_EMAIL_RECIPIENTS setting.* `EmailFromTemplate.send()` now receives `attachments_paths` parameter of paths that can be used by `EmailMessage.attach_file()` django core method.1.0.4-----* Django 1.11 compatibility fix1.0.3-----* Django 1.11 compatibility1.0.2-----* `help_context` parameter of `EmailRegistry.register()` may now contain tuple of description and example value shown in preview* Changed EmailTemplateAdminForm title to use ChoiceField choices as lazy function. This way all registered templates are printed in admin form, independent of order Python loads application modules.1.0.1-----* better admin panel* show email preview action* set default email content from related template1.0.0-----* This version introduced **backward incompatible** EmailTemplateRegistry.* All EmailTemplates must be registered using email_templates.register(path). Not registered email templates will raise NotRegistered exception. Registry validation can be avoid by creating email template with flag registry_validation set to False.* Removed prefix from EmailFromTemplate. All templates must be located in {{templates}}/emailtemplates.0.8.7.3-------* Set default email title if is not defined in the database.0.8.7.1-------* Added missing migration0.8.7-----* Check syntax errors in EmailTemplate's content (admin form)0.8.6.2-------* Added missing migrations0.8.6.1-------* Migrations dir fix0.8.6-----* Compatibility with Django 1.100.8.5-----* Fixed template loader error - added default Engine0.8.4-----* Django 1.8.8 required
Package: django-email-templates
This small module is inspired by my need for sending templated emails, with theoption of attaching an HTML formatted alternative.Installation=============Installing::pip install django-email-templatesExample usage==============The following example demonstrates how to send a templated email, in this casethe user has submitted a contact form. The module will look for the templatescontact.txt and contact.html which will serve as the plaintext and html alternativeof the email. The default location of the templates is a directory named *email_templates*.::from email_templates import send_templated_mailcontext = {'name': request.POST['name'],'email': request.POST['email'],'telephone': request.POST['phone'],'message': request.POST['message'],}success = send_templated_mail('Contact form submission',None,[a[1] for a in settings.ADMINS],'contact',context)
Package: django-emailthis
a simple email-to-a-friend application that generates an email
form, handles its submission, persists the submission data to a
database, and sends a templated email.  Both anonymous and registered
users can send email.This app started out as a quasi-fork of Jeff Croft’s “mailfriend” app
(http://code.google.com/p/django-mailfriend/), but the latter only
supported registered users; this supports users of both
the registered and unregistered varieties.Form submission is here done solely via ajax; form loading is intended
to be handled similarly.
Package: django-email-tools
Django Email ToolsRequirementsPython 3.6+Django 2.2+InstallationInstall with pippip install django-email-toolsAddemail_toolstoINSTALLED_APPSINSTALLED_APPS=(...'email_tools.apps.EmailToolsConfig',...)Add something like the following tourls.pyifsettings.DEBUG:urlpatterns=[path("emailpreview/",include("email_tools.urls",namespace="email_tools")),]+urlpatternsDocumentationAll settings are handled within aEMAIL_TOOLSdictionary.Example:PLATFORM_ACCOUNTS={'FROM_EMAIL':'example@example.com','TEMPLATE_DIRECTORY':os.path.join(settings.BASE_DIR,"templates","emails"),}The available settings are:FROM_EMAILthe email to send from.TEMPLATE_DIRECTORYthe path to a directory containing.htmlfiles used in emails.UsageDjango Email Tools contains two main parts.First, isemail_tools.emails.send_emaila utility to send html emails given a django template and context.The second is a debugging page that allows you to see what the rendered result of an email template would look like. This page also allows you to get a list of variables used by the template and modify those variables and see results in real-time.ChangelogSeeCHANGELOG.mdLicenseSeeLICENSE
Package: django-emailtools-reloaded
django-email-toolsis a suite of tools meant to assist in sending emails
from yourDjangoapp.PrerequisitesPython: 2.7, 3.5 and 3.6
Django: 1.8, 1.9, 1.10, 1.11, 2.0, 2.1 and 2.2InstallationInstall the package:pipinstalldjango-emailtools-reloadedAddemailtoolsto yourINSTALLED_APPS:INSTALLED_APPS=(# ...'emailtools',# ...)TestingTest current environment./runtests.pyTest all environmentstoxAuthors and maintainersOriginally created and maintained at Fusionbox asdjango-emailtools.Re-branded asdjango-emailtools-reloadedfor better maintainability
starting from May 2017.DocumentationSee documentationhere.
Package: django-email-username
django-email-username allows the users of your Django-powered website to use their
email address to login, rather than using a separate username field.Using django-email-usernameTo enabledjango-email-usernamefor your project you need to addemailusernametoINSTALLED_APPS:INSTALLED_APPS += ("emailusername", )then add the following line to yoursettings.py:AUTH_USER_MODEL = 'emailusername.User'That’s it!DocumentationComing soon…InstallationYou can installdjango-email-usernameeither via the Python Package Index (PyPI)
or from source.To install usingpip,:$ pip install django-email-usernameTo install usingeasy_install,:$ easy_install django-email-usernameYou will then need to apply the migrations:$ python manage.py migrate emailusernameDownloading and installing from sourceDownload the latest version ofdjango-email-usernamefromhttp://pypi.python.org/pypi/django-email-username/You can install it by doing the following,:$ tar xvfz django-email-username-0.0.0.tar.gz
$ cd django-email-username-0.0.0
# python setup.py install # as rootUsing the development versionYou can clone the git repository by doing the following:$ git clone git://github.com/acordiner/django-email-username.gitBug trackerIf you have any suggestions, bug reports or annoyances please report them
athttp://github.com/acordiner/django-email-username/issues/LicenseThis software is licensed under theGPL v2 License. See theLICENSEfile in the top distribution directory for the full license text.
Package: django-email-users
For when you want regular Django users but without the usernames.This is a stock replacement for Django’sauth.Usermodel that removes theusernamefield in favor of a uniqueemailfield.
Both theUsermodel and the forms enforce lower
cased email addresses to ensure uniqueness without
surprises.Inspired by theusersmodule in pydanny’s originalDjango cookiecutter
project templatewhich I
kept using and then editing to support email addresses.InstallingInstall and download with pip:pip install django-email-usersAdd to your installed apps in your settings.py file:INSTALLED_APPS = (
    'users',
)Change your project’s configured user in your settings.py file:AUTH_USER_MODEL = 'users.User'Profit.If you are using South with Django prior to Django 1.7, you will need to use
South 1+.History1.1.0 (2017-07-11)Updated password change form link for User’s ModelAdmin class1.0.0 (2016-04-21)RemoveUser.titlefield (POTENTIALLY BREAKING). This field should not have
been added(!). If you’re using this field you shouldn’t upgrade!Squashed migrations (POTENTIALLY BREAKING). If you’re using 0.4.0 or an older
version and want to upgrade, consider faking the migration to 0001 and then
removing thetitlefield. As long as you’re using 0.4.0 thetitlefield
is nullable, however.Drop support for Django 1.6, 1.7Add support for Django 1.9Add support for Python 3.50.4.0 (2015-04-15)Update Django migrations to reflect field changes for base user model0.3.0 (2015-04-10)Support Django 1.80.1.1 (2014-11-24)Adds a get_username method to User model0.1.0 (2014-08-15)First release on PyPI.
Package: django-email-utils
A utility function to ease the process of sending templated emails with Django.RequirementsPython version 3.5 or higherDjango version 2.2 or higherInstallationInstall from PyPI:pip install django-email-utilsUsageemail_utils.send_email(template_name, context=None, **kwargs)Send templated emails containing HTML, plain text, or both. The function is a
thin wrapper around Django’ssend_mailfunction that loads the email content
from a template.Example:from email_utils import send_email


send_email(
    context={'foo': 'bar'},
    from_email='no-reply@myproject.com',
    recipient_list=['test@example.com'],
    subject='My Templated Email',
    template_name='myapp/template',
)Parameterstemplate_nameThe base name of the templates to use. The function then looks for the
templates{template_name}.htmland{template_name}.txt.contextThe context used to render the templates. Defaults to an empty dictionary.**kwargsAdditional keyword arguments to pass to Django’ssend_mailfunction.Raisesemail_utils.NoTemplatesExceptionIf neither the HTML nor plain text templates are found.TestingTests are run using pytest. To run the tests, install the requirements and then
execute the tests:pip install -r requirements/test.txt
pytestLicenseThis project is licensed under the MIT License.AuthorsChathan Driehuys (chathan@driehuys.com)
Package: django-embed
Embed is a Django app to generate the embed code for youtube, twitter and slideshare.Detailed documentation is in the “docs” directory.Quick startAdd “embed” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'embed',
)Runpython manage.py syncdbto create the embed cache model.Import Embed class.from embed.utils import EmbedYou can use it individually for each service or all of them.youtube = Embed.get_youtube_embed(string=”Check this videohttps://youtu.be/THgLyTucjmk”)The Embed will return a string with the link replaced with the embed code.If you want use the twitter functionality you have to set your twitter api keys.Embed.consumer_key = ‘dummy-consumer-key’
Embed.consumer_secret = ‘dummy-consumer-secret’
Embed.oauth_token = ‘dummy-access-token’
Embed.oauth_token_secret = ‘dummy-access-token-secret’You can set the parameters for the embed objects.Embed.config[‘width’] = ‘430’If you are using MySQL you need to encode to utf-8 the “embed_code” column of the EmbedCache table in your database.
Package: django-embedded-media
Author:Derek PaytonVersion:0.1.0License:MITEver run into a situation where it would just beso incredibly handyto be
able to render inline CSS or JS in your Django form media?This lets you do that.It all started with ticket#13978, which I championed for a while. However,
I no longer think this is a good feature to have in Django. After using the#13978patch for a while, I’ve come to realize that it’s just too damn easy
to rely on it too much. No one wants to see a two-dozen line string of
jQueryfied JS in the middle of their Django form class.However, if you’ve got the need for spee^H^H^H^Hembedded media – and you think
you’re disciplined enough to not start writing all your CSS and JS as strings
in your .py files – then django-embedded-media makes it possible.InstallationUsepip, obviously:$ pip install django-embedded-mediaUsageThere’s no special configuration needed. It’s a Django app, technically, but
you don’t need to put it into INSTALLED_APPS. Just install the package and
start embedding your styles and scripts.Works on forms:>>>fromdjangoimportforms>>>importembedded_mediaasemb>>>>>>classMyForm(forms.Form):...classMedia:...css={'all':(emb.CSS('.mywidget { display: none; }'),)}...js=(emb.JS('init_mywidget();'),)>>>printMyForm.media<styletype="text/css"media="all">.mywidget{display:none;}</style><scripttype="text/javascript">init_mywidget();</script>>>>Works on form widgets:>>>fromdjangoimportforms>>>importembedded_mediaasemb>>>>>>classMyWidget(forms.TextInput):...classMedia:...css={'all':(emb.CSS('.mywidget { display: none; }'),)}...js=(...'whizbang.js',...emb.JS('init_mywidget();'),...)>>>printMyWidget().media<styletype="text/css"media="all">.mywidget{display:none;}</style><scripttype="text/javascript"src="/static/whizbang.js"></script><scripttype="text/javascript">init_mywidget();</script>>>>Works as a dynamic media property:>>>fromdjangoimportforms>>>importembedded_mediaasemb>>>>>>classMyForm(forms.Form):...def_media(self):...returnMedia(...css={'all':(emb.CSS('.mywidget { display: none; }'),)},...js=(emb.JS('init_mywidget();'),)...)...media=property(_media)>>>printMyForm().media<styletype="text/css"media="all">.mywidget{display:none;}</style><scripttype="text/javascript">init_mywidget();</script>>>>TestingThe tests requireDjango,coverage, andpep8, which are conveniently
listed in requirements.txt:$ pip install -r requirements.txt
$ python setup.py test
Package: django-embed-gist
Installation$[sudo]pipinstalldjango-embed-gistProsnative (html links)How it worksinput:<ahref="https://gist.github.com/user/id"target="_blank">title</a>output:<scriptsrc="https://gist.github.com/user/id.js"></script>settings.pyINSTALLED_APPS+=['django_embed_gist']Examples{% load embed_gist %}

{{ post.body|embed_gist|safe }}readme42.com
Package: django-embed-template
django-embed-templateThis package adds the{% embed %}templatetag. This tag combines the functionality ofthe include tagandthe extends tagto allow for more flexible and extensible modular template usage. Inspired bytwig’s embed tag, this tag lets you override blocks that were defined in the included template.RequirementsThis package is tested with Django 1.8, 1.9 and 1.10 and their respectively supported Python versions.InstallationSimply get the package frompip:pip install django-embed-templateThen make sure to adddjango_embed_templateto yourINSTALLED_APPSin yoursettings.py.UsageUnlike{% extends %}, the{% embed %}tag can be repeated in the template and does not have to occur as the first tag (essentially like the{% include %}tag). Likewise,{% embed %}inherits the context by default, and allows you to pass additional context using thewithkeyword. Passing only the explicitly listed variables can be achieved using theonlykeyword.In many cases{% include %}simply suffices. However, in more complex scenarios it has a tendency to create an exponential number of combined templates. This typically happens when the content of the included template is itself dynamic. Consider the following example (inspired bytwig’s documentation):Assume we have somebase.htmlthat contains acontentblock. In this block, we want to create vertical and horizontal sub-blocks. Assume we havevertical.htmlthat contains two boxes sides by side with respectively{% block A %}and{% block B %}inside, as well ashorizontal.htmlcontaining three stacked boxes with similarly labeled blocks. Our page could then look something like this:{% extends 'base.html' %}
{% block content %}
    {% embed 'vertical.html' %}
        {% block A %}Arthur, King of the Britons{% endblock %}
        {% block B %}Sir Lancelot{% endblock %}
    {% endembed %}
    {% embed 'horizontal.html' %}
        {% block A %}Sir Bedevere the Wise{% endblock %}
        {% block B %}Sir Robin the Not-Quite-So-Brave-as-Sir-Lancelot{% endblock %}
        {% block C %}
            Other knights:
            {% embed 'horizontal.html' with background='gray' %}
                {% block A %}Sir Galahad the Pure{% endblock %}
                {% block B %}Sir Not Appearing In This Film{% endblock %}
            {% endembed %}
        {% endblock %}
    {% endembed %}
{% endblock %}Note that we’re also nesting{% embed %}blocks, leaving some blocks unspecified, as well as passing context to one of the embedded templates. For more possible scenarios, browse through theexample templates.LicenseThis package includes code that was directly derived from code from the Django project. The included django-LICENSE applies to those snippets. The included CC0 license applies to the rest of this project.django-embed-template Changelog0.2.0 (2016-08-20)Allow for nesting of embed tags.Include a set of test cases and examples.Fix compatability with Python 2 and Django 1.8+0.1.2 (2016-08-10)Fix packaging to actually include code.0.1.1 (2016-07-31)Fix embedding the same template more than once.0.1.0 (2016-07-30)Initial working prototype
Package: django-ember-index
A Django app to serveEmberindex files deployed withember-cli-deploy.InstallationInstall application using$ pip installdjango-ember-index.Addember_indexto yourINSTALLED_APPSsetting like this:INSTALLED_APPS=(...'ember_index',)UsageRegister Ember application(s) aturls.pywithredis’s
adapter:fromember_indeximportindex,RedisAdapteradapter=RedisAdapter(host='localhost')urlpatterns=[index(r'^other/','other-app',adapter),index(r'^','my-app',adapter),]The providedregexis used to set router’srootURLbyreplacingpregeneratedbaseURLenvironment configuration at index file.Note thatstoreConfigInMetamust be set totrue, otherwise an exception is raised. Ifbasetag is present in index file, then value ofhrefattribute will be replaced too.If CSRF protection is enabled, thenmetatag namedX-CSRFTokenwith generated token will be provided. You can useEmber Django CSRFto enable protection on the Ember side.All adapter’s keyword arguments will be passed into theStrictRedisobject on initialization.Access application(s) at:/with current revision ofmy-app,/r/ed54cda/with specific revision ofmy-app,/other/with current revision ofother-app,/other/r/ed54cda/with specific revision ofother-app.LicenseDjango Ember Index is available under the MIT license. See the LICENSE
file for more info.
Package: django_ember_toolkit
django_ember_toolkit====================Tools to integrate develop an Ember app using Django as the backend.It can:*   Generate an Ember app inside your Django project*   Preconfigure said app to expect Django REST Framework's JSON dataformat*   Automatically generate Ember models based on your Django models*   Run Ember automatically alongside your Django development server,configuring the Ember app to look for an API endpoint specified inDjango's `settings.py`.It makes very few Django-specific changes to the internal Ember project, whichshould make it easier to separate the two projects later, if you outgrow theshared-repo strategy.Installation------------To use django_ember_toolkit, you'll need [Node](https://github.com/joyent/node/wiki/installation)and [Ember CLI](http://www.ember-cli.com/user-guide/#getting-started). See theinstallation instructions at their respective sites for details.Then just `pip install django_ember_toolkit` and add `django_ember_toolkit` toyour INSTALLED_APPS.Configuration-------------django_ember_toolkit looks in `settings.EMBER_TOOLKIT` for a configurationdictionary containing:{"API_PATH": "/path/to/api", #the URL at which Ember can find your REST API"EMBER_APP_NAME": "some-name", #the name ember-cli should give your app"EMBER_APP_PATH": "client", # optional: the filesystem path, relative to# BASE_DIR, where the Ember project should be# stored"MODELS_TO_SYNC": ["auth.*", "myapp.Widget"] #  models to use whengenerating Ember models}Note: MODELS_TO_SYNC takes a list of model specifiers, each either"[appname].[ModelClass]" or "[appname].*" (the latter selects all models in theindicated app)Usage-----django_ember_toolkit exposes a set of new management commands:*   `create_ember_project`: generates a new Ember app inside your Djangoproject, configures it to use Django REST Framework's JSON format,and overwrites Ember's environment.js config file to allowdjango_ember_toolkit to easily "push" certain settings into Ember.*   `generate_ember_config`: generates a backend-config.js file, which isloaded by django_ember_toolkit's modified environment.js file. Thisis usually run automatically when you need it.*   `generate_ember_models`: using ember-cli's scaffolding tools, generates aset of client-side models based on the models specified insettings.EMBER_TOOLKIT['MODELS_TO_SYNC']. If the models already exist,Ember CLI will ask if you want to replace them on an individual basis.*   `runserver_ember`: runs the Ember development server alongside the Djangodevelopment server.
Package: django-eml-email-backend
Django has filebased email backend that is handy for inspecting
outgoing emails during development. But this backend saves emails
to ‘.log’ files and it is not clear how to view them in email client.
This is especially important for html emails.eml_email_backend saves outgoing emails to ‘.eml’ files. This way emails
can be opened directly in MS Outlook or Mail.app or previewed
in OS X Finder by simply pressing space over the file.Installation$ pip install django-eml-email-backendUsageSetup the django email backend in your local_settings.py:EMAIL_BACKEND = 'eml_email_backend.EmailBackend'
EMAIL_FILE_PATH = 'path/to/output/folder/'LimitationsFull eml format is not supported, file extensions are just changed
from “.log” to “.eml” by this app. It works in most cases. Patches
for better eml support are welcome.See also:https://code.djangoproject.com/ticket/15793