Saravanan666/pypi-org huggingface dataset:
Package: django-mptt
This project is currently unmaintainedAlternatives to django-mptt include:django-treebeardincludes a MPTT
implementation (called a nested set), but the state of maintenance is unclear.Maybe you do not need MPTT, especially when using newer databases. Seedjango-tree-queriesfor an
implementation using recursive Common Table Expressions (CTE). See theannouncement blog post.django-mpttUtilities for implementing Modified Preorder Tree Traversal with your
Django Models and working with trees of Model instances.Project home:https://github.com/django-mptt/django-mptt/Documentation:https://django-mptt.readthedocs.io/Discussion group:https://groups.google.com/forum/#!forum/django-mptt-devWhat is Modified Preorder Tree Traversal?MPTT is a technique for storing hierarchical data in a database. The aim is to
make retrieval operations very efficient.The trade-off for this efficiency is that performing inserts and moving
items around the tree are more involved, as there’s some extra work
required to keep the tree structure in a good state at all times.Here are a few articles about MPTT to whet your appetite and provide
details about how the technique itself works:Trees in SQLStoring Hierarchical Data in a DatabaseManaging Hierarchical Data in MySQLWhat isdjango-mptt?django-mpttis a reusable Django app that aims to make it easy for you
to use MPTT with your own Django models.It takes care of the details of managing a database table as a tree
structure and provides tools for working with trees of model instances.RequirementsA supported version of Python:https://devguide.python.org/versions/#supported-versionsA supported version of Django:https://www.djangoproject.com/download/#supported-versionsFeature overviewSimple registration of models - fields required for tree structure will be
added automatically.The tree structure is automatically updated when you create or delete
model instances, or change an instance’s parent.Each level of the tree is automatically sorted by a field (or fields) of your
choice.New model methods are added to each registered model for:changing position in the treeretrieving ancestors, siblings, descendantscounting descendantsother tree-related operationsATreeManagermanager is added to all registered models. This provides
methods to:move nodes around a tree, or into a different treeinsert a node anywhere in a treerebuild the MPTT fields for the tree (useful when you do bulk updates
outside of Django)Form fieldsfor tree models.Utility functionsfor tree models.Template tags and filtersfor rendering trees.Admin classesfor visualizing and modifying trees in Django’s administration
interface.
Package: django-mptt2
django-mptt2Based on the idea of the unmaintaineddjango-mpttpackage i implemented this new code base to replace it.Cause no other package fits all of my use cases, which are primary in fast reading tree’s from the database, i started working on this project.There is an alternative to this package, calleddjango-treebeard, which implements nested sets as well, but without a parent foreignkey.Quick-StartInstall it as any other django app to your project:$pipinstalldjango-mptt2Adddjango-mptt2toINSTALLED_APPS:INSTALLED_APPS=[# other apps"mptt2"]Inheritance from the abstractmptt2.models.NodeModel:fromdjango.dbimportmodelsfrommptt2.modelsimportclassGenre(Node)name=models.CharField(max_length=50,unique=True)Adding nodes:fromproject.modelsimportGenrerock=Genre(name="Rock")rock.insert_at()# it will become the root node without target parametermetal=Genre(name="Metal")metal.insert_at(target=rock)# it will become the last child from rockalternative=Genre(name="Alternative")alternative.insert_at(target=rock)# it will become the last child from rock, the right sibling of metalFor full usage description, please read the tutorial section of ourdocumentation.
Package: django-mptt-autocomplete
Django Mptt Autocomplete Widget----------------------django-mptt-autocomplete provides a widget using the fancytree js library torender a forms.ChoiceField as a tree with selectable andcollapsable nodes with an autocomplete to search in existing tree.See included project 'treewidget' as an example. Widget is used inModelChoiceField and allows user to select single category.Requirements------------django, django-mptt, jquery, jquery-uiUsage-----::from mptt_autocomplete.widgets import FancyTreeWidgetcategories = Category.objects.order_by('tree_id', 'lft')class CategoryForm(forms.Form):categories = forms.ModelChoiceField(queryset=categories,widget=FancyTreeWidget(queryset=categories,model=Category))In this example Category is a model registered with django-mptt.Widget accepts **queryset** option, which expects pre-ordered queryset by"tree_id" and "lft".If you want to adjust tree data creation, you can define 'get_doc' method onyour model. Example:::def get_doc(self, values):doc = {"title": name, "key": self.pk}if str(self.pk) in values:doc['select'] = Truedoc['expand'] = Truereturn doc
Package: django-mptt-comments
writting…DocumentationThe full documentation is athttps://django-mptt-comments.readthedocs.io.QuickstartInstall django-mptt-comments:pip install django-mptt-commentsAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_mptt_comments.apps.DjangoMpttCommentsConfig',...)Add django-mptt-comments’s URL patterns:fromdjango_mptt_commentsimporturlsasdjango_mptt_comments_urlsurlpatterns=[...url(r'^',include(django_mptt_comments_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2018-07-14)First release on PyPI.
Package: django-mptt-simple-listfilters
django-mptt-simple-listfiltersProvides simple filters based on django-mptt's TreeRelatedFieldListFilter, e.g. ListFilterIgnoreLeafNodes and ListFilterLimitDepth.Installpipinstalldjango-mptt-simple-listfiltersProvide List FiltersListFilterIgnoreLeafNodesIgnore all leaf nodes.ListFilterLimitDepthOnly show roots in the filter list. You can create your own filter inherit from ListFilterLimitDepth and reset the max_depth value.ListFilterLimitDepth2ListFilterLimitDepth3ListFilterLimitDepth4These are shortcuts for ListFilterLimitDepth, and reset the max_depth value to 2, 3 and 4.UsageUse as TreeRelatedFieldListFilter.Releasesv0.1.1First release.v0.1.2Doc update.
Package: django-mqtt
django-mqttMQTT tools for Django projectUsageAdd"dmqtt"to yourINSTALLED_APPSAddMQTT_HOST,MQTT_USER,MQTT_PASS,MQTT_PORTRun withpython manage.py mqttfromdmqtt.signalsimportconnect,regex,topicfromdjango.dispatchimportreceiver@receiver(connect)defon_connect(sender,**kwargs):sender.subscribe("#")@topic("some/mqtt/topic")defsimple_topic(sender,topic,data,**kwargs):print(topic)print(data)@regex("^some/(?P<username>[^/]+)/(?P<device>[^/]+)$")defregex_topic(match,data,**kwargs):device=match.groupdict()print(device['username'],device['device])print(data)Authenticationmosquitto-go-authUsed withhttps://github.com/iegomez/mosquitto-go-auth# From example project urlsfromdjango.contribimportadminfromdjango.urlsimportinclude,pathurlpatterns=[path("mosquitto/",include("dmqtt.mosquitto")),path("account/",include(("django.contrib.auth.urls","auth"),namespace="auth")),path("admin/",admin.site.urls),]# mosquitto configuration
# https://github.com/iegomez/mosquitto-go-auth#http
auth_plugin /mosquitto/go-auth.so
auth_opt_backends http
auth_opt_check_prefix false

auth_opt_http_host example.com
auth_opt_http_getuser_uri /mosquitto/getuser
auth_opt_http_aclcheck_uri /mosquitto/aclcheck

# If using https
auth_opt_http_port 443
auth_opt_http_with_tls true
Package: django-mqueue
Django MqueueEvents queue application for Django. Features:Monitor models: models can be registered to autogenerate events on create/update/delete actionsExport events: save events to Redis or send them over websockets:books: Read thedocumentationExample:MEvent.objects.create(name="Test event",event_class="test",data={"k":"v"})Events can be linked to a model instance and a user instance.Real time events demoA websockets demo:django-mqueue-livefeedis availableDocumentationGet startedInstallBasicsEventsParametersFields autoguessQuery eventsModel eventsRegistered modelsWatchersPost processingModel callbacksHooksHooksRedisCentrifugoCustomExtraLivefeedLogs handlerGraphical settings
Package: django-mri
django_mriA django app to manage MRI data.Currently only supports data in theDICOMformat, and will soon also supportNIfTI.This app is being built and maintained as part of thepylabberproject.Quick startAdddjango_mrianddjango_dicomto your INSTALLED_APPS setting:INSTALLED_APPS=[...'django_dicom','django_mri',]Include the dicom URLconf in your project urls.py:path("api/",include("django_mri.urls",namespace="mri")),# Optional:path("api/",include("django_dicom.urls",namespace="dicom")),# if you would like to also expose the django_dicom API.Runpython manage.py migrateto create the dicom models.Start the development server and visithttp://127.0.0.1:8000/admin/.Visithttp://127.0.0.1:8000/mri/.
Package: django-msgpackfield
django-msgpackfieldProvides a binary django model field with automatic serialization/deserialization
of native Python structures into/fromMsgPackformat.It also comes with a form widget, basically a<TEXTAREA>where data can be
input in JSON. This data is then converted to MsgPack when the form is submitted.RequirementsPython 3.4+Django 1.8+ (tested with 1.8-3.0)msgpack-pythonInstallationInstall it withpip(oreasy_install) :pip3 install django-msgpackfieldUsageTypical usage in a Django model:fromdjango.dbimportmodelsfrommsgpackfieldimportMsgPackFieldclassMyModel(models.Model):data=MsgPackField(null=True,blank=True)obj=MyModel()obj.data={'foo':1,'bar':2,'baz':[1,2,3,4,5]}obj.save()
Package: django-msgpack-serializer
Provides amsgpackserializer/deserializer for Django models instances.InstallationAdd the modulemsgpack_serializer.serializerto yourSERIALIZATION_MODULESsetting:SERIALIZATION_MODULES = {
    "msgpack" : "msgpack_serializer.serializer",
}UsageTo serialize:from django.core import serializers

msgpack_serializer = serializers.get_serializer("msgpack")()
data = msgpack_serializer.serialize(my_objects)  # returns bytesTo deserialize:from django.core import serializers

deserialized_objects = serializers.deserialize('msgpack', data)
objs = [deserialized.object for deserialized in deserialized_objects]
Package: django-msgs
Django MSGSThis small framework provides you with a set of flexible tools for implementing the message sending functionality.Any type of informational messaging are available: emails, sms, telegram...Installationpip install django-msgssettings.py:INSTALLED_APPS = [
...
'msgs',
]Apply the migrations for creation the tables at your database:./manage.py migrate msgsStructureDjango MSGS contains two common data models: Message and Template. The first one stores your messages, the second
one describes the messaging templates.If you need new type of email, you should create new Tpl with the HTML inside. After that you can use it for sending
messages with this template.By default Django MSGS provide you with three proxy models:Email,SMSandMessage. You can customize them on your taste.Also you can find a template model for any type of message:EmailTemplate,SMSTemplateandMessageTemplate.Quick exampleLook at the admin interface and create some templates for your messages.Now we can use them for sending messages:frommsgs.modelsimportEmailtemplate_key='registration'# a unique key for search the templateEmail.create(template=template_key,recipient='john.doe@example.com',context={'name':'John Doe','link':'https://example.com/registration',},).send()If you need i18n options, you can just inherit the existing template models with adding the
needed language fields and use thesendmethod with a language prefix as you need.Let's look at the one more very useful attribute --related_to. This library uses a generic foreign key for linking messages with another objects. You should provide this object when you create a message.frommsgs.modelsimportSMSinstance=new_user# this is an object you want to link with the emailSMS.create(template='registration',recipient='1234567890',context={'name':'John Doe','link':'https://example.com/registration',},related_to=instance,# it does the trick).send()ProvidersThe Django MSGS works with multiple providers. All of them are placed at theprovidersfolder.
So you can discover them and choose what you need.You can find theBaseProviderclass, hence nobody can stop you to build your own provider.SettingsMSGS={'providers':{'sendgrid':{'backend':'msgs.providers.sendgrid.SendgridProvider',# use SendGrid Provider'options':{'is_active':True,# turn on/off sending messages'api_key':'api-key','sender':'sender@email.com',},},'telegram':{'backend':'msgs.providers.telegram.TelegramProvider','options':{'is_active':False,'token':'telegram-bot-token','chat':'chat-id',},},},'options':{'default_language':'en',},'development':'telegram',# what use on development (not works properly, be careful)'email':'sendgrid',# use SendGrid Provider for sending emails'sms':'telegram',# use Telegram Provider for sending sms}
Package: django-msms-admin
pip install django-msms-adminIntelligent management for multiple subclass models in django's admin site.Installpipinstalldjango-msms-adminInstalled ClassesDjangoMsmsModelAbstractBaseThe base model must inherit from DjangoMsmsModelAbstractBase class. It provides app_label, model_name, type_name fields and auto save the values.DjangoMsmsAdminThe base model admin must inherit from DjangoMsmsAdmin class.DjangoSubclassAdminAll subclass models' admin must inherit from DjangoSubclassAdmin class.ConfigurationsDjangoMsmsAdmin.subclassesThe config item is used to provide choices inselect_subclass_model_view. If NOT provide, the system will auto find all registered subclasses. The structure of subclasses is a three-level-tree. e.g.subclasses=[{"title":"category1","children":[{"title":"category11","children: [Model1,Model2,Model3,]},{"title":"category12","children":[Model4,Model5,Model6,]}]},{"title":"category2","children":[{"title":"category21","children":[Model7,Model8,]},{"title":"category22,"children":[Model9,]}]}]DjangoMsmsModelAbstractBase.cascade_select_descriptionDjangoMsmsModelAbstractBase.cascade_select_imageConfig item cascade_select_description and cascade_select_image are use to display more information while you selected a subclass. cascade_select_image is url string of an image.Usagepro/settings.pyINSTALLED_APPS=[...'django_simple_tags','django_static_jquery3','django_msms_admin',...]app/model.pyfromdjango.dbimportmodelsfromdjango.contrib.staticfiles.templatetags.staticfilesimportstaticfromdjango_msms_admin.modelsimportDjangoMsmsModelAbstractBaseclassBook(DjangoMsmsModelAbstractBase,models.Model):title=models.CharField(max_length=64)author=models.CharField(max_length=64)def__str__(self):returnself.titleclassComputerBook(Book):serial=models.CharField(max_length=64)cascade_select_description="These books are all about computers."cascade_select_image=static("app/img/computer-book.jpg")classNovelBook(Book):country=models.CharField(max_length=64)app/admin.pyfromdjango.contribimportadminfromdjango_msms_admin.adminimportDjangoMsmsAdminfromdjango_msms_admin.adminimportDjangoSubclassAdminfrom.modelsimportBookfrom.modelsimportComputerBookfrom.modelsimportNovelBookclassBookAdmin(DjangoMsmsAdmin,admin.ModelAdmin):list_display=["title","author","type_name"]list_filter=["type_name"]admin.site.register(Book,BookAdmin)admin.site.register(ComputerBook,DjangoSubclassAdmin)admin.site.register(NovelBook,DjangoSubclassAdmin)Releasev0.1.0 2020/03/03First release.v0.1.1 2020/03/05Add DjangoMsmsModelAbstractBase.get_real_object method.v0.1.2 2020/03/06Fix keywords in setup.py and read requirements.txt for install_requires.v0.2.0 2020/03/07Use model's msms_category, msm_priority property to do model category and sorting.Rename cascade_select_description to msms_description.Rename cascade_select_preview_image to msms_image.v0.2.1 2020/09/09No depends on django-static-jquery3.Using media.css & media.js to render css/js links.Add LICENSE file.v0.2.2 2023/09/18Doc update.
Package: django-mssql
Django-mssqlprovies a Django database backend for Microsoft SQL Server.Documentation is available atdjango-mssql.readthedocs.org.RequirementsPython 2.7, 3.4PyWin32SQL Server Management Studio or Microsoft Data Access Components (MDAC)SQL Server VersionsSupported Versions:2012SQL 2008/2008r2 are support by django-mssql 1.6.x.Django VersionDjango 1.8django-mssql 1.7 supports Django 1.7.
django-mssql 1.6 supports Django 1.6.
django-mssql 1.4 supports Django 1.4 and 1.5.ReferencesDjango-mssql on PyPi:http://pypi.python.org/pypi/django-mssqlDB-API 2.0 specification:http://www.python.org/dev/peps/pep-0249/
Package: django-mssql-backend-aad
django-mssql-backend-aadis a fork ofdjango-mssql-backendto add support for AAD (backported changes fromdjango-azure-sql-backend),
and Azure MSIThis package is not being actively maintain. Use only as referenceDependenciesDjango 2.2 or newerpyodbc 3.0 or newermsal 1.5.1 or newerInstallationInstall pyodbc and DjangoInstall django-mssql-backendpip install django-mssql-backend-aadNow you can point theENGINEsetting in the settings file used by
your Django application or project to the'sql_server.pyodbc'module path'ENGINE': 'sql_server.pyodbc'ConfigurationAAD ExampleDATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'mydb',
        'HOST': 'myserver.database.windows.net',
        'PORT': '',
        'AAD-AUTH': {
            'tenant_id': '02a2e49f-b581-45c4-84a9-bdee0198b26f',
            'client_id': '818979f8-a731-48d9-bf42-b00a04e1e618',
            'secret': "MY_SUPER_SECRET",
        },
        'OPTIONS': {
            'driver': 'ODBC Driver 13 for SQL Server',
        },
    },
}

# set this to False if you want to turn off pyodbc's connection pooling
DATABASE_CONNECTION_POOLING = FalseMSI ExampleDATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'mydb',
        'HOST': 'myserver.database.windows.net',
        'PORT': '',
        'MSI-AUTH': 'True',
        'OPTIONS': {
            'driver': 'ODBC Driver 13 for SQL Server',
        },
    },
}

# set this to False if you want to turn off pyodbc's connection pooling
DATABASE_CONNECTION_POOLING = FalseFor additional usage and installation instructions, please refer to:
-https://pypi.org/project/django-mssql-backend-https://github.com/langholz/django-azure-sql-backend
Package: django-mstats
Please note:Django MStats is in early development and the API is very likely to change.MStats is a super simple, re-usable, stateless Django app for visualizing and browsing statistics, mainly
based on existing Django models.My motivation for creating MStats is to have a dead simple way, with as little effort as possible, to get
visualization of key metrics in different Django projects.The goal of Django MStats isnotto be the ultimate metrics/statistics solution™. It will not support
different backends for different Metrics services and databases. MStats makes all queries in real-time,
and does not store any permanent data itself, even though Django’s cache might be used.In other words, Django MStats is a reusable app for those who want to get basic statistics browsing with
minimum effort. Since MStats is stateless, it can easily be tested out, and thrown away in favor of
something more advanced, if a project grow out of it.What does M in Mstats stand for?Model or Mini. Whichever you like best.RequirementsCurrently MStats depends on PostgreSQL, because it uses a Postgres specific SQL functions for retrieving
stats.InstallationInstall from PyPI:pip install django-mstatsAdd django_mstats to INSTALLED_APPSAdd URL route to your urls.py:url(r"^mstats/", include("django_mstats.urls")),Createmstats.pyfile(s) in your Django apps (see below).Defining different metricsOnce you have added django_mstats to your INSTALLED_APPS, you can create mstats.py files within your
Django apps. In those files you should create classes that inherits from ModelStats. Below are some
examples.Statistics for newly registered users:from django_mstats.models import ModelStats
from django.contrib.auth.models import User

class NewUsers(ModelStats):
    model = User
    datetime_field = "date_joined"Specifying a name:class NewUsers(ModelStats):
    model = User
    datetime_field = "date_joined"
    name = "User registrations"AuthorDjango-MStats is developed byJonatan Heyman.LicenseBSD License
Package: django-ms-utils
Django MS Utils is a collection of useful classes, templates, templatetags for
Django.RequirementsPython: >=3.5Django: >=1.11InstallationInstall using pip:pipinstalldjango-ms-utilsThen add'ms_utils'to yourINSTALLED_APPS.INSTALLED_APPS=[...'ms_utils',]Finally add'ms_utils'urls:urlpatterns=[...url(r'^ms-utils/',include('ms_utils.urls')),]UsageUse the source, Luke!
Package: django-muckraking
Django Muckraking=================A collection of various Django utilities. It includes:Middleware----------:code:`muckraking.middleware.SpacelessMiddleware`Removes spaces and line breaks between html tags. Leaves <script> blocks intact:code:`muckraking.middleware.LegacyURLRedirectMiddleware`An apache-like approach to redirects.Specify your redirects in settings.py like this::LEGACY_URL_REDIRECTS = ((r'^/about/news-events\.php(.+)?', '/news-events/$1',),(r'^/about/(?!index\.php)', '/about/',),)Template Context Processors---------------------------:code:`muckraking.template.context_processors.debug_context`Add a :code:`{{ DEBUG }}` variable Django templates. The value is a booleanStandard Template Tags----------------------To use the following tags, add :code:`{% load muckraking_tags %}` to your template.:code:`{% version_hash %}`Outputs either the Git HEAD commit hash, or a hash of the atime value of the Django settings module. It first tries to output the Git commit hash. If unsuccessful, it falls back to the settings module file time hash.:code:`{% git_commit_hash %}`Outputs the commit hash of the HEAD commit in a git repo. Useful for cache-busting strings.:code:`{% settings_file_time_hash %}`Outputs a hash of the atime meta value of the Django settings module file. Useful for cache-busting strings.Django CMS Template Tags------------------------To use the following tags, add :code:`{% load muckraking_cms_tags %}` to your template.:code:`{% page_url_by_slug "foobar-page" %}`Allows you to perform reverse lookups on pages by slug::Management Commands-------------------import_redirectsAllows you to import a csv file of redirect urls into the redicet app::./manage.py import_redirects ~/path/to/redirects.csv