Saravanan666/pypi-org huggingface dataset:
Package: django-multitype-file-field
Project for merging different file types, as example easy thumbnail image and unpacking archive in one fieldInstallationpipinstalldjango-multitype-file-fieldor from gitpipinstall-egit+https://github.com/Apkawa/django-multitype-file-field.git#egg=django-multitype-file-fieldDjango and python versionPythonDjango3.53.63.73.81.8:x::x::x::x:1.11:heavy_check_mark::heavy_check_mark::heavy_check_mark::x:2.2:heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark:3.0:x::heavy_check_mark::heavy_check_mark::heavy_check_mark:Usagemodels.pyfromdjango.dbimportmodelsfrommultitype_file_field.fieldsimportMultiTypeFileField# as example, with easy_thumbnailsfromeasy_thumbnails.fieldsimportThumbnailerImageFieldclassFileModel(models.Model):file=MultiTypeFileField(upload_to='test_archive',fields={None:models.FileField,# Fallback'image/svg+xml':models.FileField,# high priority,'image':(ThumbnailerImageField,dict(resize_source=dict(size=(100,100),sharpen=True,crop='smart'))),# tuple, Field and args})Usage:fromtests.modelsimportTestModelfromdjango.core.files.baseimportContentFilemodel=TestModel()model.file# => <FieldFile: None>model.file=ContentFile('',name='example.png')model.file# => <ImageFieldFile: example.png>model.file=ContentFile('',name='example.txt')model.file# => <FieldFile: example.txt>Contributingrun example apppipinstall-rrequirements-dev.txt
./test/manage.pymigrate
./test/manage.pyrunserverrun testspipinstall-rrequirements-dev.txt
pytest
toxUpdate versionpythonsetup.pybumpversionpublish pypipythonsetup.pypublish
Package: django-multiupload
Django MultiuploadDead simple drop-in multi file upload field for django forms using HTML5'smultipleattribute.InstallationInstall the package using pip (or easy_install if you really have to)$pipinstalldjango-multiuploadOr directly from this repository to get the development version (if you're feeling adventurous)$pipinstall-egit+https://github.com/Chive/django-multiupload.git#egg=multiuploadUsageAdd the form field to your form and make sure to save the uploaded files in the form'ssavemethod.For more detailed examples visit theexamples section.# forms.pyfromdjangoimportformsfrommultiupload.fieldsimportMultiFileField,MultiMediaField,MultiImageFieldclassUploadForm(forms.Form):attachments=MultiFileField(min_num=1,max_num=3,max_file_size=1024*1024*5)# If you need to upload media files, you can use this:attachments=MultiMediaField(min_num=1,max_num=3,max_file_size=1024*1024*5,media_type='video'# 'audio', 'video' or 'image')# For images (requires Pillow for validation):attachments=MultiImageField(min_num=1,max_num=3,max_file_size=1024*1024*5)The latter two options just add fancy attributes to HTML's<input>, restricting the scope to corresponding filetypes.# models.pyfromdjango.dbimportmodelsclassAttachment(models.Model):file=models.FileField(upload_to='attachments')# views.pyfromdjango.views.generic.editimportFormViewfrom.formsimportUploadFormfrom.modelsimportAttachmentclassUploadView(FormView):template_name='form.html'form_class=UploadFormsuccess_url='/done/'defform_valid(self,form):foreachinform.cleaned_data['attachments']:Attachment.objects.create(file=each)returnsuper(UploadView,self).form_valid(form)
Package: django-multiupload2
Django MultiuploadDead simple drop-in multi file upload field for django forms using HTML5'smultipleattribute.InstallationInstall the package using pip (or easy_install if you really have to)$pipinstalldjango-multiuploadOr directly from this repository to get the development version (if you're feeling adventurous)$pipinstall-egit+https://github.com/Chive/django-multiupload.git#egg=multiuploadUsageAdd the form field to your form and make sure to save the uploaded files in the form'ssavemethod.For more detailed examples visit theexamples section.# forms.pyfromdjangoimportformsfrommultiupload.fieldsimportMultiFileField,MultiMediaField,MultiImageFieldclassUploadForm(forms.Form):attachments=MultiFileField(min_num=1,max_num=3,max_file_size=1024*1024*5)# If you need to upload media files, you can use this:attachments=MultiMediaField(min_num=1,max_num=3,max_file_size=1024*1024*5,media_type='video'# 'audio', 'video' or 'image')# For images (requires Pillow for validation):attachments=MultiImageField(min_num=1,max_num=3,max_file_size=1024*1024*5)The latter two options just add fancy attributes to HTML's<input>, restricting the scope to corresponding filetypes.# models.pyfromdjango.dbimportmodelsclassAttachment(models.Model):file=models.FileField(upload_to='attachments')# views.pyfromdjango.views.generic.editimportFormViewfrom.formsimportUploadFormfrom.modelsimportAttachmentclassUploadView(FormView):template_name='form.html'form_class=UploadFormsuccess_url='/done/'defform_valid(self,form):foreachinform.cleaned_data['attachments']:Attachment.objects.create(file=each)returnsuper(UploadView,self).form_valid(form)
Package: django-multiurl
Have you ever wanted multiple views to match to the same URL? Now you can.You may once have tried something like this:urlpatterns = [
    url('/app/(\w+)/$', app.views.people),
    url('/app/(\w+)/$', app.views.place),
]However, if you try this,/app/san-francisco/will only map toapp.views.people. Raising anHttp404fromapp.views.peopledoesn’t
help: you only get a 404 in the browser because Django stops resolving
URLs at the first match.Well,django-multiurlsolves this problem. Justpip installdjango-multiurl, then do this:from multiurl import multiurl

