Saravanan666/pypi-org huggingface dataset:
Package: djangohelpers
Contents:console scripts===============`maketemplatetag`-----------------A small script to output a new template tag to stdout, with human readablephrases encouraged. Inspired by the nice prepositions in django-tagging'stemplate tags.If djangohelpers is installed with `setup.py`, a `maketemplatetag` scriptwill be provided. Otherwise, it can also be invoked directly with`python djangohelpers/console_scripts.py`.Run `python djangohelpers/console_scripts.py` for usage information.middleware==========djangohelpers.middleware.AuthRequirementMiddleware--------------------------------------------------If enabled, it will intercept all requests that are not logged in, andredirect them to the login view.You can specify a list of anonymously-accessible URL paths (exempt fromthis middleware) with an ANONYMOUS_PATHS list in your settings.py file.These paths can be strings or regexes.Strings will be treated as URL PREFIXES to match against.Regexes will be matched against the URL directly.djangohelpers.middleware.HttpDeleteMiddleware---------------------------------------------If enabled, it will intercept requests with a querystring key `delete`.GET requests will result in a confirmation form, and POST requests willhave their REQUEST_METHOD set to DELETE.view decorators===============djangohelpers.allow_http------------------------@allow_http("GET", "DELETE")def my_view(request, ...)Requests with an allowed REQUEST_METHOD will be passed through untouched,and all other requests will return HTTP 405 Method Not Allowed.djangohelpers.rendered_with---------------------------@rendered_with('foo/bar.html')def my_view(request, ...)If your view function returns a dict, it will be treated as a template contextand the template foo/bar.html will be rendered and returned.  If your viewfunction returns anything besides a dict, its response will be passed throughuntouched.An optional mimetype parameter is also supported:@rendered_with('foo/bar.json', mimetype='application/json')def my_view(request, ...)template tags=============djangohelpers.templatetags.helpful_tags---------------------------------------A small collection of template tags and filters:{% replace_value of 'b' with 7 in my_dict as new_dict %}{{my_dict|qsify}} # converts a dict into a query string{{sometextwithwhitespace|split}}{{my_dict|getitem:'b'}}{{value|lessthan:12}}{{value|greaterthan:12}}Originally developed at the Columbia Center for New Media Teaching & Learning.
Package: django-helpful
A handful of utilities for Django!InstallCopy to helpful or include as git submoduleAdd`'helpful',`to`INSTALLED_APPS `HELPFUL_EMAIL_MODE='PROD'|'DEBUG'|'BLANK'HELPFUL_EMAIL_DEBUG_INFO=True|FalseHELPFUL_EMAIL_DEBUG_TO_EMAIL=['debug@email.com']Template Tagsimage2base64convert image to base64{% image2base64 "image.png" %}object_dict{% load object_dict %}
{% for field in message|object_dict %}
    {{ field.verbose_name }}
    {{ field.display }}
{% endfor %}abs_puth{% load abs_puth %}
{% abs_puth "static" "django/img/logo.png" %}
{% abs_puth "media" "uploads/photos/joue.jpg" %}
{% abs_puth "base" "templates/e-mail/css/style.css" %}
{% abs_puth "parent" "extra/logo.png" %}easy_emailtemplate must be ‘email/contacts’
files ‘email/contacts.html’ and ‘email/contacts.txt’
must will existfromhelpful.easy_emailimportmailmail(subject,context,template,from_email,to_email,connection=None,reply_to=None,attach_files=[],cc=None,bcc=None)
Package: django-help-me
Help MeA simple app for providing a simple help desk for users.PrerequisitesThis package makes use of JSON fields so you’ll need Download and install Postgresql.  This will change with Django 3.1+ and the universal JSON field.InstallationIt is highly reconmended that you use a Virtual Environment before installing.To install, just use pip>pipinstalldjango-permafrostIf you plan to use our templates you will need to installe these additional pacakges too (they are included in the ‘dev’ extensions):>pipinstalldjango-crispy-formsdjango-multiselectfieldFor developersIf you haven’t already, you will need to
Set up database and user.
-Start the postgres server
-Open the psql console
-In your console run the following db commands (credentials found in settings.py)CREATEDATABASEhelpme;CREATEUSERdjangoWITHPASSWORD'password';ALTERROLEdjangoSETclient_encodingTO'utf8';ALTERROLEdjangoSETdefault_transaction_isolationTO'read committed';ALTERROLEdjangoSETtimezoneTO'UTC';GRANTALLPRIVILEGESONDATABASEhelpmeTOdjango;\q#exits the consoleWe have a pre-build ‘develop’ project we work from included in this repo.  It’s very basic and is used for testing in a consistent Django environment.First, create your virtual environment.To install the necessary packages for the “develop” project, run the following command from the root of the repo:>pipinstall-e.[dev]This tells pip to install the package in the virtual environment but still keep things editable (by linking the package instead of copying it).cd into the developer and apply any migrations…>./manage.pymigrateCreate your superuser account…>./manage.pycreatesuperuserOptionally load fixtures…>./manage.pyloaddatadeveloperrun the Django project normally with>./manage.pyrunserver
Package: django-hermes
django-hermesA light-weight blogging app for Django.InstallationDownloadpip install django-hermesAdd To Installed AppsIn your django settings file, add hermes to your INSTALLED_APPS:INSTALLED_APPS = (
    ...
    'hermes',
    ...
)Setup URLsInclude hermes.urls in your ROOT_URLCONF:url(r'^blog/', include('hermes.urls')),Create TemplatesHermes expects three templates:hermes/post_list.htmlhermes/post_detail.htmlhermes/random_post_list.htmlTODOCreate Sphinx DocumentationSupport taggingAnnotations ala Medium?
Package: django-herobiz-ds
django-herobiz_dsdjango-herobiz_ds 는 herobiz-pro v2.3.1을 장고에 맞게 포팅한 장고앱이다.프로젝트에 설치하기herobiz 앱과 demian_parts 앱을 프로젝트 settings.py 의 INSTALLED_APPS 에 추가한다.importosINSTALLED_APPS=[...'demian_parts','herobiz',]...MEDIA_URL='/media/'MEDIA_ROOT=os.path.join(BASE_DIR,'media/')X_FRAME_OPTIONS='SAMEORIGIN'프로젝트의 urls.py에 herobiz url을 추가한다.fromdjango.urlsimportpath,includefromdjango.confimportsettingsfromdjango.conf.urls.staticimportstaticurlpatterns=[...path('',include('herobiz.urls')),]ifsettings.DEBUG:urlpatterns+=static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)포트폴리오를 입력하기 위해서 프로젝트에 herobiz 데이터베이스를 생성한다.python manage.py makemigrations herobiz demian_parts
    python manage.py migrate
    python manage.py createsuperuserhttp://127.0.0.1:8000/admin으로 접속하여 포트폴리오를 입력한다.프로젝트 구조 생성하기개별 업체의 static 폴더 경로를 INSTALLED_APPS 에 추가한다.importosSTATICFILES_DIRS=[os.path.join(BASE_DIR,'_static/'),]_data 폴더를 생성하고 contents.py내에 데이터를 형식에 맞게 입력한다._static 폴더를 생성하고 각종 이미지 등을 형식에 맞게 저장한다.참고 : SCSS 설치하기 - 프로젝트에 SCSS를 설치해야 앱이 작동한다.https://www.accordbox.com/blog/how-use-scss-sass-your-django-project-python-way/django_compressor, django-libsass를 설치한다. (앱을 설치하면 자동으로 설치된다.)pip install django_compressor django-libsass프로젝트 settings.py 의 INSTALLED_APPS 에 다음을 추가한다.importosINSTALLED_APPS=[...'compressor',]COMPRESS_PRECOMPILERS=(('text/x-scss','django_libsass.SassCompiler'),)STATICFILES_FINDERS=['django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder','compressor.finders.CompressorFinder',]# compressor 앱을 실행하기 위해서는 STATIC_ROOT가 설정되어 있어야 한다.STATIC_ROOT=os.path.join(BASE_DIR,'staticfiles')
