Saravanan666/pypi-org huggingface dataset:
Package: django-mjml
django-mjmlThe simplest way to useMJMLinDjangotemplates.InstallationRequirements:Djangofrom 2.2 to 5.0requestsfrom 2.24.0 (only if you are going to use API HTTP-server for rendering)mjmlfrom 3.6.3 to 4.14.11. Installmjml.Followhttps://github.com/mjmlio/mjml#installationandhttps://documentation.mjml.io/#installationto get more info.2. Installdjango-mjml.$ pip install django-mjmlIf you want to use API HTTP-server you also needrequests(at least version 2.24):$ pip install django-mjml[requests]To install development version usegit+https://github.com/liminspace/django-mjml.git@maininsteaddjango-mjml.3. Set upsettings.pyin your django project.INSTALLED_APPS = (
  ...,
  'mjml',
)UsageLoadmjmlin your django template and usemjmltag that will compile MJML to HTML:{% load mjml %}

{% mjml %}
    <mjml>
        <mj-body>
            <mj-section>
                <mj-column>
                    <mj-text>Hello world!</mj-text>
                </mj-column>
            </mj-section>
        </mj-body>
    </mjml>
{% endmjml %}Advanced settingsThere are three backend modes for compiling:cmd,tcpserverandhttpserver.cmd modeThis mode is very simple, slow and used by default.Configure your Django:MJML_BACKEND_MODE = 'cmd'
MJML_EXEC_CMD = 'mjml'You can changeMJML_EXEC_CMDand set path to executablemjmlfile, for example:MJML_EXEC_CMD = '/home/user/node_modules/.bin/mjml'Also you can pass addition cmd arguments, for example:MJML_EXEC_CMD = ['node_modules/.bin/mjml', '--config.minify', 'true', '--config.validationLevel', 'strict']Once you have a working installation, you can skip the sanity check on startup to speed things up:MJML_CHECK_CMD_ON_STARTUP = Falsetcpserver modeThis mode is faster thancmdbut it needs theMJML TCP-Server.Configure your Django:MJML_BACKEND_MODE = 'tcpserver'
MJML_TCPSERVERS = [
    ('127.0.0.1', 28101),  # the host and port of MJML TCP-Server
]You can set several servers and a random one will be used:MJML_TCPSERVERS = [
    ('127.0.0.1', 28101),
    ('127.0.0.1', 28102),
    ('127.0.0.1', 28103),
]httpserver modedon’t forget to installrequeststo use this mode.This mode is faster thancmdand a bit slower thantcpserver, but you can use official MJML APIhttps://mjml.io/apior run your own HTTP-server (for examplehttps://github.com/danihodovic/mjml-server) to render templates.Configure your Django:MJML_BACKEND_MODE = 'httpserver'
MJML_HTTPSERVERS = [
    {
        'URL': 'https://api.mjml.io/v1/render',  # official MJML API
        'HTTP_AUTH': ('<Application ID>', '<Secret Key>'),
    },
    {
        'URL': 'http://127.0.0.1:38101/v1/render',  # your own HTTP-server
    },
]You can set one or more servers and a random one will be used.
Package: django-mkadmin
Django-mkadmin==============Modifies the stock Django-Administration interface to fit my ideas a littlebit better.MKADMIN_CREATE = ['blog.Post',# 'blog',  # Take all models from the blog app.'chet.Album',]MKADMIN_DASHBOARD = [('mkweb.mkadmin.AtAGlance', {'models': ['blog.Post', 'chet.Album', 'chet.Photo'],}),('mkweb.mkadmin.AllApps', {}),('mkweb.mkadmin.RecentActions', {}),('mkweb.mkadmin.QuickDraft', {}),('mkweb.mkadmin.Feed', {'url': 'http://www.feinheit.ch/news/feed/',}),]
Package: django-mksuperuser
Django app for lazy people.
Creates superuser with no fuss.loginadminpasswordadminInstallationInstall from pip:pip install django-mksuperuserAdd package to INSTALLED_APPS.:INSTALLED_APPS += ('django_mksuperuser',)When you create new Django project and syncdb or migrate (depending on version)
new admin user is created with login ‘admin’ and password ‘admin’.
For all the lazy people!:Django 1.7 > python manage.py migrate
Django 1.7 < python manage.py syncdb --noinput
Package: django-mlcommenting
Multi-Language-CommentingA commenting system for a multi language purpose. It takes use of the Google Services to detect and translate comments.QuickstartInstall withpipinstalldjango-mlcommetingAdd it to yourINSTALLED_APPS:INSTALLED_APPS=('django_mlcommenting',)Add Multi-Language-Commenting 's URL patterns:.. code-block:: pythonfromdjango_mlcommentingimporturlsasdjango_mlcommenting_urlsfromdjango.conf.urlsimporturl,includeurlpatterns=[url(r'^',include(django_mlcommenting_urls)),]Requirements{% load staticfiles %}

    <!-- main css -->
    <link rel="stylesheet" type="text/css" href="
        {% static 'django_mlcommenting/css/django_mlcommenting.css' %}
    ">

    <!-- Material Icons -->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
    rel="stylesheet">

    <!-- JQuery -->
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"
    integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
    crossorigin="anonymous"></script>

    <!-- Body bottom -->
    <script src="{% static 'django_mlcommenting/js/django_mlcommenting.js' %}"></script>ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriateLicenseMIT
Package: django-ml_markdown
This django app provides some features for handling markdown in yout
django based website:template_tags for parsing Markdown code to html and cleaning itA form field for editing markdown code and preview the html outputInstallationDependenciesThis app usemisaka, a binding for
hoedown that use CFFI. You may need to install some package in order to
build cffiOn fedora (adapt for your on system or the version of python you xant to
use)dnfinstalllibffi-develpython3-devel# on fedora, you may need to install thisdnfinstallredhat-rpm-configThe actual installationJust install it with pippipinstalldjango-ml_markdownUsagesettings.pyAdd the path to the configuration class in INSTALLED_APPSINSTALLED_APP.append('ml_markdown.apps.MlMarkdownConfig')you can also inherit this class for custom settings. See the
documentation for details.Use in templatesYou can use one of this filters in your templates:to_html: parse markdown code to html without cleaning it.clean: clean html code with the white list provides as arguments
or in the class used for configurationto_cleaned_html: shortcut for| to_html | cleanSome over filter can be found in the documentation.
Package: djangomni-search
djangomni-searchDjango Admin Site extension, that allows searching all entities from single
fieldInstallationPlease read the instructions carefully, extending Django Admin on this level
can go wrong very easily.1. Pip your depsBasically, install the dependency. You can usepoetry, or any other package
manager.pipinstalldjangomni-search2. Putdjangomni_searchintoINSTALLED_APPSIt is important to put it on the top.INSTALLED_APPS=['djangomni_search','django.contrib.admin','django.contrib.auth','...',]3. Configure Admin SiteNow you will need to configure your Admin Site(s) to inherit fromdjangomni_search.admin.OmniSearchAdminSite. If you're using the defaultAdminSite, you mustcreate a custom
one.classSiteAdmin(OmniSearchAdminSite,AdminSite):...4. Extend your custombase_site.htmlIf you do not have a custombase_site.html, it should already work. In case you have done some customizations to your base site file, you will need to add one script to all pages in admin. This can be only done by
extending the base template.{% block extrahead %}
{% if omni_search %}
  <link
    href="{% static 'djangomni-search/main.css' %}"
    rel="stylesheet"
    type="text/css"
  />
  <script
    data-config="{{omni_search}}"
    id="djangomni-search"
    src="{% static 'djangomni-search/main.js' %}"
  ></script>
{% endif %}
{% endblock %}5. Configure autocompleteThe Omni Search looks for data using theautocomplete_fieldsattribute ofModelAdmin. Configure it for all the models, that you want to search.ExamplesGo to the../dev-siteimplementation, it serves as example page.
Package: django-moat
django-moat is a mini-app adds an additional layer of authentication via HTTP
Basic Auth. It’s primary use case is to prevent access staging, development, or
otherwise private sites on the public internet. It is equivalent to configuring
Basic Auth on your webserver (Apache, nginx) but works in environments where
that is not possible (heroku).InstallationFrom PyPipip install django-moatTo install from sourcepip install -e git+https://github.com/amrox/django-moat#egg=django-moatConfigurationAddmoat.middleware.MoatMiddlewareto yourMIDDLEWARE_CLASSES:MIDDLEWARE_CLASSES = (
    # Existing middleware classes
    "moat.middleware.MoatMiddleware",
)moathas several configuration variable you may put in yoursettings.pyMOAT_ENABLEDEnable or disablemoat. (True or False)MOAT_ENABLED = TrueHTTP_AUTH_REALMSet Basic Auth RealmHTTP_AUTH_REALM = ‘App Staging’MOAT_ALWAYS_ALLOW_VIEWSA list of views to allow throughmoatMOAT_ALWAYS_ALLOW_VIEWS = [‘myapp.views.home’]MOAT_ALWAYS_ALLOW_MODULESA list of modules to allow throughmoatMOAT_ALWAYS_ALLOW_MODULES = [‘oauth_provider.views’]MOAT_ALLOW_ADMINLet the admin site throughmoat. Default:False.MOAT_ALLOW_ADMIN = TrueMOAT_DEBUG_DISABLE_HTTPSDisable HTTPS.For testing purposes only.Don’t ship with this on.MOAT_DEBUG_DISABLE_HTTPS = TrueFinally you may want to set theSESSION_EXPIRE_AT_BROWSER_CLOSEsetting.UsageYour site now requires that your authenticate with a staff-level user before
accessing any non-whitelisted view. It is recommended that your add a dedicate
staff-level user in the django admin for moat authentication.By default, the admin views will be blocked bymoat. You’ll either need to
create a user withdjango-admin.py, or setMOAT_ALLOW_ADMINtoTrue.AcknowledgementsCode borrowed from:http://djangosnippets.org/snippets/1720/https://github.com/pragmaticbadger/django-privatebetaThanks toRyan Balfanzfor suggesting the namemoat.
Package: django-mobi
Author: Ken CochraneFork of: http://minidetector.googlecode.comFork Description: I reorganized the code, added caching, and made a few tweaks here and there.Description: Django middleware and view decorator to detect phones and small-screen devicesVersion: 0.1.7Last Update: 11/17/2013Requirements:-------------Django 1.1 or newerDjango caching to be enabled if you want to cache the objectsHow to use:-----------Using django-mobi is very simple. Simply place the mobi package into your project's path, and then do one of the following:Using the mobi.MobileDetectionMiddleware Middleware---------------------------------------------------This middleware will scan all incoming requests to see if it is a mobile device. If it is it will set the request.mobile property to True.To use all you have to do is add mobi.MobileDetectionMiddleware to your MIDDLEWARE_CLASSES tuple in your settings.pyThen in your view you can check request.mobile - if it's True then treat it like a small screen device. If it's False then it's probably a desktop browser, or a spider or something else.If you want to have some items not triggered by the middleware (for example iPad) then add a settings called MOBI_USER_AGENT_IGNORE_LIST and add the item to the list.MOBI_USER_AGENT_IGNORE_LIST = ['ipad',]If you want to distinguish tablet devices from phones, then set MOBI_DETECT_TABLET = True and use request.tablet attribute{% if not request.mobile or request.tablet %}<p>This section enabled only for descktop and tablets</p>{% endif %}Using the mobi.MobileRedirectMiddleware Middleware---------------------------------------------------This middleware will scan all incoming requests to see if it is a mobile device, if so it will redirect the request to a different URL. This is good if you want to force all mobile traffic to a mobile only version of your site.To use all you have to do is add mobi.MobileRedirectMiddleware to your MIDDLEWARE_CLASSES tuple in your settings.py, and also add MOBI_REDIRECT_URL = "http://example.mobi" where http://example.mobi is the website you want to redirect all mobile traffic.Not using the Middleware------------------------If you only have certain views that need the distinction, you can choose not to search every request you receive. All you need to do is wrap the relevant views like this:from mobi.decorators import detect_mobile@detect_mobiledef my_mobile_view(request):if request.mobile:#do something with mobile
Package: django-mobi2
Author: Ken CochraneFork of: http://minidetector.googlecode.comFork Description: I reorganized the code, added caching, and made a few tweaks here and there.Description: Django middleware and view decorator to detect phones and small-screen devicesVersion: 0.1.7Last Update: 11/17/2013Requirements:-------------Django 1.1 or newerDjango caching to be enabled if you want to cache the objectsHow to use:-----------Using django-mobi is very simple. Simply place the mobi package into your project's path, and then do one of the following:Using the mobi.middleware.MobileDetectionMiddleware Middleware---------------------------------------------------This middleware will scan all incoming requests to see if it is a mobile device. If it is it will set the request.mobile property to True.To use all you have to do is `add mobi.middleware.MobileDetectionMiddleware` to your `MIDDLEWARE_CLASSES` tuple in your `settings.py`Then in your view you can check request.mobile - if it's True then treat it like a small screen device. If it's False then it's probably a desktop browser, or a spider or something else.If you want to have some items not triggered by the middleware (for example iPad) then add a settings called MOBI_USER_AGENT_IGNORE_LIST and add the item to the list.MOBI_USER_AGENT_IGNORE_LIST = ['ipad',]If you want to distinguish tablet devices from phones, then set MOBI_DETECT_TABLET = True and use request.tablet attribute{% if not request.mobile or request.tablet %}<p>This section enabled only for descktop and tablets</p>{% endif %}Using the mobi.middleware.MobileRedirectMiddleware Middleware---------------------------------------------------This middleware will scan all incoming requests to see if it is a mobile device, if so it will redirect the request to a different URL. This is good if you want to force all mobile traffic to a mobile only version of your site.To use all you have to do is add `mobi.middleware.MobileRedirectMiddleware` to your `MIDDLEWARE_CLASSES` tuple in your `settings.py`, and also add MOBI_REDIRECT_URL = "http://example.mobi" where http://example.mobi is the website you want to redirect all mobile traffic.Not using the Middleware------------------------If you only have certain views that need the distinction, you can choose not to search every request you receive. All you need to do is wrap the relevant views like this:from mobi.decorators import detect_mobile@detect_mobiledef my_mobile_view(request):if request.mobile:#do something with mobile
Package: django-mobiclicks
django-mobiclicks v.0.1=======================Requirements------------If a custom user model is used, it needs to have a datetime ``date_joined`` field. This is used to determine if a user is new or not. Check setup.py for other requirements.Settings--------- ``CPA_TOKEN_PARAMETER_NAME``: the name of the querystring parameter that contains the CPA token. Default is 'cpa'.- ``CPA_TOKEN_SESSION_KEY``: the name of the Django session key used to store the CPA token. Default is 'mobiclicks_cpatoken'.- ``CPA_SECURITY_TOKEN``: the security token provided by MobiClicks. This setting is required.- ``CLICK_REF_PARAMETER_NAME``: the name of the querystring parameter that contains the click ref value. Default is 'pollen8_click_ref'.- ``ACQUISITION_TRACKING_URL``: the MobiClicks URL that acquisitions are posted to. Default is 'http://t.mobiclicksdirect.com/acquisition'.- ``CLICK_CONFIRMATION_URL``: the MobiClicks URL that click confirmation is posted to. Default is 'http://t.mobiclicksdirect.com/advertiser'.- ``TRACK_REGISTRATIONS``: track registration conversions via MobiClicks. Default is 'True'.- ``CONFIRM_CLICKS``: track a user landing on the site from an ad via MobiClicks. Default is 'True'.Authors=======#. Rizmari VersfeldChangelog=========0.1 (28-11-2013)----------------#. Initial release
Package: django-mobile-app-version
django-mobile-app-versionQuick startInstall the packagepipinstalldjango-mobile-app-versionAdd'mobile_app_version.apps.MobileAppVersionConfig'to yourINSTALLED_APPSinsettings.pymodule:INSTALLED_APPS=[...'mobile_app_version.apps.MobileAppVersionConfig',]Include the Mobile App Version URLconf in your projectsurls.pylike this:path('app-versions', include('mobile_app_version')),Runpython manage.py migrate mobile_app_versionto create the tables of app in your database. if you clone this app
directly in your project and have some changes on application models you should first runpyhton manage.py makemigrations mobile_app_versionand then migrate models.
Package: django_mobile_auth
# Introduction #A Django app that allows users to authenticate using email, phone number or username.## Installation ##1. Install package:pip install django_mobile_auth2. Add mobile_auth app to INSTALLED_APPS in your django settings.py:INSTALLED_APPS = ('mobile_auth',...)Note: Add it before django.contrib.auth if you want to use the custom createsuperuser command with support to email and phone.3. On you django settings, set the AUTH_USER_MODEL and AUTHENTICATION_BACKENDS to:AUTH_USER_MODEL = 'mobile_auth.MobileUser'AUTHENTICATION_BACKENDS = ['mobile_auth.backends.MobileAuthBackend',]## Releases ##- 0.2.7: Replace fields first_name and last_name with just name. The migration were reset back to 001. Please check it before updating.
Package: django-mobile-detect
Django Mobile DetectorMobile Detect is a lightweight Python package for detecting mobile devices (including tablets).
It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.PHPthis package development based from php big repositoryMobile-DetectInstallationPython package install:pip install django-mobile-detectAdd`mobiledetect`to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'mobiledetect',
]Middleware:MIDDLEWARE_CLASSES = (
    '...',
    'mobiledetect.middleware.DetectMiddleware',
    '...'
)View UsageYou can use in viewsCheck if the device is mobile.request.device.is_mobileCheck if the device is a tablet.request.device.is_tablet
Package: django-mobile-detector
A small Django application to detect mobile browsers.Provides a template context processor so your templates can always
know if the user happens to be viewing your site from a mobile
browser. The detection is crude, and user agents are always changing.I’m just creating this project for a simple app I have on a personal
project that doesn’t really matter if we get the detection right or wrong.
I’m mostly just concerned about finding android or iphone.By Default, there will be a cookie set called “use_mobile” and the
value will be true or false depending on whether you want the mobile
view or desktop view. If you want to change the cookie name, change the
MOBILE_COOKIE_NAME setting.
Package: django-mobileesp
settings.pyMIDDLEWARE_CLASSES = (
    ...
    'django_mobileesp.middleware.UserAgentDetectionMiddleware'
)

