Saravanan666/pypi-org huggingface dataset:
Package: django-languageselect
django_languageselectSimple language select as custom template tagRequirements“django.middleware.locale.LocaleMiddleware” in MIDDLEWARE_CLASSES / MIDDLEWARE“django.core.context_processors.request” in TEMPLATE_CONTEXT_PROCESSORS / TEMPLATES[‘OPTIONS’][‘context_processors’]Add ‘django_languageselect’, to INSTALLED_APPSUsage:{% load languageselect %}
{% languageselect %}Routes:The only url provided by this application is “languageselect_index”. Required GET-parameter is “language”, optional GET-parameter is “next”. Next contains the named url to redirect after the language change. This parameter is pre-filled with the current page url.
CustomizationFeel free to use your own template, just add languageselect/layer.htmlFree software: MIT licenseDocumentation:https://django-languageselect.readthedocs.io.TestsTests will be automatically run by travis on commit to master.They can also be executed locally using docker-compose by runningdocker-compose upRequirements upgradesCheck for upgradeable packages by runningdocker-compose run –rm python pip-checkMaking a new releasebumpversionis used to manage releases.Add your changes to theHISTORYand rundocker-compose run –rm python bumpversion <major|minor|patch>, then push (including tags)History4.0.1 (2022-01-02)Remove support for Django < 3.2Remove support for Python < 3.8Modernize build and test environment4.0.0 (2022-01-02)Not released to due an issue with the deploy action3.0.0 (2021-05-05)Remove support for Django 2.xRemove utf 8 headers as all Python 3 files must be unicode anywaysFix CI badge in readmeModernize build and test environment2.0.2 (2021-05-05)Remove setting language in session as this was depreacted since Django 2.x and is broken with Django 3.xAdd tests for Django 3.2Remove old python 2 and Django compatibility code2.0.1 (2021-03-25)Fix documentation syntax2.0.0 (2021-03-25)Update packagesUpdate Docker envRemove support for Django < 2.21.0.0 (2019-11-04)Update packagesRemove Python 2 supportAdd docker container to run tests locally0.1.6 (2018-01-27)Add missing folders and modules from package0.1.5 (2018-01-15)Add support for python 3 and Django 2, impleneting tests in travis ci0.1.4 (2017-04-18)Rename package to django_languageselect (backwards incompatible) to be able to import the module0.1.3 (2016-06-17)Fix session key to store language, Django 1.9 compatibility
Package: django-languages-plus
django-languages-plus provides models and fixtures for working with both common languages and ‘culture codes’ or locale codes, like pt-BR.Note that this is only a small (but popular) subset of all living languages, and is not even a comprehensive set of the ISO 639 languages.  It does however include the endonym/autonym/exonym.The Language model contains all ISO 639-1 languages and related information fromhttp://en.wikipedia.org/wiki/List_of_ISO_639-1_codesThe model provides the following fields (original wikipedia.org column name in parentheses).name_en (ISO Language Name)name_native (Native Name)iso_639_1 (639-1)iso_639_2T = (639-2/T)iso_639_2B = (639-2/B)iso_639_3 = (639-3)family = (Language Family)countries_spokenInstallationpip install django-languages-plusUsageAddlanguages_plusto your INSTALLED_APPSMigrate your database and load the language data fixture:python manage.py migrate
python manage.py loaddata languages_data.json.gzIn your code use:from languages_plus.models import Language
lang = Language.objects.get(iso_639_1='en')Generating Culture Codes (ex: pt_BR)django-countries-plus(https://pypi.python.org/pypi/django-countries-plus) is now an explicit requirement.  After installing both packages you can run the following command once to associate the two datasets and generate a list of culture codes (pt_BR for example):from languages_plus.utils import associate_countries_and_languages
associate_countries_and_languages()Requirementsdjango-countries-plus >= 1.Django:  Tested against the LTS versions of 3, 4, and the latest of 5.
Python 3Running TestsDoes the code actually work?$ poetry install
$ poetry run pytestOr for the full tox suite:$ poetry install
$ pip install tox
$ tox
Package: django-lanthanum
Django Lanthanum allows you to add DynamicJSON SchemaFields to your models. These allow you to build complex documents according to a set of fixed criteria - since the schema is fixed, it is possible to properly interpret the data.This could be applied to a wide variety of scenarios, but it is particularly useful for Blogging or CMS tools, where the data structure of a page document can vary significantly.TestingTo test the package, runtox- this will run against each of the supported environments. To run for a specific environment, provide the appropriate flag, for example:tox -e py36-django21
Package: django-last-active
last_active is a Django app to track when a user is last active on a
website. The last active time is kept on the database.It was forked fromdjango-last-seen.The intention is to eventually add weekly active user tracking feature
as well.Supports SoftwarePython: 3.8, 3.9Django: 3.2Support PolicyFor Python, we will always support the latest two minor versions
starting with 3.8 and 3.9.When a new Python minor version is generally available, we will have two
releases:a-finalrelease for the current major version that includes the
latest Python minora brand new major version that will drop the oldest supported Python
versionFor Django, at any point in time, there will be a minimum of two or
three versions with active support by Django Foundation.Therefore, this plugin will similarly follow the same road map but with
a 2 month delay.when a new Django major version is generally available, the plugin
will release a new major version that supports it within 2 months.when a new Django minor version is generally available, the plugin
will release a new minor version that supports it within 2 months.when a Django minor version ends its extended support, the plugin
will deprecate any versions that support that version 2 months later.InstallationAdd “last_active” to your INSTALLED_APPS setting like thisINSTALLED_APPS = [
    ...
    'last_active',
]Add ‘last_active.middleware.LastActiveMiddleware’ to
MIDDLEWARE_CLASSES tuple found in your settings file.Runpython manage.py migrateto create the last_active models.SettingsLAST_SEEN_DEFAULT_MODULEThe default module used on the middleware. The default value is default.LAST_SEEN_INTERVALHow often is the last seen timestamp updated to the database. The
default is 2 hours.
Package: django-last-active-4S
last_active is a Django app to track when a user is last active on a
website. The last active time is kept on the database.It was forked fromdjango-last-seen.The intention is to eventually add weekly active user tracking feature
as well.InstallationAdd “last_active” to your INSTALLED_APPS setting like thisINSTALLED_APPS = [
    ...
    'last_active',
]Add ‘last_active.middleware.LastActiveMiddleware’ to
MIDDLEWARE_CLASSES tuple found in your settings file.Runpython manage.py migrateto create the last_active models.SettingsLAST_SEEN_DEFAULT_MODULEThe default module used on the middleware. The default value is default.LAST_SEEN_INTERVALHow often is the last seen timestamp updated to the database. The
default is 2 hours.
Package: django-lastfm
This is a small Django application that allows you to access Last.fm and
embed e.g. your recently listened tracks or you top artists on your website.Currently you can get yourrecently listened tracksweekly artist charttop artists (for a definable period)The application consists of two main parts: The first one is a view, that
retrieves the data from Last.fm, processes it and returns it as a JSON encoded
dict. The second one is a template tag that embeds some AJAX code into your
website. This code will call the view and display the artist images or album
covers. This mechanism prevents the Last.fm servers from slowing down your
blazingly fast Django site … ;-)RequirementsThis app is tested with Django 1.1. It might also work with older versions, but
I haven’t tested it.If you want to run the tests, you’ll need to installMock.There are no other requirements.InstallationIf you read this, you have probably managed to extract the archive containing
these files. Next, open a Terminal andcdto the directory containing this
file (e.g.cd~/Downloads/django-lastfm). Then execute:python setup.py installIf you checked out the repository and always want to use the newest version,
type:pip install -e path/to/django-lastfmUsageThe Documentation can be found in thedocs/directory oronline.
Package: django-lastfm-auth
Django-Lastfm-Auth==============================Django-Lastfm-Auth is an extension to `Django-Social-Auth <https://github.com/omab/django-social-auth>`_which adds a backend for Last.fm.If you are looking for a stand alone Last.fm authentication backend then pleasecheck out `django-lastfmauth <http://pypi.python.org/pypi/django-lastfmauth/>`_.Requirements-------------------------------- Django-Social-Auth >= 0.3.3- Django >= 1.2.5- Python-OAuth2 >= 1.5.167- Python-Openid >= 2.2API Keys-------------------------------In order to use this application you must sign up for API keys onLast.fm. These should be put into your settings file using the settings::LASTFM_API_KEY = '' # Your api keyLASTFM_SECRET = '' # Your api secretExtra data-------------------------------Similar to the other OAuth backends you can defineLASTFM_EXTRA_DATA = [('realname', 'realname'), ]as a list of tuples (response name, alias) to store on the UserSocialAuth model.Installation-------------------------------To install django-lastfm-auth via pip::pip install django-lastfm-authOr you can from the latest version from Github manually::git clone git://github.com/mlavin/django-lastfm-auth.gitcd django-lastfm-authpython setup.py installor via pip::pip install -e git+https://github.com/mlavin/django-lastfm-auth.gitOnce you have the app installed you must include in your settings::INSTALLED_APPS = (...'social_auth','lastfm_auth',...)AUTHENTICATION_BACKENDS = (...'lastfm_auth.backend.LastfmBackend',...)SOCIAL_AUTH_IMPORT_BACKENDS = (...'lastfm_auth',...)Please refer to the `Django-Social-Auth <http://django-social-auth.readthedocs.org/>`_documentation for additional information.Questions or Issues?-------------------------------If you have questions, issues or requests for improvements please let me know on`Github <https://github.com/mlavin/django-lastfm-auth/issues>`_.
Package: django-lastpass-sp
This is a hacky extension todjango-saml-service-providerthat, instead
of onelogin, usesLastPass Enterpriseas an IdP.InstallationGet it from PyPI:pip install django-lastpass-spExample configuration# Check the LastPass SAML metadata for the bits after '.../login/'
LASTPASS_CONNECTOR_ID = '1234567/abc4'