Package: django-hero-ds
django-hero_dsdjango-hero_ds is a Django app to use for demiansoft.Quick startAdd "hero" to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'hero',]코드를 넣고자 하는 위치에 다음을 추가 한다.{% load hero_tags %}
{% make_hero %}context examplecontext={"theme":"mentor_ds","hero":[{"bg":"bg1","title":"Say Tell Speak Talk","slogan":"Global connection starts with improving your speaking skills<br>Let’s get to talking!","btn":{"title":"Classes","link":"#classes"}},]}
Package: django-heroku
This is a Django library for Heroku applications that ensures a seamless deployment and development experience.This library provides:Settings configuration (Static files / WhiteNoise).Logging configuration.Test runner (important forHeroku CI).Django 2.0 is targeted, but older versions of Django should be compatible. Only Python 3 is supported.Usage of Django-HerokuInsettings.py, at the very bottom:…
# Configure Django App for Heroku.
import django_heroku
django_heroku.settings(locals())This will automatically configureDATABASE_URL,ALLOWED_HOSTS, WhiteNoise (for static assets), Logging, and Heroku CI for your application.Bonus points!If you set theSECRET_KEYenvironment variable, it will automatically be used in your Django settings, too!Disabling Functionalitysettings()also accepts keyword arguments that can be passedFalseas a value, which will disable automatic configuration for their specific areas of responsibility:databasestest_runnerstaticfilesallowed_hostsloggingsecret_keyYou can also just use this library to provide a test runner for your Django application, for use on Heroku CI:import django_heroku
TEST_RUNNER = 'django_heroku.HerokuDiscoverRunner'✨🍰✨
Package: django_heroku_db_utils
Django Heroku DB UtilsA package with a few utilities for accessing Heroku DB instancesFree software: MIT licenseDocumentation:https://django-heroku-db-utils.readthedocs.io.FeaturesDjango settings database wrapperBasic model copierCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-02-24)First release on PyPI.
Package: djangoherokudeployer
Makes the necessary changes to your django files and deploys them to heroku.Usage:from primepastalib import herokuLogin, djangoDeploy#projectName is the name of your django project, and appName is the name that you’d your heroku app to have.#adds the required files and makes changes to the settings.py file, and deploys them to heroku. Make sure you’re logged in. Heroku will choose a name for the app.djangoDeploy(‘projectName’)#Does the same as above, except the name you pass will be used for the app.djangoDeploy(‘projectName’, ‘appName’)#You can also login to heroku by running the following: (It is recommended that you log into the heroku CLI yourself.)herokuLogin()
Package: django-heroku-hiberly
This is a Django library for Heroku applications that ensures a seamless deployment and development experience.This library provides:Settings configuration (Static files / WhiteNoise).Logging configuration.Test runner (important forHeroku CI).Django 2.0 is targeted, but older versions of Django should be compatible. Only Python 3 is supported.Usage of Django-HerokuInsettings.py, at the very bottom:…
# Configure Django App for Heroku.
import django_heroku
django_heroku.settings(locals())This will automatically configureDATABASE_URL,ALLOWED_HOSTS, WhiteNoise (for static assets), Logging, and Heroku CI for your application.Bonus points!If you set theSECRET_KEYenvironment variable, it will automatically be used in your Django settings, too!Disabling Functionalitysettings()also accepts keyword arguments that can be passedFalseas a value, which will disable automatic configuration for their specific areas of responsibility:databasestest_runnerstaticfilesallowed_hostsloggingsecret_keyYou can also just use this library to provide a test runner for your Django application, for use on Heroku CI:import django_heroku
TEST_RUNNER = 'django_heroku.HerokuDiscoverRunner'
Package: django-herokuify
QuickstartSimplify Django configuration in two easy steps:Includedjango-herokuifyandpylibmcpackages in yourrequirements.txtfile.In the Djangosettings.pyof your Heroku project add:importherokuifyfromherokuify.commonimport*# Common settings, SSL proxy headerfromherokuify.awsimport*# AWS access keys as configured in envfromherokuify.mail.mailgunimport*# Email settings for Mailgun add-onfromherokuify.mail.sendgridimport*# ... or SendgridDATABASES=herokuify.get_db_config()# Database configCACHES=herokuify.get_cache_config()# Cache config for Memcache/MemCachierAdditionally, you can use storage backends that works well with Amazon S3
and Django Compressor:DEFAULT_FILE_STORAGE="herokuify.storage.S3MediaStorage"MEDIA_URL="https://{0}.s3.amazonaws.com/media/".format(AWS_STORAGE_BUCKET_NAME)STATICFILES_STORAGE="herokuify.storage.CachedS3StaticStorage"STATIC_URL="https://{0}.s3.amazonaws.com/static/".format(AWS_STORAGE_BUCKET_NAME)COMPRESS_STORAGE="herokuify.storage.CachedS3StaticStorage"COMPRESS_OFFLINE=TrueNote: Thepylibmcpackage entry in your project’s rootrequirements.txtfile is necessary for Heroku Django buildpack to properly configure
thelibmemcachedC dependency.DocumentationSee docs for more information:django-herokuify.readthedocs.orgDependenciesdjango-herokuifyinstalls the following dependencies by default:Caching and cache configuration:pylibmc>=1.2.3
django-pylibmc-sasl>=0.2.4
django-heroku-memcacheify>=0.3DB configuration:dj-database-url>=0.2.1
django-heroku-postgresify>=0.2Storage backend:django-storages>=1.1.5
boto>=2.6.0Licensedjango-herokuifyis released under the BSD license.Other ResourcesGitHub repository -https://github.com/nigma/django-herokuifyPyPi Package site -http://pypi.python.org/pypi/django-herokuifyDistutils dev version link
Package: django-heroku-mongoify
A user-friendly method to configure Django projects on Heroku to use MongoDB.Inspired by the work ofRandall Degges.UsagePlace this code into your project’s settings.py:from mongoify import mongoify
from pymongo import Connection
db = Connection(mongoify(default='mongodb://localhost'))Full documentation can be found onRead the Docs.InstallationInstalling django-heroku-mongoify is easy:pip install django-heroku-mongoifyor download the source and run:python setup.py install
Package: django-heroku-postgresify
django-heroku-postgresifyAutomatic Django database configuration on Heroku.InstallTo installdjango-heroku-postgresify, simply runpip install django-heroku-postgresifyand you'll get the latest version
installed automatically.UsageModify your Djangosettings.pyfile, and set:frompostgresifyimportpostgresifyDATABASES=postgresify()That's it.Depending on the Heroku PostgreSQL databases you've got installed, yourDATABASESconfiguration will automatically be setup to use them.For example, let's assume you've got the following environment variables set on
Heroku (you can view the list of all environment variables by runningheroku config):HEROKU_POSTGRESQL_BLUE_URLHEROKU_POSTGRESQL_RED_URLHEROKU_SHARED_POSTGRESQL_RED_URLSHARED_DATABASE_URLDATABASE_URLYourDATABASESsetting would be:DATABASES={'default':{# DATABASE_URL configs here},'SHARED':{# SHARED_DATABASE_URL configs here},'BLUE':{# HEROKU_POSTGRESQL_BLUE_URL configs here},'RED':{# HEROKU_POSTGRESQL_RED_URL configs here},'SHARED_RED':{# HEROKU_SHARED_POSTGRESQL_RED_URL configs here},}ReferencesIf you're confused, you should probably read:Heroku's Getting Started GuideDeploy Django's PostgreSQL SectionTestsWant to run the tests? No problem:$gitclonegit://github.com/rdegges/django-heroku-postgresify.git
$cddjango-heroku-postgresify
$pythonsetup.pydevelop
...
$pipinstall-rrequirements.txt# Install test dependencies.$nosetests
.............
----------------------------------------------------------------------
Ran13testsin0.166s

OK
Package: django-heroku-redisify
A user-friendly method to configure Django projects on Heroku to use Redis.Inspired by the work ofRandall Degges.UsagePlace this code into your project’s settings.py:from redisify import redisify
CACHES = redisify(default='redis://localhost')Full documentation can be found onRead the Docs.InstallationTo install the latest version of django-heroku-redisify:$ pip install django-heroku-redisifyor, if you must:$ easy_install django-heroku-redisifyTo install the latest development version:$ git clone git@github.com:dirn/django-heroku-redisify.git
$ cd django-heroku-redisify
$ python setup.py installChangelog0.2.1
- Adddjango-redis-cacheandredisas requirements.0.2.0
- THIS RELEASE IS NOT BACKWARDS COMPATIBLE
-redisify()now returns adictof all URLs found in the
environment settings.0.1.0
- Initial release
Package: django-hero-slider
A Django application for defining images that should be shown on the frontpage
of your website in a slider. Each image can have a title, description and
a generic foreign key to any object in your database.InstallationIf you want to install the latest stable release from PyPi:$ pip install django-hero-sliderIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitmazk/django-hero-slider.git#egg=hero_sliderAddfiler,easy_thumbnailsandhero_sliderto yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'filer',
    'easy_thumbnails',
    'hero_slider',
)If you havesorl-thumbnailalready in yourINSTALLED_APPSyou may run across some errors sincesorl-thumbnailandeasy_thumbnailuse the same load template tag syntax{% load thumbnail %}. Please see more details here:http://stackoverflow.com/questions/8174122/django-sorl-thumbnail-and-easy-thumbnail-in-same-projectInclude the urls for this app:urlpatterns = patterns(
    '',
    url(r'^hero-slider/', include('hero_slider.urls')),
)Run the migrations:./manage.py migrateUsageLogin to the Django admin and create some SliderItem objects. Each SliderItem
should point to some other object (with a generic foreign key).In your template you can display the slider like this:{% load hero_slider_tags %}

