Saravanan666/pypi-org huggingface dataset:
Package: django-freeipa-auth
Django FreeIPA Auth is a backend authentication app with a simple server failover solution
which can be included in a project’s authentication backends. This app communicates with a specified
FreeIPA host server and authenticates a user to the django app upon successful freeIPA login.Detailed documentation is in the “docs” directory.Quick startInstall using pip:pip install django_freeipa_authIf running on an old version of python without security updates, include the security marker:pip install django_freeipa_auth[security]Add “freeipa_auth” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'freeipa_auth',
]Add “freeipa_auth.backends.FreeIpaRpcAuthBackend” to your AUTHENTICATION_BACKENDS
in your settings file like this:AUTHENTICATION_BACKENDS = [
    ...
    'freeipa_auth.backends.FreeIpaRpcAuthBackend',
]Override settings in your settings file like this:FREEIPA_AUTH_BACKEND_ENABLED = True
FREEIPA_AUTH_SERVER = "ipa.foo.com" # defaults to None
FREEIPA_AUTH_FAILOVER_SERVER = "ipa.failover.com" # defaults to None
FREEIPA_AUTH_SSL_VERIFY = True # this would be the path to the ssl cert used
FREEIPA_AUTH_UPDATE_USER_GROUPS = True # defaults to False
FREEIPA_AUTH_ALWAYS_UPDATE_USER = True
FREEIPA_AUTH_USER_ATTRS_MAP = {"first_name": "givenname", "last_name": "sn", "email": "mail"}
FREEIPA_AUTH_SERVER_TIMEOUT = 5Start the development server and visithttp://127.0.0.1:8000/admin/to login via freeipa rpc authentication.Running TestsTests are run usingtoxto test on multiplepythonandDjangoversions. To avoid needing to install multiple python binaries, use thedocker-compose.test.ymlconfig to run the test in a Docker container.``bashdocker-compose-fdocker-compose.test.ymlup `
Package: django-freeipa-auth-json
django-freeipa-authdjango-freeipa-authprovides a Django backend authentication app for FreeIPA authentication. The app uses FreeIPA JSON API for its operation.Quick startInstall usingpippip install django-freeipa-auth-jsonAddfreeipatoINSTALLED_APPSin the settings file.INSTALLED_APPS=[...'freeipa',]Addfreeipa.auth.backends.AuthenticationBackendtoAUTHENTICATION_BACKENDSin the settings file.AUTHENTICATION_BACKENDS=[...'freeipa.auth.backends.AuthenticationBackend',]Add following settings to the setting files# REQUIRED:IPA_AUTH_SERVER='ipa.demo1.freeipa.org'# OPTIONAL:IPA_AUTH_SERVER_SSL_VERIFY=TrueIPA_AUTH_SERVER_API_VERSION='2.230'# Automatically update user information when logged inIPA_AUTH_AUTO_UPDATE_USER_INFO=True# Automatically create and update user groups.IPA_AUTH_UPDATE_USER_GROUPS=True# Dictionary mapping FreeIPA field to Django user attributesIPA_AUTH_FIELDS_MAP={'givenname':'first_name','sn':'last_name','mail':'email',}Command Linedjango-freeipa-authprovidesyncipacommand to import and update users stored in Django database with FreeIPA server.usage: manage.py syncipa [-h] [-u USER] [-p PASSWD] 

Synchronizing data with FreeIPA server

optional arguments:
  -h, --help                  show this help message and exit

login arguments: require a user with permission to query all users (e.g. administrator.)
  -u USER, --user USER
  -p PASSWD, --passwd PASSWD
