Saravanan666/pypi-org huggingface dataset:
Package: django-multiforloop
django-multiforloop provides an enhancement to django's builtin forloop
template tag, which makes it easier to iterate over multiple lists
simultaneously (acting similarly to Python'szip).multiforloop allows this Python idiom to be used in django templates:for x,y in zip(x_list, y_list):
	print x,yNormally, to iterate over multiple lists simultaneously in django templates,
the lists must be zipped in the view and passed in as an extra context
variable. When this is the only extra processing needed in a view (eg. with
generic views), this can result in a fair bit of unneeded boilerplate code.UsageRendering this template{% load multifor %}
    {% for x in x_list; y in y_list %}
      {{ x }}:{{ y }}
    {% endfor %}with this contextcontext = {
        "x_list": ('one', 1, 'carrot'),
        "y_list": ('two', 2, 'orange')
    }will outputone:two
    1:2
    carrot:orangeThe multifor tag library also includes afor_longesttag that functions
similarly to izip_longest from Python's itertools library. Whereas the
normal for loop will truncate all inputs to the length of the shortest,
for_longest will iterate over all values of the longest, filling any shorter
inputs with the value in settings.TEMPLATE_STRING_IF_INVALID ('' by default).Observe the difference:Rendering this template{% load multifor %}
    {% for x in x_list; y in y_list %}
      {{ x }}:{{ y }}
    {% endfor %}with this contextcontext = {
        "x_list": ('one', 1, 'carrot'),
        "y_list": ('two', 2)
    }will outputone:two
    1:2While rendering this template{% load multifor %}
    {% for_longest x in x_list; y in y_list %}
      {{ x }}:{{ y }}
    {% endfor %}with the same contextcontext = {
        "x_list": ('one', 1, 'carrot'),
        "y_list": ('two', 2)
    }will outputone:two
    1:2
    carrot:Installationpip install django-multiforloopInclude 'multiforloop' in your settings.py's list of installed appsAdd{% load multifor %}to the top of any templates which use the multiforloop
Package: django-multiforloop-patched
django-multiforloop provides an enhancement to django's builtin forlooptemplate tag, which makes it easier to iterate over multiple listssimultaneously (acting similarly to Python's `zip`).multiforloop allows this Python idiom to be used in django templates:for x,y in zip(x_list, y_list):print x,yNormally, to iterate over multiple lists simultaneously in django templates,the lists must be zipped in the view and passed in as an extra contextvariable. When this is the only extra processing needed in a view (eg. withgeneric views), this can result in a fair bit of unneeded boilerplate code.##UsageRendering this template{% load multifor %}{% for x in x_list; y in y_list %}{{ x }}:{{ y }}{% endfor %}with this contextcontext = {"x_list": ('one', 1, 'carrot'),"y_list": ('two', 2, 'orange')}will outputone:two1:2carrot:orangeThe multifor tag library also includes a `for_longest` tag that functionssimilarly to izip_longest from Python's itertools library. Whereas thenormal for loop will truncate all inputs to the length of the shortest,for_longest will iterate over all values of the longest, filling any shorterinputs with the value in settings.TEMPLATE_STRING_IF_INVALID ('' by default).Observe the difference:Rendering this template{% load multifor %}{% for x in x_list; y in y_list %}{{ x }}:{{ y }}{% endfor %}with this contextcontext = {"x_list": ('one', 1, 'carrot'),"y_list": ('two', 2)}will outputone:two1:2While rendering this template{% load multifor %}{% for_longest x in x_list; y in y_list %}{{ x }}:{{ y }}{% endfor %}with the same contextcontext = {"x_list": ('one', 1, 'carrot'),"y_list": ('two', 2)}will outputone:two1:2carrot:## Installation1. pip install django-multiforloop2. Include 'multiforloop' in your settings.py's list of installed apps3. Add `{% load multifor %}` to the top of any templates which use the multiforloop
Package: django-multi-form
This library allows your to use unlimited number of forms in your views.Add forms to the dict form_classes, where the key is the form name,
and the value is the form class.By default, in the case of validation, there is form.save(),
else there is the error output to the template.To change this behavior,
in the processing form.valid use form_valid_my_form(self, form),
and form_invalid_my_form(self, form) for form.invalid.If you want to fill out the form, use the dict form_initials, where the key is the form name,
and the value is the dict, in which the key is field name, and the value is the field value.
Ex.: {‘my_form’: {‘first_name’: ‘Denis’, ‘city’: ‘Moscow’}}Or define a special method get_initials_form_my_form(self), and return the data dictionary.If you need to update the object, use dict form_instances, where the key in the form name,
and the value is the object.You can also define a special method get_instances_form_my_form(self).By default, if form proccesing is successful it will be redirected to the same page.You can change this behavior, by writting a new key and value in the dict form_success_urls.You can also use a special method get_success_url_form_my_form(self) to procces the redirect site.
Package: django-multi-form-view
# Django Multi. Form View[![CircleCI](https://circleci.com/gh/TimBest/django-multi-form-view.svg?style=shield)](https://circleci.com/gh/TimBest/django-multi-form-view)[![codecov](https://codecov.io/gh/timbest/django-multi-form-view/branch/master/graph/badge.svg)](https://codecov.io/gh/timbest/django-multi-form-view)[![PyPI](https://img.shields.io/pypi/v/django-multi-form-view.svg?maxAge=2592000)](https://pypi.python.org/pypi/django-multi-form-view)Django class based views for using more than one Form or ModelForm in a single view.## Install```bash$ pip install django-multi-form-view```## Usage### MultiFormView ([Example](demo/base/views.py))**class multi_form_view.MultiFormView**A single view that can display multiple Django forms. Handles displaying, redisplaying on error, andredirects on form success in.#### Extends* django.views.generic import FormView#### Attributes and Methods* `form_classes`A dictionary containing to forms for the view.* `are_forms_valid()`Check if all forms defined in `form_classes` are valid.* `forms_valid()`Redirects to get_success_url().* `forms_invalid()`Renders a response containing the form errors.* `get()`Render the forms.* `get_context_data()`Adds the results of `get_forms()` to the context dictionary with the key `'forms'`.* `get_forms()`.Initializes the forms defined in `form_classes` with initial data from `get_initial()` and kwargsfrom get_form_kwargs().* `get_form_kwargs()`.Build the keyword arguments required to instantiate the form.* `get_initial()`Returns a copy of `initial` with empty initial data dictionaries for each form.* `post()`Uses `are_forms_valid()` to call either `forms_valid()` or `forms_invalid()`.### MultiModelFormView ([Example](demo/base/views.py))**class multi_form_view.MultiModelFormView**A single view that can display multiple Django ModelForms. Handles displaying, redisplaying onerror, and redirects on form success in.#### Extends* multi_form_view.MultiFormView#### Attributes and Methods* `forms_valid()`Calls `save()` on each form.* `get_forms()`.Initializes the forms defined in `form_classes` with initial data from `get_initial()`, kwargsfrom get_form_kwargs() and form instance object from `get_objects()`.* `get_objects()`Returns dictionary with the instance objects for each form. Keys should match the correspondingform.## Demo```bash$ cd demo$ pip3 install -r requirements.txt$ python3 manage.py migrate$ python3 manage.py runserver```## TestingInstall [PhantomJS](http://phantomjs.org/)```bash$ python3 demo/manage.py behave```
Package: django-multihost
OverviewDjango-Multihost is a Django middleware that overrides Site ORM functionality and gets the current Site from the Host header.  The code is loosely based on the work done by Bruce Kroeze here:django-threaded-multihost.DescriptionThe MultiHostMiddleware class contained in this app has 2 tasks:Upon middleware __init__(), it overrides SiteManager.get_current() with a multihost-aware version that reads theHostheader from the request and attempts to find a matching Site (caches it if cache is enabled).Upon middleware process_request(), it sets the request intothreadlocalstorage and then uses the new SiteManager.get_current() functionality to retrieve the Site matching theHostheader and sets it into the request instance.  If a match is not found and MULTIHOST_AUTO_WWW is True (the default), it will attempt to modify theHostURL  to add/removewww.and attempt the lookup again.  If it still doesn’t find a matching Site, it redirects toMULTIHOST_REDIRECT_URL.RequirementsPython 2.6 (May work with 2.3+, but untested - please report)Django 1.2.x (May work with 1.0+, but untested - please report)InstallationCopy or symlink themultihostpackage into your django project directory or install it by running one of the following commands:python setup.py installorpip installdjango-multihostoreasy_installdjango-multihostAddMULTIHOST_REDIRECT_URLtosettings.pyAddmultihost.middleware.MultiHostMiddlewareto yourMIDDLEWARE_CLASSESin at the end of the list.  If you find it isn’t working, move it up the list order as there may be a middleware conflict.Note: Django does strange things (like sending requests to the wrong urls handler) when it is used in conjunction with debug_toolbar.  To fix this problem, multihost must always be the last entry in MIDDLEWARE_CLASSES.Advanced SettingsThere are 2 settings that developers can use to override default functionality:MULTIHOST_REDIRECT_URL:required; no default.  The default middleware request processing will redirect to this URL in the case of Site lookup failure.MULTIHOST_AUTO_WWW: optional; defaults to True.  If the Site can’t be found that matches the incoming Host header exactly, this will automatically try removing/addingwww.and searching again.NotesIt is important to note that the MultiHostMiddleware middleware does database lookups against the Django tables corresponding to theSitemodel - in particular, against thedomainfield.  In the default Django implementation (version 1.2.1 as of writing), thedomainfield is not indexed or unique and this may result in slower performance over time.For this reason, web site/application developers should weigh the benefits and consider manually adding an index for theSitemodel’sdomainfield using standard database access tools.SourceThe latest source code can always be found here:github.com/jaddison/django-multihostCreditsDjango-Multihost is maintained byJames Addison.LicenseDjango-Multihost is Copyright (c) 2010-2012, James Addison. It is free software, and may be redistributed under the terms specified in the LICENSE file.Questions, Comments, Concerns:Feel free to open an issue here:github.com/jaddison/django-multihost/issues
Package: django-multihostsettings
=====Django MultiHostSettings=====Provides conditional settings according to the host name.Quick start-----------1. Add "MultiHostSettingsMiddleware" in the MIDDLEWARE_CLASSES in your settings.py :MIDDLEWARE_CLASSES = (...'multihostsettings.middleware.MultiHostSettingsMiddleware',)2. Create one file per domain3. List domains and setting files  in the MULTIHOST_SETTINGS in your settings.py :MULTIHOST_SETTINGS = {'cms1.dev.net' : 'TransCMS.settings.cms1'...}4. Instead of :from django.conf import settings5. Use :from multihostsettings import localsettings as settings
Package: django-multiimap
=====Multiimap=====Multiimap is a simple Django app to manage login via imap server.Quick start-----------1. Add "multiimap" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'django_multiimap',]2. In project settings, add multiimap backend to the backend tuple::AUTHENTICATION_BACKENDS = ('django_multiimap.backend.Backend','django.contrib.auth.backends.ModelBackend',)3. In project settings, add an 'MULTIIMAP_SERVERS' dictionary like this::MULTIIMAP_SERVERS = {'domain': {'host': 'domain_address', 'group_name': 'the_group_name', 'superusers': ['address@email.com']},'domain1': {'host': 'domain1_address', 'group_name': 'the_group_name1', 'superusers': []}}This module will create a group with a name like 'multiimap_group_%s' % domain where domain is the @domain.com in user email.Users mail addresses in superuser list will be set as django superuser.
Package: django-multiinfo
Message queue for sending SMS messages through Polkomtel’s MultiInfo serviceFree software: GNU Affero General Public License v3Documentation:https://django-multiinfo.readthedocs.io.FeaturesPending :DDemoTo run an example project for this django reusable app, click the button below and start a demo serwer on HerokuQuickstartInstall MultiInfo for Django:pip install django-multiinfoAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_multiinfo.apps.DjangoMultiinfoConfig',...)Add MultiInfo for Django’s URL patterns:importdjango_multiinfo.urlsurlpatterns=[...url(r'^',include(django_multiinfo.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.1.0 (2018-03-30)First release on PyPI.
Package: django-multilingual-events
An app for collecting information about events and agendas.This could be useful for e.g. conventions, meetings etc.InstallationPrerequisites:Djangodjango-hvaddjango-cms (tested with v3 beta)django-document-libraryIf you want to install the latest stable release from PyPi:$ pip install django-multilingual-eventsIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitlabstudio/django-multilingual-events.git#egg=multilingual_eventsAddmultilingnual_eventsto yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'document_library',
    'easy_thumbnails',
    'filer',
    'hvad',
    'multilingual_events',
    'cms',
)Run the migrations:./manage.py migrate multilingual_eventsUsageUsing the apphookSimply create a django-cms page and selectMultilingual Events Apphookin
theApplicationfield of theAdvanced Settings.SettingsEVENT_PAGINATIONDefault: 20Define a pagination amount for the event listing.SitemapsTo add a sitemap of your events, add the following to your urlconf:from multilingual_events.sitemaps import EventSitemap