{% render_hero_slider %}

<script type="text/javascript">
$(document).ready(function() {
    // put all your jQuery goodness in here.
    $('.carousel').carousel({
        /* interval: 3000 */
    })
});
</script>Alternatively you can use theget_slider_itemsassignment tag:{% load hero_slider_tags %}

{% get_slider_items as items %}
{% include "some_template/slider.html with items=items %}If you want to change the look and feel of the slider, just override thehero_slider/carousel.htmltemplate.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-hero-slidermakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branchIn order to run the tests, simply executetox. This will install two new
environments (for Django 1.8 and Django 1.9) and run the tests against both
environments.
Package: django-hfut-auth
使用合工大教务接口进行用户身份认证, 支持合肥校区和宣城校区django-hfut-auth 是一个合肥工业大学学生用户的统一身份认证的工具, 目的是简化使用 Django 开发合工大学生相关网站的用户认证过程.功能特性多版本支持, 同时支持Python2和Python3使用简单, 只需配置好两个配置项就可以工作, 同时自带了登录表单灵活性高, 你可以自定义可用的校区, 认证成功或失败时所进行的操作侵入性小, 你几乎不需要怎么修改你的代码逻辑就能集成基于合工大教务信息的学生身份认证可用性强, 只有在其他认证方式失败同时提供的认证信息格式正确时才会向教务系统发送请求, 避免了错误的用户输入和高频操作导致的IP锁定问题依赖django-hfut-auth 依赖如下:django>=1.9
hfut-stu-lib>=1.4.1其中由于django 1.9 版本支持 Python 2.7, 3.4, 3.5 版本,
相应的, django-hfut-auth 也支持上述几个版本安装你只需要在命令行下输入一下代码便能安装好 django-hfut-auth:$ pip install django-hfut-auth如果你没有安装pip，Python 安装包指南能够指导你安装 PIP .配置settings.py:INSTALLED_APPS = (
    ...
    # 必要的 APP
    'django.contrib.auth',
    'django.contrib.contenttypes',
    # 添加 APP
    'hfut_auth',
    ...
)
AUTHENTICATION_BACKENDS = (
    ...
    # 必要的认证后端
    'django.contrib.auth.backends.ModelBackend',
    # 将 HFUTBackend 放在 ModelBackend 后面, 确保先从本地数据库认证
    'hfut_auth.backends.HFUTBackend',
    ...
)

# 其他配置, 右侧为默认值
# 支持认证的校区, 宣城校区为'XC', 合肥校区为'HF', 所有校区为'ALL'
HFUT_AUTH_CAMPUS = 'ALL'使用配置完成后, 按照一般的认证方式认证即可. 注意当 HFUT_AUTH_CAMPUS = ‘ALL’ 时, 调用django.contrib.auth.authenticate需要提供campus参数指明是哪个校区.相应的, 它提供了hfut_auth.forms.AuthenticationForm, 它集成自django.contrib.auth.forms.AuthenticationForm,
能够自动的根据配置添加campus表单字段, 其他的与父类没有任何区别.信号hfut_auth.signals.hfut_auth_succeeded:当通过hfut_auth.backends.HFUTBackend认证成功时发送的信号, 提供了user,session两个参数.user是认证得到的用户,注意当数据库里没有对应认证资料的用户时,user为None,
你可以接收此信号并提供用户创建逻辑, 返回一个创建完成的用户, 这样就能省去用户的创建视图等等麻烦.session是一个hfut_stu_lib.model.StudentSession实例, 你可以使用它调用教务接口获取想要的数据.hfut_auth.signals.hfut_auth_failed:当通过hfut_auth.backends.HFUTBackend认证失败时发送的信号, 提供了reason,credentials两个参数reason是一个错误实例, 它告诉你认证失败的原因.credentials是调用django.contrib.auth.authenticate时提供的参数, 注意为了安全考虑, 诸如密码,Token等敏感信息都被替换了授权协议Free software: MIT license开发日志0.1.2 (2016-08-25)由于 django 1.9 版本只支持 Python 2.7, 3.4, 3.5 版本, 相应的移除了 Python 3.3 的支持更新了文档
Package: django-hgadmin
FeaturesCreate new repository and deleteCreate’s backup tarball before deleteChange repository settingsAuthentificationInstallCreate new Django projectSetHGWEBDIR_CONF,HGWEBDIR_WSGI,HGWEBDIR_ROOTpaths
and setHGADMIN_ALLOW_REMOVETrue or FalseCange Apache configuration (see example)Put your repos and run$ python manage.py syncdb???PROFIT :)ExamplesProject treeproject
|-- __init__.py
|-- auth.wsgi -> ./hgadmin/auth.wsgi
|-- django.wsgi
|-- hgadmin
|-- hgweb.config
|-- hgwebdir.wsgi
|-- manage.py
|-- repos
|   |-- test0
|   |-- test1.tar.bz2
|   `-- test2
|-- settings.py
`-- urls.pyDjango settings##
# Helpers
import os.path
PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__))

