Saravanan666/pypi-org huggingface dataset:
Package: django-glcsweb
glcswebis a Django app which provides a web interface for theglcspackage. It requiresglcsto be installed to work
properly.Detailed documentation is in the “docs” directory.Quick startAdd “glcsweb” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the glcsweb URLconf in your project urls.py like this:path('/', include('glcsweb.urls')),Runpython manage.py migrateto create the glcsweb models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a  (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: django-glitter
Glitter is a front-end content management framework for Django.Installationpipinstalldjango-glitterContributingFork it!Create your feature branch:git checkout-bmy-new-featureCommit your changes:git commit-am'Add some feature'Push to the branch:git push originmy-new-featureSubmit a pull request :DRun Development TestsTo facilitate testing we usetox, which you can install with:pipinstalltoxCurrently we test on Python versions 2.7, 3.4 & 3.5 and Django versions 1.8,
and 1.9.To use the same test suite, make sure you have the above mentioned Python
interpreters installed, some platforms, like Ubuntu, won’t have all versions
available in their default package repository and you may need to add ‘custom’
repositories like Felix Krull’sdeadsnakes. Depending on your development
platform you may need to add development tools and each of the python versions
development headers.Assuming you have all the supported python versions installed and forked the
repository todjango-glitterrunning the tests is a matter of:cddjango-glittertoxCreditsConcept and project launch by Team BlancLicenseGlitter is licensed under BSD-3
Package: django-glitter-documents
The Document handler forGlitteryou’ve
been waiting for.Getting StartedInstallation is simple usingpip:$pipinstalldjango-glitter-documentsAddglitter_documentsto your site’sINSTALLED_APPS:INSTALLED_APPS=[...'glitter_documents',...]And finally, remember to run the migrations:$./manage.pymigrateDevelopingGetting started on improving Django Glitter Documents is pretty straight forward. Presuming you’re
usingvirtualenvwrapperandThe Developer Society Dev Tools:$dev-clonegit@github.com:developersociety/django-glitter-documents.git$makeresetPlease remember to runmake formatbefore you commit, andtoxbefore pushing the changes you
make:$makeformat$gitadd.$gitcommit-m'Made it do something awesome!'$tox$gitpushReleasingReleasing a new version of the project to PyPi is fairly straight forward.First, make sure you have the correct credentials for PyPi correctly configued on your machine.Update and commit the Version History in the README.Then, usebumpversionto increment the version numbers in the project. This will also create a
commit and a tag automatically for the new version. For example, to increment the version numbers
for a ‘patch’ release:$bumpversionpatch$gitpush--tagsoriginmasterbumpversioncan increment ‘patch’, ‘minor’ or ‘major’ version numbers:$bumpversion[patch|minor|major]Then release the new version to PyPi:$makereleaseVersion History0.2.11AddEdgeNgramFieldfor theDocumentIndexhttps://github.com/developersociety/django-glitter-documents/pull/330.2.5Added Makefile for linting, beautficiation and easier PyPi releasing.https://github.com/developersociety/django-glitter-documents/pull/180.2.4Added “View on site” link to list of documents.https://github.com/developersociety/django-glitter-documents/pull/160.2.3Add file extension method to model.https://github.com/developersociety/django-glitter-documents/pull/13
Package: django-glitter-events
Django glitter events for Django.InstallationGetting the codeYou can getdjango-glitter-eventsby usingpip:$pipinstalldjango-glitter-eventsPrerequisitesMake sure you add'glitter_events','taggit'and'adminsortable'to yourINSTALLED_APPSsetting:INSTALLED_APPS=[# ...'glitter_events','taggit','adminsortable',# ...]URLconfAdd the Glitter Events URLs to your project’s URLconf as follows:url(r'^events/',include('glitter_events.urls',namespace='glitter-events'))ReleasingReleasing a new version of the project to PyPi is fairly straight forward.First, make sure you have the correct credentials for PyPi correctly configued on your machine.Update and commit the Version History in the README.Then, usebumpversionto increment the version numbers in the project. This will also create a
commit and a tag automatically for the new version. For example, to increment the version numbers
for a ‘patch’ release:$bumpversionpatch$gitpush--tagsoriginmasterbumpversioncan increment ‘patch’, ‘minor’ or ‘major’ version numbers:$bumpversion[patch|minor|major]Then release the new version to PyPi:$makerelease
Package: django-glitter-news
===================Django Glitter News===================Adds easy to use News/Blog functionality to`Glitter <https://github.com/developersociety/django-glitter/>`_.Installation============Getting the code----------------You can get **django-glitter-news** by using **pip**:.. code-block:: console$ pip install django-glitter-newsPrerequisites-------------Make sure you add ``'glitter_news'``, ``'taggit'`` and ``'adminsortable'`` to your``INSTALLED_APPS`` setting:.. code-block:: pythonINSTALLED_APPS = [# ...'glitter_news','taggit','adminsortable',# ...]URLconf-------Add the Glitter News URLs to your project’s URLconf as follows:.. code-block:: pythonurl(r'^news/', include('glitter_news.urls', namespace='glitter-news'))Configuration=============The following options can be set in your project's `settings.py`:GLITTER_NEWS_TAGS-----------------This setting enables tags for the model ``Post`` in your project.Default is ``False``.Example:.. code-block:: pythonGLITTER_NEWS_TAGS = TrueNEWS_PER_PAGE-------------Set the number of news articles which will be displayed on a page.Default is ``10``.Example:.. code-block:: pythonNEWS_PER_PAGE = 10NEWS_STICKY_ON_ALL------------------Disable the sticky posts functionality when displaying the list of all news.Default is ``True``.Example:.. code-block:: pythonNEWS_STICKY_ON_ALL = FalseDeveloping==========Getting started on improving Django Glitter News is pretty straight forward. Presuming you'reusing `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_ and`The Developer Society Dev Tools <https://github.com/developersociety/tools>`_:.. code-block:: console$ dev-clone git@github.com:developersociety/django-glitter-news.git$ make resetPlease remember to run ``make format`` before you commit, and ``tox`` before pushing the changes youmake:.. code-block:: console$ make format$ git add .$ git commit -m 'Made it do something awesome!'$ tox$ git pushReleasing=========Releasing a new version of the project to PyPi is fairly straight forward.First, make sure you have the correct credentials for PyPi correctly configued on your machine.Update and commit the Version History in the README.Then, use ``bumpversion`` to increment the version numbers in the project. This will also create acommit and a tag automatically for the new version. For example, to increment the version numbersfor a 'patch' release:.. code-block:: console$ bumpversion patch$ git push --tags origin master``bumpversion`` can increment 'patch', 'minor' or 'major' version numbers:.. code-block:: console$ bumpversion [patch | minor | major]Then release the new version to PyPi:.. code-block:: console$ make release
Package: django-global-log
Django Global Log注册到installed_apps中INSTALLED_APPS=["corsheaders","django_global_log",···]添加middlewareMIDDLEWARE=["corsheaders.middleware.CorsMiddleware","django_global_log.middlewares.DjangoGlobalLogMiddleware",···]使用celeryGLOBAL_LOG_CELERY_FUNC="async_global_log"defasync_global_log(detail):DjangoGlobalLog.objects.create(**detail)
Package: django-global-permissions
Django Global PermissionsImplementation of permissions not related to modelsQuickstartInstall django-global-permissions:pip install django-global-permissionsAdd to installed apps:INSTALLED_APPS+=('global_permissions',)If you want to create a permission in the admin interface, then head to
the Global Permissions section and clickadd. Pick a name (which should be
human readable), a code name (which will be used throughout your apps), then save it.
Open the user edit page and choose the permission you've just created.Otherwise if you want to create a permission programmatically, just import theGlobalPermissionmodel and create a new permission choosing a name and a codename.fromglobal_permissions.modelsimportGlobalPermissionGlobalPermission.objects.create(name='My Perm',codename='my_perm')Putting into action!Lets say you want to verify if the logged in user can do something (based on a permission).
In your view, you can do the followingifuser.has_perm('global_permissions.my_perm_codename'):pass# do something intersting!else:pass# ops, you're not allowed to do that. Sorry ¯\_(ツ)_/¯If you want to check a permission in a template, you can do it like this:{%ifperms.global_permissions.my_perm_codename%}Yay!{%else%}Not so lucky...{%endif%}UpgradeIf you're upgrading from version 0.1.x to version 0.2.x, you have to manually update the old contentttype model attribute to the new one. The following script may do the trick:fromdjango.contrib.contenttypes.modelsimportContentTypeContentType.objects.filter(name='global_permission',app_label='global_permissions').update(model='globalpermission')This change is required on django 1.7+ to avoid a prompt asking if you want to remove staled content types after running a migration.
Package: django-global-places
Django-GlobalPlacesPlug and play configurations and data for countries, states and cities from all over the globe.RequirementsDjango >= 3.8 *Python >= 3.8 *Django Rest Framework >=  3.13 *This requirement is only necessary if you are using the provided REST endpoints.django-filter >= 23.0 *This requirement is only necessary if you are using the provided REST endpoints.(*) Not tested with earlier versions.Quick SetupInstall packagepip install django-global-placesAdddjango_global_placesapp to INSTALLED_APPS in your django settings.py:INSTALLED_APPS=(...,"django.contrib.staticfiles",'django_global_places''rest_framework',# required only if using the provided REST endpoints...,)(Optional) Include viewset routesfromdjango_global_places.urlsimportrouterasdjango_global_places_routeryour_router.registry.extend(django_global_places_router.registry)ExplanationThis library handles the configuration and creation ofCountries,States, andCities.After installation, you need to specify three parameters in yoursettings.pyfile:INCLUDE_LOCATION: Enables the creation of the models.LOCATION_SCOPE: Determines the scope of models required ('countries', 'states', or 'cities').INCLUDE_EXPANDED_COUNTRY: Incorporates additional fields into the Country model.Example:GLOBAL_PLACES = {
    "INCLUDE_LOCATION": True,
    "LOCATION_SCOPE": "state",
    "INCLUDE_EXPANDED_COUNTRY": False,
}Once these variables are configured, your next steps are to runmakemigrationsandmigrate.Topopulatethe newly created models, you should execute a Django command. This command will create all the necessary objects and update them if they already exist.python manage.py populate_global_placesRest endpointsThree viewsets are included, one for each model:Country,State, andCity. Each viewset features:A list view displaying a summary of the objects.
A detail view presenting comprehensive information about each object.CountryViewSet:url: global-places/countriessearch fields:nameandiso3ordering fields:id,nameandiso3StateViewSet:url: global-places/statessearch fields:nameandstate_codeordering fields:id,nameandstate_codefiltering fields:countryCityViewSet:url: global-places/citiessearch fields:nameordering fields:idandnamefiltering fields:state,state__countryFull examplesherein Postman collection.AcknowledgementsSpecial thanks to theCountries States Cities Databasefor providing the JSON files used for populating the data.ContributingLuca Cittá GiordanoMatias GirardiMaintained and developed byLinkchar Software Development.
Package: django-globals
Django-globalsDjango-globals is a very simple application, that allow you to define
thread specific global variables.It includes a middleware Global, which can be used to access to the
current request and user, which is useful outside of a view when the
“request” variable is not defined.InstallationInstall using pippipinstalldjango-globalsConfigurationIn your project’ssettings.py, adddjango_globals.middleware.GlobaltoMIDDLEWARE(orMIDDLEWARE_CLASSESon Django < 1.10).UsageNow you can usefrom django_globals import globalsand access to theglobals.requestandglobals.userfrom anywhere.HelpFor more information see the documentation at:https://django-globals.readthedocs.io/If you have questions or have trouble using the app please file a bug
report at:https://github.com/svetlyak40wt/django-globals/issues
Package: django-globee
django-globeedjango-globee is a Django app to integrateGloBeePayments.You can find the GloBee API docshere.Quick startAddglobeeto your INSTALLED_APPS setting like this:INSTALLED_APPS=[...'globee',]Include the globee URLconf in your project urls.py like this:path('globee/',include('globee.urls')),Include your globee key and test or live env in your project settings.pyGLOBEE_AUTH_KEY="YOUR GLOBEE X-AUTH-KEY"GLOBEE_TESTNET=True# set this to False in production mode# False: IPN view will respond with status code "400" if an "KeyError", "ValueError" or "ValidationError" occurs# True: IPN view will always respond with status code "200"GLOBEE_PARANOID_MODE=False# optional (default: False)# False: saves the IPN response in the database without further verify checks. see docs on how to verify the payment yourself.# True: fetches the payment information directly from GloBee after the IPN view was calledGLOBEE_AUTO_VERIFY=False# optional (default: False)Runpython manage.py migrateto create the globee models.examplesseeDocs
Package: django-globus-portal-framework
Globus Portal Framework is a collection of tools for quickly bootstrapping a
portal for Globus Search. Use the guide below to get your portal running with
Globus Auth and your custom search data. After that, you can make your data
more accessible with Globus Transfer, or extend it how you want with your custom
workflow.InstallationYou can install Django Globus Portal Framework using Pip:pip install django-globus-portal-frameworkFor our latest development version, you can install the pre-releasepip install -U --pre django-globus-portal-frameworkSee theRead The Docs page.
Package: django-glossa
A glossary app for DjangoDocumentationThe full documentation is athttps://django-glossa.readthedocs.org.QuickstartInstall django-glossa:pip install django-glossaThen use it in a project:import glossarioFeaturesTODOCookiecutter Tools Used in Making This Packagecookiecuttercookiecutter-bitbucket-djangopackageHistory1.0.0 (2016-04-13)Initial release.
Package: django-glrm
Django Global Login Required Middleware (django-glrm) is a Django middleware that make all views and URLs login required.It’s common in Django that most of the site’s pages are protected, with just a few exceptions of pages that remain public (e.g. login page, etc.).
It can be quite tedious to decorate all of the views with@login_required, and it can be easy to forget to decorate some of them.So, you can useDjango Global Login Required Middlewareto make all page login required excep some of them.Documentationis avalible atRead The Docs.Quick startInstall Django Global Login Required Middleware:$ pip install django-glrmAdd “global_login_required.GlobalLoginRequiredMiddleware” to your MIDDLEWARE setting like this:MIDDLEWARE = [
    ...
    'global_login_required.GlobalLoginRequiredMiddleware',
]3. Start the development server and visithttp://127.0.0.1:8000/,
now all your pages are login required and you will see the login page.
Package: django-glue
# django-glueWe built Django Glue to help solve the problem of fluid interactions between the front and back ends of a Django application.
Our end goal is to bring as much front end power to the Django framework as possible while remaining pythonic.This project is in prototype phase please look at the tests directory of this code base for examples and instructions.## Why?We are active web platform developers that want to provide our clients with the best user experience without having to learn a bunch of different technology stacks.
Django glue allows us to do fancy javascript like page interactions and updates while remaining in the comfort of our django/python world.Education is also a big part of what we do and our focus is on teaching our people python, so they can focus on data science and automation and make solid interfaces!## RequirementsDjango 3.2+ or 4.0+Python 3.8+## DependenciesAlpine JSAxios## DocumentationInstallation Guide - [Here](INSTALLATION.md)Usage Guide - [Here](USAGE.md)## Roadmap[x] Prototype (2022-07-12)[x] Alpha (2022-08-31)[ ] Beta (2023-06-31)## AuthorsNathan JohnsonWesley Howery
Package: django-gm2m
© 2014-2020 Thomas KhynDjango generic many-to-many field implementation.This django application exposes aGM2MFieldthat combines
the features of the standard DjangoManyToManyFieldandGenericForeighKeyand that can be used exactly the same way.It has been tested with Django 2.2.*, 3.0.*, 3.1.*, 3.2.*, 4.0.* and their matching Python versions (3.7 to 3.10).If you like django-gm2m and find it useful, you may want to thank me and
encourage future development by sending a few mBTC / mBCH / mBSV at this address:1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9.FeaturesWorks like the built-in Django related fieldsCreates one table per relation, likeManyToManyField, and not one big
table linking anything to anything (django-generic-m2m’s default approach)No need to modify nor monkey-patch the existing model classes that need to be
linkedAutomatic reverse relations when an instance is addedRelated objects prefetchingThrough models supportDeletion behaviour customization using signalsMigrations supportDocumentationThe documentation is hosted onreadthedocs. You’ll find a quick start and
the description of all django-gm2m’s advanced features.
Package: django-gmailapi-backend
Django Gmail API backendEmail backend for Django which sends email via the Gmail APIThe simple SMTP protocol is disabled by default for Gmail users, since this
is included in the Less Secure Apps (LSA) category.
The advice is to use SMTP+OAuth or to use the Gmail API directly.
This package implements the second option as a Django email backend.InstallationInstall the packagepip install django-gmailapi-backendConfigurationIn yoursettings.py:Add the module into theINSTALLED_APPSINSTALLED_APPS=[...'gmailapi_backend',...]Set the email backendEMAIL_BACKEND='gmailapi_backend.mail.GmailBackend'Define the configuration parameters from your Gmail developer account (see next section)GMAIL_API_CLIENT_ID='client_id'GMAIL_API_CLIENT_SECRET='client_secret'GMAIL_API_REFRESH_TOKEN='refresh_token'Configure the Gmail credentialsFor using this package you need to obtain the OAuth credentials for a valid Gmail account.More information on the Gmail API:https://developers.google.com/gmail/api/guides/sendingOAuth credentials for sending emails:https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThroughThis package includes the script linked in the documentation above, which simplifies
the setup of the API credentials. The following outlines the key steps:Create a project in the Google developer console,https://console.cloud.google.com/Enable the Gmail APICreate OAuth 2.0 credentialsCreate a validrefresh_tokenusing the helper script included in the package:gmail_oauth2--generate_oauth2_token\--client_id="<client_id>"\--client_secret="<client_secret>"\--scope="https://www.googleapis.com/auth/gmail.send"
Package: django-gmailapi-json-backend
django-gmailapi-json-backendEmail backend for Django which sends email via the Gmail API through a JSON credentialThe simple SMTP protocol is disabled by default for Gmail users, since this is included in the Less Secure Apps (LSA) category.
This package implements the Gmail API directly with a JSON Google service account as a Django email backend and can be used with 'django-mailer'.RequirementsPython 3.9+InstallationThe package is available through pip. To easily install or upgrade it, dopip install --upgrade django-gmailapi-json-backendConfigurationIn yoursettings.py:Add the module into the INSTALLED_APPSINSTALLED_APPS=[...'gmailapi_backend',...]Set the email backendEMAIL_FROM='Company<your-email@domain.com>'GMAIL_USER='your-email@domain.com'EMAIL_BACKEND="gmailapi_backend.service.GmailApiBackend"GMAIL_SCOPES=['https://www.googleapis.com/auth/gmail.send']GOOGLE_SERVICE_ACCOUNT='{"type":"service_account","project_id":"your-project","private_key_id":...}'If you usedjango-maileras email backend you can send through gmail API as follow:EMAIL_BACKEND="mailer.backend.DbBackend"MAILER_EMAIL_BACKEND="gmailapi_backend.service.GmailApiBackend"How to create the Google service accountCreate a project on the developer console athttps://console.cloud.google.com(it must be a Google Workspace account, not a simple gmail account)Enable the gmail api from the library menuOn API and services > Credentials, create a new service account as a JSON you should use for GOOGLE_SERVICE_ACCOUNTCopy yourclient idfrom the menu IAM and administration > service account. Click on the service you have just created, find the unique id and copy it.Move to the administrator console athttps://admin.google.com/and choose your user (i.e. EMAIL_FROM)Go to Security > Data access and control > API controls > Delegation at domain level and add a new one with yourclient idand the services you need likehttps://www.googleapis.com/auth/gmail.sendto send email through API.UsageUse the nativeEmailMessageclass in Django. Just a sample:message=render_to_string('email/ordine_pagato.html',{'ordine':ordine,})mail_subject=_('This is just a sample')email=EmailMessage(mail_subject,message,settings.EMAIL_FROM,to=['recipient@domain.com'])email.content_subtype="html"email.attach(sample_file.file.name,sample_file.file.read(),'application/pdf')email.send()
Package: django-gmapify
# django-gmapifyAdd a Google Map to a template with a simple tag.Django-gmapify provides an easy way to manage the Google Maps JavaScript API v3 using a simple tag:{% gmapify "map-canvas" 36.84531718210699 -2.4523544311523438 %}## InstallationUsing `pip`:$ pip install django-gmapifyOr cloning the project from github:$ git clone git@javimb/django-gmapify.git$ cd django-gmapify$ pip install -r requirements.txt## UsageAdd `gmapify` to `INSTALLED_APPS`:INSTALLED_APPS = (...'gmapify',...)Create a div in the template. The map will fill this div, so it has to have width and heigth:<div id="map-canvas" style="width:500px;height:500px;"></div>Load and use the provided `gmapify` tag in the template:{% load gmapify %}{% gmapify <html_id> <lat> <lng> [zoom=<zoom>] [map_type=<map_type>] [marker_title=<marker_title>] %}Django-gmapify provides all the JavaScript stuff for Google Maps API v3, so put the `gmapify` tag at the end of the template.### Optional args- **zoom:** The initial resolution at which to display the map, where zoom 0 corresponds to a map of the Earth fully zoomed out, and higher zoom levels zoom in at a higher resolution. 15 by default.- **map_type:** The initial map type. ROADMAP by default. The following map types are supported:- **ROADMAP:** displays the normal, default 2D tiles of Google Maps.- **SATELLITE:** displays photographic tiles.- **HYBRID:** displays a mix of photographic tiles and a tile layer for prominent features (roads, city names).- **TERRAIN:** displays physical relief tiles for displaying elevation and water features (mountains, rivers, etc.).- **marker_title:** The title of the marker. If it's not provided, no marker will be displayed.##Example{% load gmapify%}{% block styles %}{{ block.super }}<style type="text/css">#map {width: 100%;height: 500px;}</style>{% endblock style%}{% block content %}<div id="map"></div>{% endblock content%}{% block js %}{% gmapify "map" 36.84531718210699 -2.4523544311523438 zoom=18 marker_title="Almeria" %}{% endblock js %}