Saravanan666/pypi-org huggingface dataset:
Package: django-ok-redirects
Simple Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO.InstallationInstall with pip:$pipinstalldjango-ok-redirectsUpdate INSTALLED_APPS:INSTALLED_APPS=[...'ok_redirects',...]Make migrations$pythonmanage.pymigrateAvailable settingsREDIRECTS_IGNORE_PATH_PREFIXES- Tuple of path prefixes to ignore.For example:REDIRECTS_IGNORE_PATH_PREFIXES=('/api/v1/','/uploads/','/static/',)Basic example to use:Add the redirects middleware to the MIDDLEWARE configuration:MIDDLEWARE=[...'ok_redirects.middleware.RedirectMiddleware']
Package: django-okta-authentication
Django Okta Authallows you to authenticate through Okta.InstallationRunpip installdjango-okta-authenticationAdd theOktaBackendto yourAUTHENTICATION_BACKENDSsetting:AUTHENTICATION_BACKENDS=(...'okta_auth.backends.OktaBackend',)Edit yoururls.pyto include:urlpatterns=[url(r'^okta/',include('okta_auth.urls')),...]SettingsOKTA_DOMAINOkta domain.OKTA_CLIENT_IDOkta client id.OKTA_CLIENT_SECRETOkta client secret.OKTA_SCOPEdefault:'openid email'OAuth scope parameter.OKTA_RESPONSE_TYPEdefault:'id_token'OAuth response type parameter.OKTA_USER_CREATIONdefault:TrueAllow creation of new users after successful
authentication.LoggingTo enable logging addokta_authtoLOGGING['loggers']options.LOGGING={...,'loggers':{...,'okta_auth':{'handlers':['console'],'level':'DEBUG',}}}
Package: django-old-new-history
#django-old-new-historydjango-old-new-historyis customize history feature which is used to show the old and new value of model's change field in history action of admin panel.RequirementsPython 3.7 or laterDjango 2.0 or laterFeaturesCustomize history.Display old and new value of model's change field.Simple admin integration.InstallationJust use:::pip install django-old-new-historySetupAdddjango_old_new_historytoINSTALLED_APPSin your settings.py, e.g.:::INSTALLED_APPS = [
...
'django_old_new_history',
...UsageInherit fromDjangoOldNewHistoryto get the custom history feature.admin.py e.g.:::from django.contrib import admin
from .models import ExampleModel
from django_old_new_history.admin import DjangoOldNewHistory

@admin.register(ExampleModel)
class ExampleModelAdmin(DjangoOldNewHistory, admin.ModelAdmin):
    ...ScreenshotHere is screenshot of django-old-new-history