##
# Paths
HGWEBDIR_CONF = os.path.join(PROJECT_ROOT, 'hgweb.config')
HGWEBDIR_WSGI = os.path.join(PROJECT_ROOT, 'hgwebdir.wsgi')
HGWEBDIR_ROOT = os.path.join(PROJECT_ROOT, 'repos')

##
# Allow remove repo from server.
# Be careful!
HGADMIN_ALLOW_REMOVE = FalseApache settings<VirtualHost *:80>
    ServerAdmin     webmaster@example.com
    ServerName      hg.example.com
    DocumentRoot    /path/to/hg/root

    ##
    # WSGI
    #
    # WSGIProcessGroup group-name
    # WSGIDaemonProcess group-name user=username group=group maximum-requests=2000
    #
    # Django settings.HGWEBDIR_WSGI
    WSGIScriptAlias / /path/to/hgwebdir.wsgi

    <Location />
        Order allow,deny
        Allow from all

        ##
        # WSGI based auth
        AuthName "Mercurial repository"
        AuthType Basic
        AuthBasicProvider wsgi
        WSGIAuthUserScript /path/to/hgadmin/auth.wsgi

        <LimitExcept GET>
                Require valid-user
        </LimitExcept>
    </Location>

    LogLevel debug
    ErrorLog /var/log/httpd/hg.example.com-error.log
    CustomLog /var/log/httpd/hg.example.com-access.log common