# This is the certificate given by LastPass
# or LASTPASS_CERTIFICATE if you want the cert in your conf
LASTPASS_CERTIFICATE_FILE = os.path.join(BASE_DIR, 'lastpass.crt')

# Private key, try it like this:
# openssl genrsa > samlsp.key
# or SAML_SP_KEY if you want the key in your conf
SAML_SP_KEY_FILE = os.path.join(BASE_DIR, 'samlsp.key')

# Certificate, try with self-signed:
# openssl req -new -x509 -key samlsp.key -out samlsp.crt -days 365
# or SAML_SP_CERTIFICATE if you want the key in your conf
SAML_SP_CERTIFICATE_FILE = os.path.join(BASE_DIR, 'samlsp.crt')

# Optional!
# Contact info provided in the metadata
SAML_SP_CONTACT_INFO = {
    "technical": {
        "givenName": "Admin",
        "emailAddress": "admin@example.com",
    }
}

# Optional!
# Ditto for organization info
SAML_SP_ORGANIZATION_INFO = {
    "en-US": {
        "name": "acme",
        "displayname": 'Acme Inc',
        "url": "http://example.com/",
    }
}

AUTHENTICATION_BACKENDS = (
    # This is just so you don't block yourself out
    #'django.contrib.auth.backends.ModelBackend',
    # This is the beef
    'sp.auth_backend.SAMLServiceProviderBackend',
)