urlpatterns += patterns(
    '',
    url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {
        'sitemaps': {
            'events': EventSitemap,
        }, }),
)RoadmapCheck the issue tracker on github for milestones and features to come.
Package: django-multilingual-initiatives
Django Multilingual Initiatives===============================An app for showing localized versions of initiatives. E.g. as pluginin a blog post.Comes with a django-cms plugin and is multilingual.Prerequisites-------------You will need to have the following packages installed:* django-cms (cms 3 beta tested)Installation------------If you want to install the latest stable release from PyPi::$ pip install django-multilingual-initiativesIf you feel adventurous and want to install the latest commit from GitHub::$ pip install -e git://github.com/bitmazk/django-multilingual-initiatives.git#egg=multilingual_initiativesAdd ``multilingual_initiatives`` to your ``INSTALLED_APPS``::INSTALLED_APPS = (...,'multilingual_initiatives',)Run the South migrations::./manage.py migrate multilingual_initiativesUsage-----Use the Django admin to create your initiative objects. If you are usingdjango-cms you can use the ``Initiative Plugin`` to display an initiativein your placeholders.Settings--------INITIATIVE_PLUGIN_DISPLAY_TYPE_CHOICES++++++++++++++++++++++++++++++++++Default::[('small', _('small')),('big', _('big')),]When using the ``Initiative Plugin`` in your django-cms placeholders you willnotice that you only have two choices for the ``Display type``. This fieldcan be helpful when you want to render an Initiative differently in differentparts of your site. If you need even more display types, just set this settingto a different list of tuples.Roadmap-------Check the issue tracker on github for milestones and features to come.
Package: django-multilingual-orgs
Django Multilingual Orgs========================An app for showing localized versions of organization profiles. E.g. as pluginin a blog post.Comes with a django-cms plugin and is multilingual.Prerequisites-------------You will need to have the following packages installed:* django-cms (cms 3 beta ready)Installation------------If you want to install the latest stable release from PyPi::$ pip install django-multilingual-orgsIf you feel adventurous and want to install the latest commit from GitHub::$ pip install -e git://github.com/bitmazk/django-multilingual-orgs.git#egg=multilingual_orgsAdd ``multilingual_orgs`` to your ``INSTALLED_APPS``::INSTALLED_APPS = (...,'multilingual_orgs',)Run the South migrations::./manage.py migrate multilingual_orgsUsage-----Use the Django admin to create your organization objects. If you are usingdjango-cms you can use the ``Organization Plugin`` to display an organizationin your placeholders.Settings--------ORGANIZATION_PLUGIN_DISPLAY_TYPE_CHOICES++++++++++++++++++++++++++++++++++Default::[('small', _('small')),('big', _('big')),]When using the ``Organization Plugin`` in your django-cms placeholders you willnotice that you only have two choices for the ``Display type``. This fieldcan be helpful when you want to render an organization differently in differentparts of your site. If you need even more display types, just set this settingto a different list of tuples.Roadmap-------Check the issue tracker on github for milestones and features to come.
Package: django-multilingual-search
A multilingual Haystack plugin for Django and Elasticsearch.
The module is a drop-in replacement for the HaystackElasticsearchSearchEngine.Instead of a single index it creates an index for each language specified insettings.LANGUAGES.A query is routed to the index of the currently active language.Currently, support for Django 1.10 is not guaranteed.InstallationInstall with pip:pip install django-multilingual-searchThe major and minor versions of this project correspond to the Haystack version the package was
tested against. This version is for Haystack 2.4.ConfigurationThe app provides a drop-in replacement for the ElasticsearchEngine of Haystack.
To use it, specify this engine insettings.py:HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'multilingual.elasticsearch_backend.ElasticsearchMultilingualSearchEngine',
        'URL': 'http://127.0.0.1:9200/',
        'INDEX_NAME': 'myproject',
    },
}For automatic indexing of new entries the Haystacksignal processorscan be used without modification. It is recommended that a custom SignalProcessor be used
instead of theRealtimeSignalProcessorbecause of server timeout issues with the latter.ContributingPlease read theContributingguide. Any help is greatly appreciated.My current company is not using Python, so I won’t be able to maintain and keep this library updated.Release History2.4.2: Support Haystack 2.4.12.4.1: Add compatibility with Django-parler.2.4.0: Update code for compatibility with Haystack 2.42.3.0: First release
Package: django-multilingual-survey
Django Multilingual SurveySurvey app that allows questions and answers to be created in several
languages.Allows users to submit free text in an “other” field, if none of the choices
are sufficient for the user. Users can even submit several custom answers to
a question by submitting several comma separated values.Admins will get notified if a user submits a custom answer via the “other”
field. They have an admin view that allows to accept, reject or rename the
custom answer.This ensures that users who submit the same custom answer but with different
spelling (i.e. “Vim” and “VIM”) will ultimately get hooked up with the same
unified SurveyAnswer object, which makes the creation of reports much easier
and yields more accurate survey results.Questions and answers can be provided in several languages usingdjango-hvadInstallationTo get the latest stable release from PyPipipinstalldjango-multilingual-surveyTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-multilingual-survey.git#egg=multilingual_surveyAddmultilingual_surveyto yourINSTALLED_APPSINSTALLED_APPS=(...,'generic_positions','multilingual_survey',)Add themultilingual_surveyURLs to yoururls.pyurlpatterns=patterns('',...url(r'^pos/',include('generic_positions.urls')),url(r'^survey/',include('multilingual_survey.urls')),)Don’t forget to migrate your database./manage.pymigratemultilingual_surveyUsageTODO: Describe usage or point to docs. Also describe available settings and
templatetags.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-multilingual-surveymakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branch
Package: django-multimedia
Encode and upload multimedia from the Django admin interface. Supports any
encoding profile you can write a command line statement to accomplish.Quick startInstall withpip:$ pip install django-multimediaAdd toINSTALLED_APPS:INSTALLED_APPS += (
    'storage',
    'multimedia',
)Update your database:$ ./manage.py syncdb
$ ./manage.py migrate multimediaConfigure your selectedstorage backend:MULTIMEDIA_FILE_STORAGE = 'path.to.backend'
Package: django-multipageforms
InstallationInstall the library, for instance with pip:pip install django-multipageformsDemoCopy the entire django-multipageforms directory somewhere, set up and
enter a virtualenv, then provided you are on some Un*x:make demoThis’ll automatically make a user “admin” with the password “demo”.The demo should now be running onhttp://127.0.0.1/Runningmake demoagain will erase the database from the previous
run.TestsTo run the tests, first install the testing-requirements:pip install -r requirements/test.txtProvided you have a python on your path you can then run the tests with:python runtests.pyYou can also test with tox:toxVersion:0.6.0
Package: django-multiple-auth
Django Multiple Auth====================django-multiple-auth allows you to login over a Django website withmany users and quickly switch without having to type credentials.[![Build Status](https://travis-ci.org/EngageSports/django-multiple-auth.svg?branch=master)](https://travis-ci.org/EngageSports/django-multiple-auth)Requirements------------- Django 1.10.* / Django 1.11.*- Tested under python 2.7 and 3.6Install-------```pip install django-multiple-auth```Add `multiple_auth` to INSTALLED_APPS```pythonINSTALLED_APPS = (...'multiple_auth',)```then update your project's `urls.py`:```pythonurlpatterns = patterns(...url(r'^m_auth/', include('multiple_auth.urls')),)```Usage-----Replace the usage of `django.contrib.auth.views.login` by `multiple_auth.views.login````pythonfrom multiple_auth.views import loginurlpatterns = patterns(url(r'^login/$', login, name='auth_login'),]```This view must be used to login new users, including the first login.In your template, load the template tag, show a list of logged-in users and give access to the login form.```html{% load multiple_auth_tags %}{% block content %}{% get_logged_in_users as logged_in_users %}<ul>{% for u in logged_in_users %}<li>{% if u != request.user %}<b>{{ u.username }}</b> - {{ u.get_full_name }}{% else %}<a href="{% url "multiauth_switch" forloop.counter0 %}"><b>{{ u.username }}</b> - {{ u.get_full_name }}</a>{% endif %}</li>{% endfor %}</ul><a href="{% url "multiauth_login" %}">Add account</a>{% endblock content %}```ChangeLog=========1.2 2017-12-18--------------- Added MANIFEST1.1 2017-11-30--------------- Python 3 compat- Updated readme- Test under django 1.10.X, 1.11.X1.0 2017-11-28--------------- Initial Release