</VirtualHost>
Package: django-hgwebproxy
This directory is a Django project which contains hgwebproxy as a
Django application.Faheem Mitha <faheem@email.unc.edu>
Jesper Noehr <jesper@noehr.org>
Micah Ransdell
Mario C&Atilde;&copy;sar Se&Atilde;&plusmn;oranis Ayala <mariocesar.sa@openit.com.bo>
Package: django-hibp
django-hibpThis package provides a password validator for Django that validates passwords againstHIBP.django-hibphas no dependencies other than Django and the Python standard library. All code is included indjango_hibp.pyand can be examined by the user. If anything is unclear, feel free to create an issue and I'll try to explain.Installationdjango-hibpis available onPyPi:pip install django-hibpUsageAddHIBPPasswordValidatorto yourAUTH_PASSWORD_VALIDATORSsettings:AUTH_PASSWORD_VALIDATORS=[...{'NAME':'django_hibp.HIBPPasswordValidator','OPTIONS':{'fail_on_error':False,}},]Since this plugin relies on an external API, this introduces a new point of failure. If the Pwned Passwords API is inaccessible, the check will fail. To avoid breaking your application in this case, setfail_on_errortoFalse.PrivacyBecause of the way the HIBP API works, your password is not exposed during validation. Rather than reiterate everything, I will refer you to theoriginal API documentation, but feel free to create an issue if anything is unclear or bothers you.
Package: django-hidden-models
Simply hiding a useless data from query results.Status: developingExample# importsfromhidden_models.modelsimportVisibleModelfromdjango.dbimportmodels# ModelsclassArticle(VisibleModel):name=models.CharField(max_length=100)# Example of use>>>Article.objects.create(name='article1')>>>Article.objects.create(name='article2')>>>Article.objects.all()# Queryset [<Article: (1)>, <Article: (2)>]# This article will be hided, but not deleted from the database>>>Article.objects.filter(name='article1').hide()>>>Article.objects.all()# Queryset [<Article: (2)>]InstallationInstalling from pypi (using pip).pip install django-hidden-modelsAddhidden_modelsin yourINSTALLED_APPS:INSTALLED_APPS=['hidden_models',[...]]