urlpatterns = [
    multiurl(
        url('/app/(\w+)/$', app.views.people),
        url('/app/(\w+)/$', app.views.place),
    )
]Now in your views, raisemultiurl.ContinueResolvinganywhere you’d like
to break out of the view and keep resolving. For example, here’s whatapp.views.peoplemight look like:from multiurl import ContinueResolving

def people(request, name):
    try:
        person = Person.objects.get(name=name)
    except Person.DoesNotExist:
        raise ContinueResolving
    return render(...)That’s it!ContinueResolvingwill causemultiurlto continue onto the
next view (app.views.place, in this example).A few notes to round things out:If you don’t want to useContinueResolving– perhaps you’d rather
continue usingget_object_or_404, or you’re using third-party views
that you can’t modify to raiseContinueResolving, you can pass acatchargument intomultiurlto control which exceptions are
considered “continue” statements. For example, to allowHttp404exceptions to continue resolving, do this:urlpatterns = [
    multiurl(
        url('/app/(\w+)/$', app.views.people),
        url('/app/(\w+)/$', app.views.place),
        catch = (Http404, ContinueResolving)
    )
]As you can see,catchshould be a tuple of exceptions. It’s probably a
good idea to always includeContinueResolvingin the tuple.If the last view in amultiurlraisesContinueResolving(or another
“continuing” exception), a 404 will be raised instead. That is, if resolving
“falls off the end” of some multi-urls, you’ll get the 404 you expect.Reverse URL resolution just works as expected. Name your sub-URLs and then
reverse your heart out.ContributingDevelopment takes placeon GitHub; pull requests are
welcome. Run tests withtox.
Package: django-multivalueformfield
# Multiple-value field for Django forms## The problemSay we want to use a Django form to validate form input such as the following:```?foo=spam&foo=egg&foo=chips```Django can parse this query-string to generate a list:```>>> request.GET.getlist("foo")['spam', 'egg', 'chips']```...but it is not yet capable of validating the input using `django.forms`.## How to useSay for example, we want to validate a list of email addresses, with a query-string such as the following:```?email=foo@bar.com&email=spam@egg.com```Here are the steps we would take:1. Install this module (e.g. using `pip install django_multivalueformfield`)2. Define a form like the following:```import django.forms as formsfrom multivaluefield import MultiValueFieldclass MultiEmailForm(forms.Form):emails = MultiValueField(forms.EmailField(), "email")```3. Pass the `QueryDict` into the form and validate as per usual:```form = MultiEmailForm(request.GET)if form.is_valid:emails = form.cleaned_data["emails"]# do something with emailselse:errors = form.errors# do something with errors```
Package: django-municipios
Aplicação plugável Django com modelos e widgets para os Municípios BrasileirosForm com selector Ajaxwidget reutiliz[avel com Field specificop para modelos com campo municipio.Instalando o django-municipios$ pip install django-municipiosou$ easy_install django-municipiosou baixar o código fonte do github e rodar “setup.py”:$ git clone git://github.com/znc-sistemas/django-municipios.git$ cd django-municipios$ python setup.py installDependênciasjQuery (somente para utilizar widget de seleção de Municípios)Usando o django-municipiosSETTINGSadicione a aplicação no INSTALLED_APP no seu settings.pyINSTALLED_APPS = (
    ...

    'municipios',

    ...

)Utilizando dados geográficosSe for utilizar GIS adicione a variávelMUNICIPIOS_GEO:MUNICIPIOS_GEO = TrueNo settings.py, antes de rodar osyncdb.
Este parâmetro habilita os campos que armazenam dados Geográficos (GeoDjango).Para carregar dados geográficos de todos os Municípios e UFs baixe o arquivo de fixturemunicipios_geo_2013_4674.json.zip(110 MB), e carregue a fixture compython manage.py loaddata municipios_geo_900913.json.bz2Utilizando o widget de Seleção de Municípiosfrom django import forms
from municipios.widgets import SelectMunicipioWidget