# Optional
# Create new users with admin and/or staff accounts
# Both default to False
LASTPASS_CREATE_ADMIN = True
LASTPASS_CREATE_STAFF = True
Package: django-last-seen
Keep trak of when a user has been last seen on a website.
The last seen time is kept on the databaseThe app is ready for django 1.5, it uses the AUTH_USER_MODEL setting to get
the user model,InstallationInstall withpip installdjango-last-seen"or add"last_seen"directory to your Python path.Add"last_seen"to theINSTALLED_APPStuple found in your settings
file.Add ‘last_seen.middleware.LastSeenMiddleWare’ to MIDDLEWARE_CLASSES tuple
found in your settings file.Runmanage.py syncdbto create the new tablesUsageTo get when a user has been last seen:from last_seen.model import LastSeen

seen = LastSeen.object.when(user=user)To save a last seen user without the middleware:from last_seen.model import LastSeen

# save with a special module
LastSeen.object.when(user=user, module='forum')MiddlewareThe provided middleware keeps track of when an authenticated user has been
last seen on the site,If you want to keep track of a user last seen on a part of a site, you can
use a special module name and use:from last_seen.model import LastSeen

# save with a special module
LastSeen.object.when(user=user, module='forum')Then to get the data:from last_seen.model import LastSeen