from django_mobileesp.detector import mobileesp_agent as agent

DETECT_USER_AGENTS = {
    'is_android': agent.detectAndroid,
    'is_ios': agent.detectIos,
    'is_windows_phone': agent.detectWindowsPhone,
    'is_mobile': agent.detectTierTablet | \
                      agent.detectTierIphone | \
                      agent.detectMobileQuick,
}If you prefer more pythonic methods, you can user a wrapper agent as follows:from django_mobileesp.detector import python_agent as agent

DETECT_USER_AGENTS = {
    'is_android': agent.detect_android,
    'is_ios': agent.detect_ios,
    'is_windows_phone': agent.detect_windows_phone,
    'is_mobile': agent.detect_tier_tablet | \
                      agent.detect_tier_iphone | \
                      agent.detect_mobile_quick,
}Finally access the defined attributes in your views:def view(request):
    if request.is_mobile:
        ...
Package: django-mobile-redirect
Django middleware to redirect mobile devices to the given url.Installation and ConfigurationInstall with pip:pip install ...Add the following to Django settings:MIDDLEWARE_CLASSES = [
  'mobile_redirect.middleware.MobileRedirectMiddleware',
]

'MOBILE_REDIRECT_URL' = 'https://github.com/ryanbagwell/django-mobile-redirect'Requests with user agent strings matching mobile and tablet devices will be
redirected to the specified urlMobile and tablet devices are defined according to the data atbrowscap.org.
Package: django-mobile-template
Simple django app that dynamically changetemplate_nameof your view based on domain name
(e.g example.com and m.example.com).Useful in case if you already have third party service that redirects to the mobile version of your site.Installationpipinstalldjango-mobile-template# ORpipinstallgit+https://github.com/linevich/django-mobile-template.gitINSTALLED_APPS=[...'mobile_template',...]UsagePlease note:MobileTemplateViewshould befirst parent class.# views.pyfromdjango.views.genericimportTemplateViewfrommobile_template.viewsimportMobileTemplateViewclassHome(MobileTemplateView,TemplateView):template_name='index.html'Templates folder structure:templates
├── base.html
├── index.html
└── mobile
    └── index.htmlConfigurationMOBILE_TEMPLATES_PREFIX(Default:mobile/) — mobile templates subfolder.MOBILE_DOMAIN_REGEX(Default:^m.\.*.\.*.*') — regular expression to capture mobile domains.
By default it captures all domains started with m.<domain_or_subdomain>.
Package: django-mobile-views
django-mobile-views is a simple app to help detect mobile browsers
and serve a different template for them.It works by inspecting the user agent.To use, either use one of the mobile generic views, or add the MobileMixin
to your class based view.from mobile_views.generic_views import MobileTemplateViewclass HomePage(MobileTemplateView):template_name = ‘myapp/home_page.html’
mobile_template_name = ‘myapp/mobile_home_page.html’And that’s it!There is also a ‘FullSiteView’ provided that when accessed will set a cookie
to prevent being served the mobile template. The cookie lasts until browser close.
Package: django-mobilvest
django-mobilvest===============https://bitbucket.org/ir4y/django-mobilvestWhat's that-----------*django-mobilvest is a application for sending sms over mobilvest.ru web gateDependence------------ `django-celery` # for sending async request- `pycurl` # for http communicationGetting started---------------* Install django-mobilvest:``pip install -e https://bitbucket.org/ir4y/django-mobilvest#egg=django-mobilvest``* Add `'mobilvest'` to INSTALLED_APPS.* Add MOBILVEST_USER and MOBILVEST_PASSWORD to your settings file