class FormEndereco(forms.Form):
    municipio = forms.IntegerField(label=u"UF - Município", widget=SelectMunicipioWidget)Viewdef teste(request):
    form = FormEndereco()
    return render_to_response('endereco/teste.html',
           {'form':form,}, context_instance = RequestContext(request))TemplateInclua o jquery no seu template, ou adicione ao media do seu Form.form.media - o widget depende de codigo js para funcionar o ajax<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.min.js"></script>

{{ form.media }}

{{ form }}Template para o widgetA partir da versão 0.8.0 é possível customizar o template utilizado para apresentar o widget.
Os templates identificados pela aplicação são :municipio_field.htmluf_field.htmle o nome da variável a ser substituída é{{wselect}}ex.: de template para BootStrapTwitter<div class="control-group">
    <div class="controls"><label>Município</label> {{wselect}}  </div>
</div>adicione o HTML acima em um template dentro de por exemplo <app>/municipios/templates/municipios/municipio_field.htmlURLsAdicionar as urls da aplicação no arquivo definido peloROOT_URLCONFdo setings.py.NotaA partir da versão 1.4 do Django o prefixo da url pode ser qualquer um, nas versões
anteriores é necessário utilizar o prefixo “muncipios_app”.(

...

url(r'^municipios_app/', include('municipios.urls')),

...

)Arquivos EstáticosPara o funcionamento do widget de seleção de municípios em ambiente de produção é necessário utilizar o comandocollectstaticdoStatic Files.History0.8.1 (2014-01-10)setup.py refatoradoadicionado arquivos de licença, contribuidores, historico e como contribuirmodificado urls.py para tentar importar primeiro as funcoes do django > 1.40.5.0 (2011)First release on PyPI.
Package: django-munigeo
munigeomunigeois a reusable Django application for storing and accessing
municipality-related geospatial data. It can manage following categories of
data:Municipalities as containers of everything belowAdministrative divisions (with parent-child relationships and links to Municipalities)Streets and address locations on those StreetsBuildings with 2D-geometries and addressesPoIs (Points of Interest) with location and typeIf you are using Django Rest Framework (DRF), munigeo also provides you with serializers
for including these in your API.For actually getting the data into your database application, munigeo provides importer
framework. Currently we only have actual importers for City of Helsinki, but
other are welcome.UsageInstall this to your project withpip install django-munigeo,
addmunigeoto yourINSTALLED_APPSsetting.Helsinki exampleBefore you can get Helsinki, you will need the data for Finland first:python manage.py geo_import finland --municipalitiesthenpython manage.py geo_import helsinki --divisions
Package: django-munigeo-turku
[![Build status](https://travis-ci.org/City-of-Helsinki/django-munigeo.svg?branch=master)](https://travis-ci.org/City-of-Helsinki/django-munigeo)
[![codecov](https://codecov.io/gh/City-of-Helsinki/django-munigeo/branch/master/graph/badge.svg)](https://codecov.io/gh/City-of-Helsinki/django-munigeo)
[![Requirements](https://requires.io/github/City-of-Helsinki/django-munigeo/requirements.svg?branch=master)](https://requires.io/github/City-of-Helsinki/django-munigeo/requirements/?branch=master)munigeomunigeois a reusable Django application for storing and accessing
municipality-related geospatial data. It can manage following categories of
data:
* Municipalities as containers of everything below
* Administrative divisions (with parent-child relationships and links to Municipalities)
* Streets and address locations on those Streets
* Buildings with 2D-geometries and addresses
* PoIs (Points of Interest) with location and typeIf you are using Django Rest Framework (DRF), munigeo also provides you with serializers
for including these in your API.For actually getting the data into your database application, munigeo provides importer
framework. Currently we only have actual importers for City of Helsinki, but
other are welcome.## Usage
Install this to your project withpip install django-munigeo,
addmunigeoto yourINSTALLED_APPSsetting.### Helsinki example
Before you can get Helsinki, you will need the data for Finland first:` python manage.py geo_import finland--municipalities`then` python manage.py geo_import helsinki--divisions`
Package: django-muokiprojectpolls
Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:path('polls/', include('polls.urls')),Runpython manage.py migrateto create the polls 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/polls/to participate in the poll.
Package: django-musette
Forum for Django framework. This reusable application it is designed to be easily integrated into an existing Django application.FeaturesMultiple forums ordered by for category.Support to sub-forums.Count views for forum and topic.Support to topics main in forum.Support to rss to forums.User registration a forum.Search topics in a forum.Pre-moderation of topics with multiple moderators.Support of media files for topics.Infinite scroll for comments of one topic.Notifications and email notifications.Notifications and comments in real time.Integrated model profile.Avatar profile.Easy integration with other applications Django of your project.Models registered in admin django for administrators.Support check user online.Support to English, Italian and Spanish languages.Validation of forms in real time with VueJs.API REST with django-rest-framework.Support Python 3.Custom configuration css.Markdown support in textarea.Authentication.Message for forums.Suggested Topics in topic.Close topic.Support to custom user model.Support to likes in topics and comments.Check if a user is a troll.Support Open Graph.Note 1:When a new record is added to the user model automatically added to your model profile.Configuration and installationDocumentationfor installation and configurationHow to use?Login in django admin and start to insert categories necessary. Example:The field position is for indicate the order of the categories.Insert the forum necessary: Example:Field more importants:Position: The field position is for indicate the order of the forums in the categories.Topics count: Total forum topics.Check topics: If you need to review the topics by a moderator.Add record to Model Configuration and configurate the forum (Css styles, logo forum, etc).Make sure that each user registration exist in the profile table.Execute in the terminal:python manage.py runserverVisit 127.0.0.1:8000/forums you should see the categories and forums.RoadmapRoadmapwith content of the next versions of django-musette.ContributeFork this repo and install itFollow PEP8, Style Guide for Python CodeWrite codeWrite unit testSend pull request
Package: django-music-publisher
Django-Music-Publisher (DMP) is open source software formanaging music metadata,registration/licencing of musical works,royalty managementandmusic data distribution.Home:https://dmp.matijakolaric.com/Docs:https://django-music-publisher.readthedocs.io/Code:https://github.com/matijakolaric-com/django-music-publisher/PYPI:https://pypi.org/project/django-music-publisher/
Package: django-mustache
django-mustacheA straightforward Mustache-powered template engine for Django, extracted fromwq.dband updated to support the newtemplate backendinfrastructure in Django 1.8 and newer.django-mustachefacilitatesprogressive enhancementby allowing you to share the same templates between Django and an offline-capable JavaScriptweb app.  Combined with a sharedURL structure, this approach ensures that each page in your site can be selectively rendered on theserver or on the clientas needed.A number of Pystache/Mustache backends for Django exist, though many are outdated.  Only this library provides all of the following:Full integration with existing Django context processors likedjango.template.context_processors.csrfanddjango.contrib.auth.context_processors.auth.*Full test suiteInstallable via PyPICompatible with Django 1.8 and newer*wq/app.jsprovides client-side equivalents for these context variables.Usagepip3installdjango-mustacheConfigure django-mustache like you would anytemplate backend:# myproject/settings.pyTEMPLATES=[{'BACKEND':'django_mustache.Mustache','DIRS':['...'],'APP_DIRS':False,'OPTIONS':{'context_processors':['...'],'partials_dir':'partials','file_extension':'html',}},# ...]The following configuration options are supported:context_processors: equivalent to the Django template backend setting.  The goal is to be able to use the same context processors for both Django and Mustache template backends.  (Let us know if you come across any compatibility issues.)partials_dir: If set, django-mustache will check each template directory for a subfolder containing Mustache partial templates.  The default partial folder name is 'partials'.  Set toFalseto disable this feature.file_extension: File extension to use when searching for templates and partials.  The default is '.html', which should not conflict with existing Django templates as long as completely separate directories are configured for Mustache templates.  Django views typically include the extension in the template name - this is taken into account when searching for templates.
Package: django-mutant
Dynamic model definition and alteration (evolving schemas).OverviewDjangoprovides a great ORM and with the power ofmigrationsone can easily perform schema alteration.However, some projects may requireruntimeschema alteration and that’s whatdjango-mutantprovides.The main concept was inspired by those projects:Will Hardydynamic-models’sdocumentationandtalk.And bydjango-dynamo.Installationpip install django-mutantMake sure'django.contrib.contenttypes'and'mutant'are in
yourINSTALLED_APPSINSTALLED_APPS += ('django.contrib.contenttypes', 'mutant')Migrating to django-mutant 0.2 and Django 1.7+If you usedmutantwith Django < 1.7 and are willing to migrate forward
you’ll have to run the following steps in order to make sure you database
schema is synchronized with Django’s migration state.Fake the initialmutantmigration.For everymutant.contribapplication you installed make sure to fake
their initial migration and run their following migration. For example,
if you had themutant.contrib.booleanapplication installed you want to
runmanage.py migrate boolean--fake0001 && manage.py migrate booleanResourcesDjangoCon Europe 2013 talkabout mutant and other dynamic model alternatives given by Juergen Schackmann.A getting started guidewith mutant guide by @integricho.Get in touch and contribute>From now on I think the best way to contribute and get in touch is using github messaging system (issues and pull requests).
Package: django-mutpy
Django integration for the mutation testing frameworkMutPy.MutPy is a mutation test framework for Python. It basically seeds a bug
into your code and then runs your unit tests to see if they find it.
Mutation testing helps to identify flaws in your tests. Because if your
tests can not uncover obvious bugs, they will also not uncover complex
ones.This Django app eases the integration of MutPy into your Django project.
It takes care of setting up the Django environment for the tests and
finding the unit tests and the production code.RequirementsPython >= 3.3MutPy >= 0.5.1InstallationFirst install the module.Eitherpip install django-mutpyor download the repository andgit clone https://github.com/phihos/django-mutpy.git
cd django-mutpy
python setup.py installThen add django_mutpy to the list of installed apps.INSTALLED_APPS=[...'django_mutpy',...]UsageRunpython manage.py muttest <app1> <app2> ... [--modules <list of modules to include>]
Package: django-mxit
Middleware for writing Mxit apps with Django.MIDDLEWARE_CLASSES = (
    ...
    'mxit.middleware.RemoteUserMiddleware',
    ...
)


AUTHENTICATION_BACKENDS = (
    ...
    'django.contrib.auth.backends.RemoteUserBackend',
    ...
)Hit it with the correct headers and you’ll be authenticated immediately:$ curl -XGET 'http://localhost:8000/' \
    -H 'X-Device-User-Agent: user-agent' \
    -H 'X-Mxit-CONTACT: contact' \
    -H 'X-Mxit-USERID-R: userid-r' \
    -H 'X-Mxit-NICK: nick' \
    -H 'X-Mxit-LOCATION: za,south africa,,,ct,cape town,,,,' \
    -H 'X-Mxit-PROFILE: en,za,01-01-2013,,,' \
    -H 'X-Mxit-USER-INPUT: &lt;b&gt;foo&lt;/b&gt;' \

{
  "username": "userid-r",
  "mxit": {
    "MXIT_NICK": "nick",
    "MXIT_PROFILE": {
      "gender": "",
      "date_of_birth": "01-01-2013",
      "tariff_plan": "",
      "country_code": "za",
      "language_code": "en"
    },
    "DEVICE_USER_AGENT": "user-agent",
    "MXIT_CONTACT": "contact",
    "MXIT_LOCATION": {
      "city": "cape town",
      "cell_id": "",
      "network_operator_id": "",
      "subdivision_code": "",
      "client_features_bitset": "",
      "country_code": "za",
      "subdivision_name": "",
      "country_name": "south africa",
      "city_code": "ct"
    },
    "MXIT_USER_INPUT": "<b>foo</b>",
    "MXIT_USERID_R": "userid-r"
  }
}
Package: django-mycli
django-mycliReplaces your existingmysqlcli for MySQL, MariaDB, and Percona withmycliwhich provides enhancements such as auto-completion and syntax highlighting. Visit theMyCLI websiteto learn more about the MyCLI client.InstallationTo install the package:$ pip install django-mycliAdddjango_myclito yourINSTALLED_APPSsetting in your settings.py file.INSTALLED_APPS = [
    ...,
    'django_mycli',
]UsageTo use themyclicommand with your project, call thedbshellcommand../manage.py dbshellHistory1.0.1 (2020-06-20)Updates to documentation1.0.0 (2020-06-19)Support for Django 2.2 LTS and aboveRemoved support for Python 3.4Add support for Python 3.80.0.1 (2015-08-01)Initial release.