# user last seen on any part of the site
seen = LastSeen.object.when(user=user)

# user last seen on a module
seen = LastSeen.object.when(user=user, module='forum')SettingsLAST_SEEN_DEFAULT_MODULEThe default module used on the middleware. The default value isdefault.LAST_SEEN_INTERVALHow often is the last seen timestamp updated to the
database. The default is 2 hours.
Package: django-last-used
Keep track of last used objects in a django app.InstallationInstall withpip installdjango-last-used"or ddd"last_used"directory to your Python path.Add"last_used"to theINSTALLED_APPStuple found in
your settings file.Runmanage.py syncdbto create the new tablesUsageFor save used objects:import last_used

# save used object
last_used.use(object=item, user=user)

# save with a key
last_used.use(object=article, user=user, key="read")

last_used.use(object=article, user=user, key="seen")For get last used objects:import last_used

# get last used
last_used_articles = last_used.get(model=Article, user=user)

# get with a key
last_read_articles = last_used.get(model=Article, user=user, key="read")
Package: django-latch
django-latchDjango and Latch integration. Originaly developed by Javier Olascoaga andRootedCON.RequirementsPython 3.4, 3.5, 3.6, 3.7Django 2.0, 2.1, 2.2InstallationTo install it, simply run:$ pip install django-latchOr, if you prefer installing from source:$ git clone https://github.com/javimoral/django-latch.git
$ cd django-latch
$ python setup.py installConfigurationIn yoursettings.pyfile you need to add the following directives:INSTALLED_APPS=([...]'latch',)# Add auth profileAUTH_PROFILE_MODULE='latch.UserProfile'# Append Latch Auth Backend the first in listAUTHENTICATION_BACKENDS=['latch.auth_backend.LatchAuthBackend',[...]]LATCH_APP_ID=<APPId># You can use os.environ if you preferLATCH_APP_SECRET=<APPSecret>LATCH_BYPASS_WHEN_UNREACHABLE=True# True is the default behaviour. Configure as you need.Configure app urlsfromdjango.urlsimportpath,includeurlpatterns=[[...]path('latch/',include('latch.urls'))[...]]Then apply migrations$ python manage.py makemigrationsFor more information, please refer todocumentation.Bugs and requestsPlease report any bug/issue or feature request in GitHub issue tracker.https://github.com/javimoral/django-latch/issuesLicenseThis module is published under Apache 2.0 license. See LICENSE file for details.latch-sdk-pythonis published under GNU General Public License 2.0. Rights belongs to ElevenPaths, more information and the updated version at:https://github.com/ElevenPaths/latch-sdk-pythonAuthorsOriginaly developed by Javier Olascoaga andRootedCON.
Package: django-latency
django-latency is a django application that only contains middleware to simulate network
latency on your local machine.  It causes your views to take several seconds to return.This helps you identify client-side code that relies on low-latency server side code,
which is generally an anti-pattern.Like a runner training with weighted shoes, django-latency lets you feel the pain of
client-server dependencies.Set UpSetting up django-latency is easy.  After it is installed in your environemnt and on
your path, simply add the middleware class to your MIDDLEWARE_CLASSES list:MIDDLEWARE_CLASSES = (
    ...
    'latency.middleware.LatencyMiddleware',
    ...
)django-latency optionally accepts a settings variable called LATENCY_MIDDLEWARE.  Currently,
LATENCY_MIDDLEWARE is a dictionary whose only key is “WAIT_TIME,” a floating point value.For example:LATENCY_MIDDLEWARE = {
    'WAIT_TIME': 5.0
}
Package: django-laterpay
LaterPayDjango utilitiesInstallation$ pip install django-laterpayUsageSeehttps://www.laterpay.net/developers/docsDevelopmentSeehttps://github.com/laterpay/django-laterpayTested by TravisReleasing checklistThis repository usesGitHub flow.
In order to release a new version please follow these steps:Installtwinewith$ pipsi install twineEnsureCHANGELOGis representativeDetermine next version number from theCHANGELOG(ensuring we followSemVer)Update theCHANGELOGwith the new versionUpdate the version insetup.pyUpdatetrove classifiersinsetup.pyStage the changegit add CHANGELOG.md setup.pyCommit and ensure the correct version number is part of the commit messagegit commit-m"Bump to 2.0.0"Tag the commit with current version numbergit tag-s2.0.0-m"Bump to 2.0.0"git push--tagsorigin masterpython setup.py sdist bdist_wheeltwine uploaddist/$newveror optionally, for signed releasestwine upload-s...Bump version insetup.pyto next likely version asAlpha 1(e.g.3.0.0a1)Alter trove classifiers insetup.pyAdd likely new version toCHANGELOG.mdStage the changegit add CHANGELOG.md setup.pyCommitgit commit-m"Post release prep"
Package: django-latex
Application to parse & make PDFs with Djangohttp://bitbucket.org/bearstech/django-latex/Beta : not really for production useFeatures :LaTeX :Parse LaTeX DocumentRender LaTeX Document ObjectsGenerate Base PDF FilesCombine simple LaTeX DocumentsGood test coverageTodo :… much moreExamples :Usage examples:from latex import LatexDocument
ltxdoc = LatexDocument(latexstr)
print ltxdoc.packages
print ltxdoc.preamble