Package: django-freeperms
BugsContentsOverviewUsageSettingsANONYMOUS_USERNAMEANONYMOUS_PERMISSIONSChangelogOverviewfreepermsprovides a simple and generic way to expose an
application’s permissions to anonymous users. Take a wiki app or an
issue tracker for example. In one deployment it might be appropriate
to require a user login to edit pages or submit tickets for bugs, but
in another deployment you might want to allow anonymous editing.Applications that take advantage of thedjango.contrib.authpermissions framework (outside ofdjango.contrib.admin) can be
used withfreepermsso that they don’t directly need to handle
delegating features to anonymous users.UsageAdd the middleware to your settings, at the end:MIDDLEWARE_CLASSES = (
    'freeperms.middleware.AnonymousPermissionsMiddleware'
)Then expose the permissions you want to grant to anonymous users:ANONYMOUS_PERMISSIONS = (
    'wiki.add_page',
    'wiki.change_page',
    'wiki.delete_page',
    'tickets.add_ticket',
    'tickets.change_ticket',
)You can also register or unregister permissions from anywhere in your
Python code:>>> import freeperms
>>> freeperms.register('wiki.add_page')
>>> freeperms.unregister('wiki.add_page')SettingsANONYMOUS_USERNAMEThe username to use for anonymous users.ANONYMOUS_PERMISSIONSA sequence of permissions in the form ‘app_label.code_name’.Changelog0.1Initial release.
Package: django-freezer
Code can be found here.https://github.com/inirudebwoy/django-freezerDocs.http://django-freezer.readthedocs.orgInstallationInstall from pip:pip install django-freezerPut package in INSTALLED_APPS.:INSTALLED_APPS += ('django_freezer',)In urls.py add import of AdminSiteExtended from djangofreezer:from django_freezer.admin import AdminSiteExtendedNext create new extended site before calling autodiscover():admin.site = AdminSiteExtended()If you are using Django 1.7 and higher than it is necessery to disable autodiscover
as permanualRunning unit testsJust use tox::$ tox
Package: django-french-highschool
django-french-highschoolFrench high school database with UAI, department and regionInstallationInstall with pip:pip install django-french-highschoolSetupIn order to makedjango-french-highschoolworks, you need to follow the steps below:SettingsFirst, you need to add the following configuration to your settings:INSTALLED_APPS=['django.contrib.admin','django.contrib.auth',...,'french_highschool',...]MigrationsNext, you need to run the migrations in order to update your database schema:python manage.py migrateFixturesThis app comes with existing data from french high schools. To load the data in the database run:python manage.py loaddata high_school
Package: django-fresh
# django-freshdjango-fresh will auto-refresh your browser whenever you update to any of thefiles in your project. Very useful for development, not intended forproduction!## How It Worksdjango-fresh injects a small piece of JavaScript into each of your HTML pageswhich will then make the page poll your Django app checking if files werechanged. If django-fresh sees that you modified a file it will tell the nextpolling to refresh the page.## Setup1. Install fresh by running `pip install django-fresh`.2. In `settings.py` add `fresh` to `INSTALLED_APPS`.3. In `settings.py` add `fresh.middleware.FreshMiddleware` to `MIDDLEWARE_CLASSES`.4. In `settings.py` have `SITE_ROOT` variable set to the absolute path of your projects files.5. In `urls.py` add `url(r'', include('fresh.urls'))` to `urlpatterns`.### `SITE_ROOT` ExampleThis will dynamically grab the location of your settings file and make it yoursite root, django-fresh will recursively watch everything in the settings file'sfolder.SITE_ROOT = os.path.dirname(os.path.abspath(__file__))**Note:** Be sure you `import os` before using the above code or you'll get anerror!## Optional Custom SettingsYou have two customizable choices:1. `FRESH_ACCEPTED_EXTENSIONS` is an array that is checked when files are updated, if an extension is not in the list it won't trigger a refresh.2. `FRESH_IGNORED_PAGES` is an array that is checked before injecting the refresh code, if page in list it won't have the code injected.### `FRESH_ACCEPTED_EXTENSIONS` DefaultsFRESH_ACCEPTED_EXTENSIONS = ['.py','.html','.js','.css',]### `FRESH_IGNORED_PAGES` DefaultsFRESH_IGNORED_PAGES = ['/admin/','/admin_keywords_submit/',]## Noticedjango-fresh checks to see if `debug` is `True`, if it is `False` it doesn't doanything to prevent you from accidently including it in production.## License (Simplified BSD)Copyright (c) Isaac BythewoodAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice,this list of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ANDANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FORANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED ANDON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: django-freshdesk
Single Sign-On functionallity between Django and Freshdesk.The Freshdesk documentation for Single Sign-On is located atFreshdesk documentationHow to useGet the codeGetting the code for the latest stable release using pip:$ pip install django-freshdeskYou can also download the source and run:$ python setup.py installAdd the application to the project settingsMake sure that .django.contrib.auth’ is installed and then add register ‘freshdesk’
in the ‘INSTALLED_APPS’ section of your project’s settingsINSTALLED_APPS = (
    ...
    'django.contrib.auth',
    'freshdesk',
)Setup the settings variablesYou must specify two settings variables in your settings module.The URL of your support page, will either a subdomain in freshdesk.com
or your own domain (using a CNAME record)FRESHDESK_URL = 'http://yourcompany.freshdesk.com/'The shared secret you get from Freshdesk when setting up Simple SSOFRESHDESK_SECRET_KEY = '098f6bcd4621d373cade4e832627b4f6'Register the urlsAdd the application urls to your urlconfurlpatterns = [
    ...
    url(r'^login/sso/', include('freshdesk.urls')),
]RequirementsPython 2.7, 3.4, 3.5 or 3.6Django >= 1.8Bugs and requestsIf you have found a bug or or you have a ny request, please use the issue tracker on GitHub.https://github.com/ThatGreenSpace/django-freshdesk/issuesLicenseYou can use this software under BSD License.History1.1.0Add name to authenticate urlAdd support for Django 1.11 and Python 3.61.0.1Unicode first1.0.0Add support for Django 1.100.4.0Change data for HMAC-MD5 per Freshdesk’s change.0.3.0Add Tox environments for Django 1.8 using Python 2.7, 3.3, 3.40.2.2Fix Django version compatibility. Django 1.5 not supported anymore.0.2.1Username as default if not first and last name defined0.1.4Serveral fixes and updated doc0.1.0Initial application
Package: django-freshdesk-sso
Django Freshdesk SSO enables SSO for freshdesk from your django application.This package replaces the stale and out of datedjango-freshdeskpackage.Quick startAdd “freshdesk_sso” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'freshdesk_sso',
]Include the freshdesk SSO URLconf in your project urls.py like this:path('accounts/login/sso/', include('freshdesk_sso.urls')),Add the required environment variables to your settings.py file:FRESHDESK_URL = 'http://yourcompany.freshdesk.com/'
FRESHDESK_SECRET_KEY = 'YOUR_SECRET_GOES_HERE'Publishing to PyPiIf you’re a maintainer of this package, you’ll needpoetryto publish to PyPi.Push your changes to the main branchBump the version and commit:poetry version the_new_version
git add pyproject.toml
git commit -m "Version bump old_version -> new_version"Build and publish:poetry build
poetry publish
Package: django-fretboard
[![Build Status](https://travis-ci.org/tBaxter/django-fretboard.svg?branch=master)](https://travis-ci.org/tBaxter/django-fretboard)Django-Fretboard is a fork of the forums used on gretschpages.com/forum/It is currently built for Django 2.0+, and is not compatible with older versions of Django. It has also been updated to use Python 3, because seriously, why wouldn’t you at this point?### Settings
There are a few settings you may wish to override in your project settings.pyPAGINATE_BY: defaults to 25FORUM_BASE_NAME: defaults to site nameCOMMENT_PLACEHOLDER: placeholder text for post box.### Requirements:[Tango Shared Core](https://github.com/tBaxter/tango-shared-core) is used for standardizing images and allows for voting.
Package: django-friendly-captcha
Django field/widget for Friendly Captcha (https://friendlycaptcha.com).InstallationLatest version:pip install -e git+git://github.com/christianwgd/django-friendly-captcha.git#egg=django-friendly-captchaStable version:pip install django-friendly-captchaDocumentationUsageAdd ‘friendly_captcha’ to your INSTALLED_APPS.INSTALLED_APPS = [
    ...
    'friendly_captcha',
]Add the captcha field to your form:from friendly_captcha.fields import FrcCaptchaField


class ContactForm(forms.ModelForm):

    class Meta:
        model = ContactMessage
        fields = (
            'name', 'email', 'subject', 'text'
        )

    captcha = FrcCaptchaField()As of version 0.1.7 the javascript static assets are included in
the widget, so there is no need to do that in your project templates.
Version 0.1.9 includes friendly captcha version 0.9.14 javascript files.
If you need a different version you can set these by providing
them in your settings:FRC_WIDGET_MODULE_JS = 'https://unpkg.com/friendly-challenge@0.9.8/widget.module.min.js'
FRC_WIDGET_JS = 'https://unpkg.com/friendly-challenge@0.9.8/widget.min.js'For version 0.1.6 and below you need to include the script tags from
Friendly Captcha to your forms template
(seehttps://docs.friendlycaptcha.com/#/installation)<script type="module" src="https://unpkg.com/friendly-challenge@0.9.8/widget.module.min.js" async defer></script>
<script nomodule src="https://unpkg.com/friendly-challenge@0.9.8/widget.min.js" async defer></script>If you build up your form from single fields, dont’t forget to include
the captcha form field.ConfigurationRegister to Friendly Captcha athttps://friendlycaptcha.com/signupto get your
sitekey and captcha secret.FRC_CAPTCHA_SECRET = '<yourCaptchaSecret'
FRC_CAPTCHA_SITE_KEY = '<yourCaptchaSiteKey>'FRC_CAPTCHA_VERIFICATION_URL = 'https://api.friendlycaptcha.com/api/v1/siteverify'In default the form will fail with an error (‘Captcha test failed’). You can change
this behaviour by setting FRC_CAPTCHA_FAIL_SILENT to True.FRC_CAPTCHA_FAIL_SILENT = FalseWhen setting FAIL_SILENT to True it’s up to you to handle captcha verification:# in your form view
def form_valid(self, form):
    captcha_verified = form.cleaned_data['captcha']
    if captcha_verified:
        # send mail or whatever ...
    else:
        # captcha verification failed, do nothing ...Custom widget attributesYou can add custom widget attrs to the FrcCaptchaField like in any other
Django field:captcha = FrcCaptchaField(widget=FrcCaptchaWidget(attrs={'data-start': 'auto'}))Seehttps://docs.friendlycaptcha.com/#/widget_apifor additional widget attrs.
The data-lang attr is set from your Django configured language.LoggingIf you want to log the results of the captcha verifications you can
add a logger to your logging configuration:'django.friendly_captcha': {
    'handlers': ['default'],
    'level': 'INFO',
}
Package: django-friendly-tag-loader
Use templatetag libraries in Django templates to optionally support features.This app provides three template tags{% friendly_load %},{% if_has_tag %}and{% ifnot_has_tag %}.Used together you can built templates that have optional support for certain
template tags. You can use them if they are available and do something else if
they are not.InstallationAddfriendlytagloadertoINSTALLED_APPSUsage{% load friendly_loader %}in your templateLoad some optional taglib{% friendly_load comments %}Or load a specific tag{% friendly_load cycle from future %}Conditionally use its tag:{% if_has_tag render_comment_list %}
    {% render_comment_list for obj %}
{% else %}
    Comment support is not available
{% endif_has_tag %}{% friendly_load %}takes multiple arguments, so loading multiple optional
template tag libraries at once is supported:{% friendly_load comments webdesign website_tags %}{% if_has_tag %}and{% ifnot_has_tag %}can also handle multiple
arguments.In the case ofif_has_tagthis means that all given tags should be
available, so this will render nothing even thoughnowis a built-in tag:{% if_has_tag now nonexisting_tag %}
  {% now 'Y' %}
{% endif_has_tag %}Theifnot_has_tagcondition will trigger if any of the given tags is
unavailable. For example this will render the message since, even thoughnowis a built-in tag,nonexisting_tagis not available:{% ifnot_has_tag now nonexisting_tag %}
  Some tags are unavailable.
{% endifnot_has_tag %}CreditsOriginal Author:Jaap RoesCurrent Maintainer:Adam TaylorChanges1.3.1 (2018-08-14)Added support for Django 2.11.3 (2018-06-21)Dropped support for Django < 1.11Added support for Django 1.11 and 2.01.2.1 (2015-07-01)Django 1.8 support1.2 (2014-09-29)Dropped support for Django < 1.4Verified Django support up to 1.7Added Python 3 supportSupportfriendly_load tag from taglibsyntax1.1 (2012-06-01)Django 1.4 compatible1.0 (2011-10-21)Initial release
Package: django_friendlyurls
This Django application allows you to create urls that directly return views.There is no 302 Redirect.The most common use case is that you have URLs which return user profiles such ashttp://www.example.com/user/1Friendly URLs allow you to create a URL so that the user can also be accessed by going to:http://www.example.com/jeffThe key is that the address bar in the browser does not change to http://www.example.com/user/1The web server returns the same HTML document as http://www.example.com/user/1Flow-----The application looks up the string 'jeff' If it finds a friendly url match it will read out the absolute_pathand attempt to resolve it by putting it through the URL resolver a 2nd time.If it finds a resolution it will return that view.Usage-----Here is an example of how to implement friendly_urls for a user:I put this in models.py:from django.contrib.contenttypes import genericfrom friendlyurls import UrlMappingfrom django.contrib.auth.models import Userdef get_absolute_url(self):return u'/user/%s' % self.idUser.add_to_class('friendly_urls', generic.GenericRelation(UrlMapping))User.get_absolute_url = get_absolute_urlThis basically monkey patches the User model to add a field. You can then douser = User.objects.get(pk=1)user.friendly_urls.all()This will get a list of all the friendly urls.You shouldn't have to monkey patch all the models.Problems / Questions--------------------Don't forget to run syncdb because friendlyurls creates a table to store the URL mappings.Additional Settings-------------------FRIENDLYURLS_IGNORE_CASE - Set this to True if you want to ignore the case when trying to find a path. Default: FalseTodo Features-------------- Need to cache the results returned by a lookup for performance.Probably do a from django.core.cache import cachehttps://docs.djangoproject.com/en/dev/topics/cache/?from=olddocs
Package: django-frontadmin
Frontadmin is a django app to conduct web-based frontend admin. This is not replace your actual admin however you can build admin like functionality in frontend.Quick startAdd “frontadmin” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    'frontadmin', #Add this exactly in top
    ...
    'django.contrib.humanize', #Add this exactly in last
]Add below commands in your settings.py:SITE_NAME = 'YOUR_SITE_NAME'Include the frontadmin URLconf in your project urls.py like this:path('', include('frontadmin.urls')),Run below command:python manage.py migrateStart the development server and visithttp://127.0.0.1:8000/I publish this package for my personal use to minimize the common task
however if someone found this usefull and want to know how it works please create
issue in project github.
Package: django-front-data
Django Front DataA reusable dependency free django front data appsSometimes we need to fetch unstructured data from back-end to front-end such as navbar. But this is boring task as you
have to design database for every type of data. We can avoid this by using a good JSON editor. This package contains a
good JSON editor for admin panel. Also this package has built-in serializers and django rest api support.InstallationInstall the packagepip install django-front-dataAdd into yours settings INSTALLED_APPSfront_data',If you have django rest framework installed you can add package urls to your
URL configpath('front-data/', include('front_data.urls'))You can only use front_data.urls if you have djangorestframework installedSettingsDEFAULT_SITE_DATAYou can use this setting to automatically add template. examples:DEFAULT_SITE_DATA = [
    {
        "name": "nav-bar",
        "data": [],
        "templates": [
            {
                "text": "Navbar",
                "value": {
                    "text": "",
                    "link": ""
                }
            }
        ]
    }
]Above example will create front data instance namednavbarwhen you start
your server. It will skip if there is alreadynavbarinstance in
database. This will also create a template namednavBar. See
template section about what you can do with template.
Package: django-front-door
django-front-doorSimple, easy to use, middleware to lock access to any django app based on request attributes.Quick StartAddFrontDoorMiddlewareto yoursettings.MIDDLEWAREas first as possible.MIDDLEWARE = (
     'front_door.middleware.FrontDoorMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
)
FRONT_DOOR_ALLOWED_IPS=[],  # allowed ips
FRONT_DOOR_ALLOWED_PATHS=[],  # url paths regex list always allowed
FRONT_DOOR_COOKIE_NAME=None,
FRONT_DOOR_COOKIE_PATTERN=None,
FRONT_DOOR_LOG_LEVEL=0 #
FRONT_DOOR_DEFAULT_POLICY=FORBID,
FRONT_DOOR_ENABLED=False,  # FrontDoor enable/disable
FRONT_DOOR_ERROR_CODE=404,  # status code if access denied
FRONT_DOOR_FORBIDDEN_PATHS=[],  # url paths regex list always denied
FRONT_DOOR_HEADER=None,  # special header name without HTTP- prefix
FRONT_DOOR_REDIR_URL="",  # HttpResponseRedirect(REDIR_URL) if access denied
FRONT_DOOR_ROUTER="front_door.router.DefaultRouter",
FRONT_DOOR_RULES=[
        "front_door.rules.internal_ip",  # grant access to settings.INTERNAL_IPS
        "front_door.rules.forbidden_path",  # DENY access to FORBIDDEN_PATHS
        "front_door.rules.allowed_ip",  # grant access to FORBIDDEN_PATHS
        "front_door.rules.allowed_path",  # grant access to ALLOWED_PATHS
        "front_door.rules.special_header",  # grant access if request has Header[HEADER] == TOKEN
        "front_door.rules.has_header",  # grant access if request has HEADER
        "front_door.rules.cookie_value",  # grant access if request.COOKIES[COOKIE_NAME]
        "front_door.rules.cookie_exists",  # grant access ir COOKIE_NAME in request.COOKIES
    ],
FRONT_DOOR_TOKEN=None,  # custom header value
Package: django-frontend
Django Frontend is a collection of static files and templates to jumpstart Django front-end development.With the convenience of an installable Django application, easily add some of the most widely used static files and create custom templates built on top of one of the most well-known, widespread templates (HTML5 Boilerplate.)Package:https://pypi.python.org/pypi/django-frontendSource:https://github.com/jonfaustman/django-frontendStarringHTML5 Boilerplate (5.3.0)Modernizr (2.8.3)normalize.css (4.2.0)jQuery (1.12.4), (2.2.4) and (3.1.0)jQuery UI (1.11.4)jQuery DataTables (1.10.12)jQuery Dynamic Formset (1.2.2)jQuery ScrollTo (2.1.2)jQuery Smooth Scroll (1.7.2)Twitter Bootstrap (3.3.7)Font Awesome (4.6.3)More InformationFor more information, instructions on how to get started, a changelog and a roadmapread the documentation.