Package: django-old-records
Django Old RecordsA simple Django app with tools to manage old records of Django modelsInstallpip install django-old-recordsAdddjango_old_recordsto your project'sINSTALLED_APPSUsageThere is a manager that decides if a record is too old based on a date field (created_atby default) and amax_age. Ex.:fromdjango_old_recordsimportOldRecordsManagerfromdjango.dbimportmodelsclassCat(models.Model):name=models.CharField()created_at=models.DateTimeField(auto_now_add=True)max_age=365*20# 20 yearsold_records=OldRecordsManager()Cat.old_records.all()# lists all cat records older than 20 yearsmax_agecould be an integer representing days or a pythontimedeltafor a more detailed value. Ex.:fromdjango_old_recordsimportOldRecordsManagerfromdjango.dbimportmodelsfromdatetimeimporttimedeltaclassCat(models.Model):name=models.CharField()created_at=models.DateTimeField(auto_now_add=True)max_age=timedelta(hours=4,seconds=20)old_records=OldRecordsManager()Cat.old_records.all()# lists all cat records older than 4 hours and 20 secondsIf your model'screated_athas a different name you can specify it with thecreated_at_fieldattribute. Ex.:classCat(models.Model):name=models.CharField()was_born=models.DateTimeField(auto_now_add=True)created_at_field='was_born'max_age=365*20# 20 yearsold_records=OldRecordsManager()There is also a management command that deletes all old records from all models with theold_recordsmanager:python manage.py delete_old_records
Package: django-olympus
django-olympus[![build-status-image]][build-status]
[![coverage-status-image]][codecov]
[![pypi-version]][pypi]Collect data from django models into ElasticSearch.This Django application provides aOlympusCollectorclass that is a wrapper for theElasticSearchAPI and database
(using their official package).To know more about how to use it, please check theSetupsection.SetupAfter addingdjango-olympusas part of your required packages, addolympustoINSTALLED_APPSin yoursettings.py.The following settings are available for customization:NameDefaultDescriptionOLYMPUS_ELASTICSEARCH_URLNoneThis should point to theElasticSearchserver running.OLYMPUS_ELASTICSEARCH_VERIFY_CERTSNoneThis should tell whether certificates should be verified - only set this to false for local developmentSince this application provides a baseline Collector class, this will help you bootstrap data collectors to send
information toElasticSearch. The following section details how to write your own collectors.CollectorsTo create your own collector, in any Django app of your project, extend theOlympusCollectorclass and implement thecollectmethod to specify all the logic you need.#myapp/occ.pyfromolympus.baseimportOlympusCollectorclassSampleCollector(OlympusCollector):index_name="sample_collector"# can be anything you'd like.index_date_pattern="%Y.%m.%d"# can be anything you'd like.index_lifecycle_name="something"# if you use default lifecycle policies and would like to assign a different one.defcollect(self):self.logger.info(f"started{self.index_name}")# Base class provides built-in logging.data=some_func()# Some logic to retrieve data, either from API, from Django's Database or whatever.yield={"_id":"1",# _id is mandatory and can be anything, really, as long as it is unique."some":data.attribute,"more":data.attribute2,}To keep collectors organized, you might want to create anocc.pyfile in each app, implementing the collectors. Each
app can implement as many collectors as necessary, there is really no restrictions.olympusAPI provides aDjangocommand calledpush_to_eswhich allows you to run a collector. To run the sample
above,./manage.py push_to_es myapp.SampleCollectorwould be required.Apps with collectors must be part of yoursettings.pyfile, otherwise collectors are not initialized and not addedto the list - hencepush_to_eswill fail.
Package: django-omblog
|PyPI version| |image1| |Downloads| |image3| |Coverage Status| |image5||Build Status|Omblog is a django based blog system designed to have a smooth, minimalwriting experience so it's a joy to use and be heavily cached so it cantake a battering.It is currently being worked on after a long break, however please beaware that at this current time there is no default frontend skin fordisplaying your posts, there is only the UI for creating / editing.`The documentation will help you getstarted <http://django-omblog.readthedocs.org/>`__If you're looking for a blog that you can style to death that can take abattering, then give omblog a try... figure:: http://django-omblog.readthedocs.org/en/latest/_images/create-3.png:alt: The writing UIThe writing UICurrent Features-----------------  Minimal UI for writing posts-  Drag and drop image uploading with automatic thumbnailing-  Syntax highlighting-  Keyboard shortcut to save posts-  Tab key inserts 4 spaces and doesn't bounce out of the writingarea.-  If you have Django's cache backend configured, it can take abattering.Credits-------The following libraries / plugins are included in omblog; many thanks isextended to the authors for their fine, fine work.-  `jQuery <http://jquery.com/>`__-  `ICanHaz.js <http://icanhazjs.com/>`__-  `jquery.autosize.js <https://github.com/jackmoore/autosize>`__-  `mousetrap.js <http://craig.is/killing/mice>`__-  `jquery.slugify <http://patrickmcelhaney.com/jQuery-Slugify-Plugin/>`__-  `django-thumbs <https://pypi.python.org/pypi/django-thumbs>`__|Bitdeli Badge|.. |PyPI version| image:: https://badge.fury.io/py/django-omblog.png:target: http://badge.fury.io/py/django-omblog.. |image1| image:: https://obscure-misc.s3.amazonaws.com/spacer.png.. |Downloads| image:: https://pypip.in/d/django-omblog/badge.png.. |image3| image:: https://obscure-misc.s3.amazonaws.com/spacer.png.. |Coverage Status| image:: https://coveralls.io/repos/jamiecurle/django-omblog/badge.png?branch=develop:target: https://coveralls.io/r/jamiecurle/django-omblog.. |image5| image:: https://obscure-misc.s3.amazonaws.com/spacer.png.. |Build Status| image:: https://jenkins.curle.io/buildStatus/icon?job=django-omblog-django-1.6.1.. |Bitdeli Badge| image:: https://d2weczhvl823v0.cloudfront.net/jamiecurle/django-omblog/trend.png:target: https://bitdeli.com/free
Package: django-omCmsMain
Open Minds CMS==============Open Minds CMS - Content Management SystemSimple CMS built in Python DjangoIt is aimed to quick deploy a website, using BootStrap and Material Design Light, with a minimal templating capabilities.It still an ongoing project.Please check the Docs: http://omcmsdocs.readthedocs.io/Quick start-----------If you are impatient like me, itching to see something making noise and smoke, you can take this quick run! ;-)1. Create a new Django ProjectIt is higly recomended that you use virtualenv to encapsulate it - https://virtualenv.pypa.io/django-admin startproject [yourProjectName]2. In [yourProjectName]/settings.py, add "omCmsMain" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'omCmsMain',]3. Edit [yourProjectName]/urls.py and make this changes:3.1 Import include:from django.conf.urls import url, include3.2 Include the omCmsMain URLconf in your project urls.py **AFTER** admin URLs, like this:urlpatterns = [url(r'^admin/', admin.site.urls),url(r'^', include('omCmsMain.urls')),]4. Run `python manage.py migrate` to create the omCmsMain models.5. Start the development server and visit http://127.0.0.1:8000/admin/to add content to your site.6. Visit http://127.0.0.1:8000/ to see omCmsMain content.
Package: django-oml
Welcome to the documentation for django-oml!OML means Object Moderation Layer, the idea is to have a mixin model that
allows you to moderate several kinds of content.On config set up a dictionaryOML_CONFIG = {

        # True if some groups wont be moderated
        'OML_EXCLUDE_MODERATED': True/False,

        # List of groups id that will be omitted
        'OML_EXCLUDED_GROUPS': []

}This is still a project in developmentRunning the TestsYou can run the tests with via:python setup.py testor:python runtests.pyThis project plays well with the following Django versions:Django 1.5Django 1.6Django 1.7 (not with python 2.6)With python 2.7 and python 2.6 (except for Django 1.7).
Package: django-omnibus
# django-omnibusDjango/JavaScript WebSocket Connections.[![Coverage Status](https://coveralls.io/repos/moccu/django-omnibus/badge.png)](https://coveralls.io/r/moccu/django-omnibus)
[![Travis Status](https://travis-ci.org/moccu/django-omnibus.png?branch=master)](https://travis-ci.org/moccu/django-omnibus)## What is django-omnibusdjango-omnibusis a Django library which helps to create websocket-based
connections between a browser and a server to deliver messages.Some use cases could be:Chat systemsRealtime stream updatesInter-browser communicationfile transfersand so on..django-omnibusis quite extensible. The connection handler, the
Tornado web application and the authenticator can be replaced by just changing
a setting.For browser compatibilitydjango-omnibusalso supports
[SockJS](https://github.com/sockjs/sockjs-client) (which provides fallbacks for
older browsers).On the client side, django-omnibus provides a library which handles
the connection, authentication and channel subscription (multiple channels can
be subscribed using one connection).## Installation & DocumentationAll documentation is in the “docs/source” directory and online at
[Read the Docs](https://django-omnibus.readthedocs.org/).## Licensedjango-omnibusis licenced under the [BSD License](LICENSE.md).
Package: django-on-call
If there’s somthing strange in yourDjangoapp, who you gonna call?
The django-on-call app helps your users figure that out, pointing them
to one of your on-call sysadmins.  The admins can work out an on-call
schedule among themselves, by posting a Python statement to the
database (we’re all consenting adults), and the view page will direct
users to the appropriate on-call individual.Quick-startIf you don’t have a Django project and you just want to run
django-on-call as a stand-alone service, you can use the example
project.  Initialize the database with:$ python example/manage.py syncdbSee theDjango documentationfor more details.RunRun the app on your local host with:$ python example/manage.py runserverYou may need to add the current directory toPYTHONPATHsopythoncan find thedjango_on_callpackage.  If you’re runningPOSIX shell, that’s:$ PYTHONPATH=".:$PYTHONPATH" python example/manage.py runserverManageYou might have several on call positions (sysadmins, webmasters,
developers, …), and you can have a separateOnCallinstance for
each position.  You should use theadmin interfacetocreatethe
instances, after which your users can access them.  If you’re using
the example project and you created anOnCallinstance withsysadminas the slug, they’ll usehttp://localhost:8000/on-call/sysadmin/.A list of all positions is given by theListViewbound tohttp://localhost:8000/on-call/.  If yourOnCallinstances are
returning something short and sweet (e.g. “John Doe (+1 234 567
8901)”), this list view may be all you need.If you only want a few staticOnCallinstances, you can consider
managing them withfixturesinstead of using the admin interface.
Package: django-on-demand
Manage suppliers and consumers in an on-demand marketplace.
Think of it like an API to build services like Airbnb, Upwork, or any marketplace where you have suppliers offering a service or product, and consumers searching for specific characteristics of the product or service.This app provides models and API endpoints to facilitate the implementation of the marketplace.Full documentation onhttps://django-on-demand.readthedocs.io/en/latest/Endpoints/search-suppliers/users/<id>/supplier-profile(create, update, retrieve)/users/<id>/consumer-profile(create, update, retrieve)/newest-suppliers/connection(create a connection between supplier and consumer, update, terminate)Quick start1. This app is usingdjango-rest-frameworkto provide API endpoints, which means this app will need to be added to the list of installed apps.
The app will automatically installdjango-rest-frameworkif it’s not installed.on_demandalso needs to be added to the list of installed apps:INSTALLED_APPS = [
    ...
    'on_demand',
    'rest_framework'
]Given that the app has models, a db client should be installed. For examplepip install mysqlclientInclude the Django On Demand URLconf in your project urls.py like this:path('ondemand/', include('on_demand.urls')),Runpython manage.py migrateto create the models.Visithttp://127.0.0.1:8000/ondemand/to test the new API.
Package: django-oneall
OneAll(http://www.oneall.com) provides web-applications with a unified API for30+ social networks.django-oneallis a Django app providing allowing user authentication and management through OneAllRequirements:djangopyoneallThis package provides user authentication capabilities based ondjango.contrib.auth. It provides the following
components:Authentication BackendAn identity model which stores a cached copy of the user’s identityA callback view for the authentication processInstallation:pip install django_oneallSee thefull documentationfor configuration.LicenseCopyright (c) 2013-2017, Leandigo (www.leandigo.com) andEkevoo.Released under the MIT License. See theLICENSEfile for details.
Package: django-onerror
django-onerrorDjangowindow.onerrorReportInstallationpipinstalldjango-onerrorUrls.pyurlpatterns=[url(r'^e/',include('django_onerror.urls',namespace='django_onerror')),]orfromdjango.conf.urlsimportinclude,urlfromdjango_onerrorimportviewsaserr_viewsurlpatterns=[url(r'^report',err_views.err_report,name='err_report'),]Settings.pyINSTALLED_APPS=(...'django_onerror',...)FrontEnd<script>window.onerror=function(errorMessage,scriptURI,lineNo,columnNo,error){if(['Uncaught ReferenceError: WeixinJSBridge is not defined','ResizeObserver loop limit exceeded'].indexOf(errorMessage)>=0){return}// 构建错误对象varerrorObj={href:window.location.href,ua:window.navigator.userAgent,lineNo:lineNo||0,columnNo:columnNo||0,scriptURI:scriptURI||null,errorMessage:errorMessage||null,stack:error&&error.stack?error.stack:null};// 构建Http请求if(XMLHttpRequest){varxhr=newXMLHttpRequest();xhr.open('post','/e/report',true);xhr.setRequestHeader('Content-Type','application/json');// 设置请求头xhr.send(JSON.stringify(errorObj));// 发送参数}}</script>IgnoreUncaught ReferenceError: WeixinJSBridge is not definedResizeObserver loop limit exceededResizeObserver - loop limit exceeded
Package: django-onesky
OneSky Inline Translation library for DjangoSee full documentation athttp://www.oneskyapp.comTo wrap text string with <os-p> tag:trans('my string')To wrap text string with special prefix and suffix:trans2('my string')InstallationInstall viapip:$ pip install django-oneskySetupAddoneskyto INSTALLED_APPS in your django settings file.INSTALLED_APPS = (
    ...
    'onesky',
    ...
)
Package: django-onetime
OneTime is a drop-in Django app that allows you store callbacksin your database to be called once another event has taken place.In its most basic form, it has two main parts.  First, you give`onetime.call_later` a callable to execute when the event happens.Second you hook up the CallbackMiddleware which will call the callablewith the arguments you supply to `call_later()`.views.py========::# Log a user in via emailfrom onetime import call_laterdef login(request=None, user_id):user = User.objects.get(id=user_id)request.session['logged_in_user'] = userdef email_login_link(request):alleged_user = User.objects.get(id=request.GET['user_id'])onetime_id = call_later(login, user_id=alleged_user.id)email_utils.sendmail(alleged_user.email,"Login Link","Login by clicking <a href='http://mysite/?onetime_id=%s'>here</a>"%onetime_id)settings.py===========::MIDDLEWARE_CLASSES = ('onetime.middleware.CallbackMiddleware',...)If the callable you are passing in to call_later is in fact a Djangoview that needs its first parameter to be the incoming request, youcan instead use `onetime.call_view_later` which will pass in the subsequentrequest as the first parameter to the callable.Settings========ONETIME_REQUEST_PARAMETER The request.REQUEST key we should look underwhile searching for OneTime IDs.  Can be any url-safe string, defaultsto `onetime_id`.
Package: django-onetimelink
DescriptionA Django file streaming application to provide download links that only valid for one time click. Ispired by django-dynamic-link.LicenseBSD-3-Clause licenseNotesTested with Django 2.2Tested with Django 3.1FeaturesOne-time only download linkInstallationDependencesThis app onlyInstallationInstallation with pip (recommended)Pip will download and install the package and take care of all the dependences.
If you havn’t pip on your system then install setuptools first after that run “easy_install pip”.
After that you can use pip in your terminal window.Use the stable release (recommended):pip install django-onetimelinkWith pip you can also uninstall:pip uninstall django-onetimelinktest your installationGo to console and type:python… then type:>>> import onetimelink
>>> onetimelink.CKINST()
>>> help(onetimelink)
>>> exit()SetupAdd “onetimelink” to you installed apps in the settings file.Make sure that:Your Admin is enabled (‘django.contrib.admin’, is in your INSTALLED_APPS).‘django.contrib.auth.context_processors.auth’, (also for admin) is in TEMPLATE_CONTEXT_PROCESSORS.‘django.core.context_processors.request’, is in TEMPLATE_CONTEXT_PROCESSORS.Add the following to your urls.py:from django.conf.urls import include, urlfrom onetimelink import presettingsurl(r’%s/’ % presettings.DYNAMIC_LINK_URL_BASE_COMPONENT, include(‘onetimelink.urls’)),Finally run:python manage.py makemigrations
python manage.py migrate
python manage.py runserverMake it customUse the global settings.py in your projects root to overwrite the applications presettings with the following variables.DYNAMIC_LINK_MEDIADefault: settings.MEDIA_ROOTA path to a directory. From this point you can walk down the subdirectories to choose your files to serve.DYNAMIC_LINK_URL_BASE_COMPONENTDefault: ‘OneTimeLink’A string that modifies your url serve path.Example: www.example.com/DYNAMIC_LINK_URL_BASE_COMPONENT/link/3839hd8HKl3/example.zip.DYNAMIC_LINK_UPLOAD_TODefault: ‘’Uploaded files base directory.DYNAMIC_LINK_SCHEMA_PROTODefault: ‘http’HTTP Schema Protocal.UsageOpen the admin interface and go to “OneTimeLink” section. The rest should be self-explanatory.HintsUpload Files to upload the file to DYNAMIC_LINK_MEDIAThe filename from the in Upload Files is only for human readability. You can delete or change these filenames in any way you want.Through the action button you can serve a site with all the files from Upload Files.Changelogs2021-03-24Add setting for schema protocolPrefix links with FORCE_SCRIPT_NAME2021-03-25Fix several bugsDo NOT use previous versions of this package2021-06-08Fix search bug in adminclean up codeDo NOT use previous versions of this package2022-02-04Add setting to override HTTP Hostclean up codeFix several bugsDo NOT use previous versions of this package2022-09-27Add DYNAMIC_LINK_USE_FORCE_SCRIPT_NAME settingAdd HTTP Host override settingFix several bugsclean up codeDo NOT use previous versions of this package2022-10-31Add support for Django 4Remove support for Python 3.6, 3.7 as Django 4 requires min 3.8Do NOT use previous versions of this package
Package: django-one-time-notices
django-one-time-noticesDisplays a modal with notice content if a user hasn't seen it yet.Installpip install django-one-time-noticesSettingsAdd toINSTALLED_APPS:django.contrib.auth
django.contrib.admin
...
noticesAdd toTEMPLATES['OPTIONS']:TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                ...
                'django.core.context_processors.request'
                ...
                'notices.context_processors.notices',
            ]
        }
    }
]To customise the notice colour (button and title border), addNOTICES_COLOUR=<colour>  # any css-acceptable colourStatic assetsAddnotices/css/notices.cssandnotices/js/notices.jsto your markup.UsageIn templates, load the tags:{% load notices_tags %}and add the modal:{% NoticesModal %}The modal will be shown.  Once it has been dismissed it won't be shown again unless the notice version changes (see below), thenotice_seencookie is deleted, or the notice timeout is reached.Setting/updating the noticevia models and django adminAdd aNoticeinstance in the django admin.Notices havetitle,content,versionand optionaltimeout_seconds,starts_atandexpires_atfields.Version can be any positive number; it defaults to incrementing the last version number.  Set theexpires_atdatetime to avoid showing this notice after the specified date, even if the user has never seen/dismissed it. Set thestarts_atdatetime to avoid showing the notice until a
particular date/time.Note that only the notice with the latest version will be shown. If the latest version
has not started yet, a previous version will not be shown, even if it hasn't expired.Set thetimeout_secondsto set a cookie timeout; this means the notice will be reshown.To show a new notice, add another Notice instance with an incremented version number.configure settingsNOTICES_COLOUR: Change the colour of the popup with any css colourNOTICES_SAFE: Mark notices content as safe - allow any arbitrary html. Default False.via django settingsOverride the Notice model by adding to yoursettings.py:NOTICES_VERSION# an integerNOTICES_TITLE# optional, default = "New!"NOTICES_CONTENT# optional, default = ""NOTICES_TIMEOUT_SECONDS# optional, default = NoneSetNOTICES_VERSION = 0to clear the cookie and disable showing notices at all.