ltxdoc2 = LatexDocument(latexstr2)
ltxdoc3 = ltxdoc + ltxdoc2
ltxdoc3.as_latex()

# If some files have to be inclued
ltxdoc3.add_file("/home/cyberj/lolcat_1182.png", "lolcat.png")

f = open("/home/cyberj/motivational_4242.png", "rb")
ltxdoc3.add_file(f, "motivational.png")

pdf = ltxdoc3.as_pdf()Ifpdflatexfails, it raisesLatexDocument.LatexPdfGenerationErrorand clean
tempdir. To preserve temporary directory givedebug=Truetoas_pdfmethod.Tests :cd testspython bootstrap./bin/buildout.py -v./bin/test-1.2 or ./bin/test-1.1Requirements :Django >= 1.1pdflatex (and LaTeX distro)Debian packagesdblatex                        Produces DVI, PostScript, PDF documents from DocBook sourceslatex-xcolor                   Easy driver-independent TeX class for colorpreview-latex-style            extraction of elements from LaTeX documents as graphicstexlive-latex-base             TeX Live: Basic LaTeX packagestexlive-latex-base-doc         TeX Live: Documentation files for texlive-latex-basetexlive-latex-extra            TeX Live: LaTeX supplementary packagestexlive-latex-extra-doc        TeX Live: Documentation files for texlive-latex-extratexlive-latex-recommended      TeX Live: LaTeX recommended packagestexlive-latex-recommended-doc  TeX Live: Documentation files for texlive-latex-recommended
Package: django-latexify
django-latexify let’s you easily render text and math equations from your template to look like LaTeX. The app lets you render math equations written in LaTeX on your HTML, or even just regular plain text.It uses Katex (a fast, easy-to-use JavaScript library for TeX math rendering on the web) for rending math equations and a modification of WiTex (LaTeX like CSS) for rending plain text.installationpython setup.py installQuick startAdd “latexify” to your INSTALLED_APPS setting like this:INSTALLED_APPS=(...'latexify',...)In your template, load latexify by including:{% load latexify %}In the HTML header of your template, include:{% include 'latexify/stylesheets.html' %}In the bottom of your HTML body, include the following to load the JS associated with latexify:{% include "latexify/scripts.html" %}Latexify your text by including the template tag, for example{% latexify context_arg %}
{% latexify context_arg parse_math=True %}
{% latexify 'c = \pm\sqrt{a^2 + b^2}' math_inline=True %}
{% latexify 'c = \pm\sqrt{a^2 + b^2}' math_block=True %}Which will give you the following:In your HTML, be sure to include this before the<html>tag.<!DOCTYPE html>ContributingFork it!Create your feature branch:git checkout -b my-new-featureCommit your changes:git commit -am ‘Add some feature’Push to the branch:git push origin my-new-featureSubmit a pull request :DLicenseAll parts of django-latexify are free to use and abuse under theopen-source MIT license.Change LogVersion 0.2:Support python3.
Package: django-launchbox
Launchbox Helper for DjangoA plugin for your Django app to assist in integrating withLaunchbox.FeaturesThe plugin currently offers the following features:A helper class for easier configuration of settings for resources provided by Launchbox,
like databases, caches, and storage bucketsA class for querying an identity service provided by a Launchbox pluginAn API for Launchbox to get information from your application so that
it can display, or even change, that info within the Launchbox Management DashboardPlanned featuresIntegrations with other Launchbox plugin types – authentication and SSL certificate managementInstallationThese steps assume that you have already added alaunch.yamlfile to your application.
For more information on that,visit the Launchbox docs.Adddjango-launchboxto your project's requirements and install it.Add"launchbox"to yourINSTALLED_APPSsetting like this:INSTALLED_APPS=["launchbox",...]Update your Django settings to use the database provided by Launchbox:fromlaunchboximportLBResourcesDATABASES={# "db" is the resource identifier specified in your launch.yaml file"default":LBResources().settings("db")}If you configured a cache or storage bucket in yourlaunch.yamlfile,
update those settings, too:fromlaunchboximportLBResourcesCACHES={# "cache" is the resource identifier specified in your launch.yaml file"default":LBResources().settings("cache")}# AWS_STORAGE_BUCKET_NAME is a django-storages setting# "storage" is the resource identifier specified in your launch.yaml fileAWS_STORAGE_BUCKET_NAME=LBResources().settings("storage")If you want to manage users in the Launchbox dashboard,
add theLB_USER_ATTRIBUTESsetting to specify which user model fields
and properties you want to log and validate:LB_USER_ATTRIBUTES=["first_name","last_name","middle_initial","display_name","email","admin_access","is_active","is_editor","is_moderator","is_owner","is_superuser",]And then add the Launchbox bridge API URLs to theurlpatternsin your project'surls.py:# Launchbox Service Bridge APIpath("bridge/",include("launchbox.api.urls")),Working with Launchbox pluginsIdentity providersUse theLBIdendityclass to query an identity service provided by a Launchbox plugin.
For all examples given below, be sure you have imported the class with:fromlaunchboximportLBIdentityYou will need to know a plugin'splugin_id(an identifier internal to Launchbox) to work with it.Get a specific userTo get a user's details when you know their exact user ID within the identity database, use theuser.get()method:user_details=LBIdentity("plugin_id").user.get("user_id")Search for a user with partial matchingTo search for a user when you aren't certain of their user ID, use theuser.search()method:user_details=LBIdentity("plugin_id").user.search("user_id")Get the groups a user belongs toFor identity providers that can place users into groups,
you can get a list of a user's groups with theuser.groups()method:user_groups=LBIdentity("plugin_id").user.groups("user_id")Get group detailsTo get the details of a group, use thegroup.get()method:group_details=LBIdentity("plugin_id").group.get("group_id")