Saravanan666/pypi-org huggingface dataset:
Package: django-fontawesome-6
Django 4 compatible + FA 6This is a fork ofhttps://github.com/BenjjinF/django-fontawesome-5and I made some minor changes so this is compatible with my Django 4 Projects and makes use of Fontawesome 6.0.0I consider renaming this to django-fontawesome-6 in the near future and to provide a new python module.Semi-MaintainedThis is a best-effort fork, I try to keep it up-to-date but can't promise any further development.django-fontawesome-6A utility for using icons in models, forms, and templates and supports Django 4.0.Migration guide from django-fontawesomeRemove all occurences of {% fontawesome_stylesheet %}Replace {% load fontawesome %} with {% load fontawesome_6 %}Replace '{% fontawesome_icon' with '{% fa6_icon'Replace iconnames, for example "bell" needs to be replaced with "bell fas" and "linedin-square" with "linkedin fab"Installation / Usagepipenv install django-fontawesome-6Add 'fontawesome_6' to your installedINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'fontawesome_6',
)Import and useIconField:from fontawesome_6.fields import IconField

class Category(models.Model):
    ...
    icon = IconField()Include Static Files{% load fontawesome_6 %}

<head>
  {% fontawesome_6_static %} 
  ...
</head>SettingsYou can configure django-fontawesome to use another release/source/cdn by specifying::FONTAWESOME_6_CSS = URL or None
    default: 'fontawesome_6/css/django-fontawesome.css'
FONTAWESOME_6_CSS_ADMIN = URL or path
    default: None
FONTAWESOME_6_ICON_CLASS = 'default' or 'semantic_ui' 
    default: 'default'
FONTAWESOME_6_PREFIX = 'custom_prefix'
    default: 'fa'RenderingYou can do a simple render  in your template like this:{% for category in categories.all %}
    {% if category.icon %}
        {{ category.icon.as_html }}
    {% endif %}
{% endfor %}Default RendererOr you can use the{% fa6_icon %}template tag.{% fa6_icon 'github' 'fab' %}Positional arguments:icon(required),style_prefix(default: 'fas')Key word arguments:classextra custom classescolorCSS Color Namesborderbooleanfixed_widthbooleanfliphorizontalverticallibooleanpullleftrightpulsebooleanrotateintegersizefa-xsfa-smfa-lgfa-2xfa-3xfa-5xfa-7xfa-10xspinbooleantitlestringSemantic UI RendererOr you can use the{% fa6_icon %}template tag.{% fa6_icon 'check' %}Required positional arguments:iconKey word arguments:classextra custom classesborderedbooleancircularbooleancoloredSemantic UI Colorsdisabledbooleanfittedbooleanflippedhorizontalverticalinvertedbooleanlinkbooleanloadingbooleanrotatedclockwisecounterclockwisepulsebooleanrotateintegersizefa-xsfa-smfa-lgfa-2xfa-3xfa-5xfa-7xfa-10xtitlestringCreditCredit tohttps://github.com/redouanefor the originalAlso credit tohttps://github.com/BenjjinFfor the django-fontawesome-5 versionChangesrefactored functions and classesUpdated for use with Font Awesome 6Made compatible with Django 4forked fromhttps://github.com/BenjjinF/django-fontawesome-5Updated for use with Font Awesome 5Removed PyYAML, Select2, and jQuery as dependenciesStatic files tag includes static dependencies for use outside adminMoved rendering logic to renderers
Package: django-fontforge-watcher
django-stylus-watcher======================This add a command .Usage=====Put ``'stylus_watcher'`` into ``INSTALLED_APPS``.Set settings ``STYLUS_WATCHER = [('relative/path/to/main/stylus/file.styl', 'relative/path/to/compiled/file.css'), # A compilation rules('relative/path/to/main/stylus/file.styl', 'relative/path/to/compiled/file.css'), # Antoher compilation rules...etc]The watcher listen changes in every installed apps ``styl`` folderThen run ``python manage.py stylus_watcher``
Package: django-font-icons
django-font-iconsA utility for using icons in models and forms.
You can also disable icons so they will no show in the select.It uses selectr for filtering of the icons.Installation / Usagepip install django-font-iconsAdd 'font_icons' to your installedINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'font_icons',
)Import and useIconForeignKeyField:from font_icons.models import IconForeignKeyField

class Category(models.Model):
    ...
    icon = IconForeignKeyField()Add Fontawesome js and/or css yourself. We do not provide a default version.admin/base_site.html{% block extrastyle %}
    {{ block.super }}<linkrel="stylesheet"href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"crossorigin="anonymous"><linkhref="https://unpkg.com/mobius1-selectr@latest/dist/selectr.min.css"rel="stylesheet"type="text/css"><scriptsrc="https://unpkg.com/mobius1-selectr@latest/dist/selectr.min.js"type="text/javascript"></script>{% endblock %}RenderingYou can do a simple render  in your template like this:{% for category in categories.all %}
    {% if category.icon %}
        {{ category.icon.as_html }}
    {% endif %}
{% endfor %}ChangesAdd the fontawesome 5 Free icons. (manage.py loadfontawesome5_free)Support for fontawesome 5 Pro and fontawesome 4.7 (No management command to load all the icons yet.)
Package: django-football365
AuthorsPraekelt FoundationHedley RoosChangelog0.2Makefootball365_fetchcommand more robust by looking up XML nodes by tag name.Add tests. Check that feeds are being parsed correctly, and fields are populated with valid data.0.1.3Add timeout forurlopeninfootball365_fetchcommand. The prevents accumulation of long-running transactions.0.1.2Allow url to be overridden per call.0.1.1Escape special XML characters. Teamtalk feeds aren’t correctly escaped.0.1Convert to south.Allow client account id to be overridden per call. Needed because Teamtalk changed the rules.0.0.3Handle XML feed change.0.0.2Change default ordering.0.0.1Initial release.
Package: django-forbid
Django ForbidDjango Forbid aims to make website access managed and secure for the maintainers. It provides a middleware to grant or
deny user access based on device and/or location. It also supports VPN detection for banning users who want to lie about
their country and geolocation. Also, users can use only the VPN detection feature or disable it.Installationpython-mpipinstalldjango-forbidConfigurationAdd thedjango_forbid.apps.ForbidConfigto yourINSTALLED_APPSin your Django project'ssettings.pyfile.INSTALLED_APPS=[...,# other apps'django_forbid.apps.ForbidConfig',]Also, add thedjango_forbid.middleware.ForbidMiddlewareto theMIDDLEWARElist of the project.MIDDLEWARE=[...,# other middlewares'django_forbid.middleware.ForbidMiddleware',]Configuring theGEOIP_PATHvariable in your project's settings is important. This variable should contain the path to
the GeoLite2 database file. You shoulddownloadthe database and
follow the Djangodocumentationfor proper
configuration.UsageAfter connecting the Django Forbid to your project, you can define the set of desired zones to be forbidden or allowed.
All you need is to set theDJANGO_FORBIDvariable in your project's settings. It should be a dictionary with the
following keys:DEVICES- list of devices to permit or forbid access toCOUNTRIES- list of countries to permit or forbid access toTERRITORIES- list of territories to permit or forbid access toOPTIONS- a dictionary for additional settingsVPN- use VPN detection and forbid access to VPN usersURL- set of URLs to redirect to when the user is located in a forbidden country or using a VPNFORBIDDEN_LOC- the URL to redirect to when the user is located in a forbidden geolocationFORBIDDEN_NET- the URL to redirect to when the user is using a forbidden network (VPN)FORBIDDEN_DEV- the URL to redirect to when the user is using a forbidden deviceThe available device types are:smartphone,peripheral- refers to all hardware components that are attached to a
computer,wearable- common types of wearable technology include smartwatches and smartglasses,phablet- a
smartphone having a larger screen,console- PlayStation, Xbox, etc.,display,speaker- Google Assistant, Siri,
Alexa, etc.,desktop,tablet,camera,player- iPod, Sony Walkman, Creative Zen, etc.,phone,car- refers
to a car browser andtv- refers to TVs having internet access.DJANGO_FORBID={'DEVICES':['desktop','smartphone','console','tablet','tv'],'COUNTRIES':['US','GB'],'TERRITORIES':['EU'],'OPTIONS':{'VPN':True,'URL':{'FORBIDDEN_LOC':'forbidden_location','FORBIDDEN_NET':'forbidden_network','FORBIDDEN_DEV':'forbidden_device',},},}The available country codes in the required ISO 3166 alpha-2 format are
listedhere. And the available continent codes (territories) are:AF-
Africa,AN- Antarctica,AS- Asia,EU- Europe,NA- North America,OC- Oceania andSA- South America.None of the settings are required. If you don't specify any settings, the middleware will not do anything.ContributeAny contribution is welcome. If you have any ideas or suggestions, feel free to open an issue or a pull request. And
don't forget to add tests for your changes.LicenseCopyright (C) 2023 Artyom Vancyan.MIT
Package: django-forbidden-ip
django-forbidden-ip
—This is a django application to forbid access by IP address.Install
===pip install django-forbidden-ipConfig
===Addip_interceptortoINSTALLED_APPS.Addip_interceptor.middleware.IPInterceptorMiddlewaretoMIDDLEWARE.Run./manage.py make migrationsand./manage.py migrate.Add IP you want to block toForbiddenIP.
Package: django-force-disable-permissions-admin
django-force-disable-permissions-adminForce disable permissions in admin site.Installpipinstalldjango-force-disable-permissions-adminUsagepro/settings.pyINSTALLED_APPS=[...'django_force_disable_permissions_admin',...]app/admin.pyfromdjango.contribimportadminfrom.modelsimportCategoryfrom.modelsimportBookfromdjango_force_disable_permissions_admin.adminimportDjagnoForceDisablePermissionsAdminMixinclassBookInline(admin.TabularInline):model=BookclassCategoryAdmin(DjagnoForceDisablePermissionsAdminMixin,admin.ModelAdmin):add_permission_enable_for_superuser=Falsedelete_permission_enable_for_superuser=Falsechange_permission_enable_for_superuser=Falseview_permission_enable_for_superuser=Falseforce_disable_add_permission=Trueforce_disable_delete_permission=Trueforce_disable_change_permission=Trueforce_disable_view_permission=Falselist_display=["name"]inlines=[BookInline,]admin.site.register(Category,CategoryAdmin)Control Variablesadd_permission_enable_for_superuser = Falsedelete_permission_enable_for_superuser = Falsechange_permission_enable_for_superuser = Falseview_permission_enable_for_superuser = Falseforce_disable_add_permission = Falseforce_disable_delete_permission = Falseforce_disable_change_permission = Falseforce_disable_view_permission = FalseNote:By default, DjagnoForceDisablePermissionsAdminMixin doesn't change anything.Use the control-variabl to disable permissions.Releasesv0.2.1 2021.05.17Fix has_add_permission for Django 3.x.v0.2.0 2020.02.26App rename to django_force_disable_permissions_admin.v0.1.1 2020.02.05Fix usage document.v0.1.0 2020.02.05First release.
Package: django-force-reset-password
=====Django force reset password=====This is an application to make every users to reset their password(only admin users)Quick start-----------1. Add "django_force_reset_password" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'django_force_reset_password',]2. Include the django_force_reset_password URLconf in your project urls.py like this::from django_force_reset_password.views import pfr_password_change, pfr_loginurlpatterns = [......url(r'^admin/login/$', pfr_login),url(r'^admin/password_change/$', pfr_password_change),url(r'^admin/', admin.site.urls),....]4. add 'django_force_reset_password.middleware.FPRCheck' in MIDDLEWARE_CLASSES settings like thisMIDDLEWARE_CLASSES = [....'django_force_reset_password.middleware.FPRCheck']
Package: django_forest
Composite pages for django.InstallationWe are at the cheese-shop:pip install django_forestUsageIn order to use django_forest in your project:Includempttandforestin yourINSTALLED_APPSsettings.Enabledjango-admin.In your terminal, type:python manage.py syncdbFollowed by:python manage.py runserverPoint your browser tolocalhost:8000/adminCreate a fewPages: Pages are defined as well, web-pages only that in context of django_forest, they containWidgets.Create a fewWidgets: Little boxes that point to a URL. The URL is used to get a partial-HTML rendered from a server or JSON which is then rendered into HTML client-side usinghandlebar.jstemplates.And finally we haveTemplates: If you haven’t guessed already, these are client-sidehandlebar.jssnippets that will get their context from the JSON at the URL defined in theWidget.The above arrangement is all you need to make composite pages. There is room for improvement: For instance, thegridster.jsthat allows for drag-and-drop functionality does not currently serialize its state to the server. However, I intend to iron-out these niggles in the coming release.Watch this space.History0.1.0 (2014-1-14)First release on PyPI.
Package: django-forge
QuickstartFor those with short attention spans, the following creates a full mirror of
the Puppet Forge:$ virtualenv forge
$ source forge/bin/activate
$ pip install django-forge
$ django-admin.py migrate –noinput –settings=forge.settings.dev
$ django-admin.py sync_forge –settings=forge.settings.dev
$ django-admin.py runserver –settings=forge.settings.devPoint your Puppet configuration file (/etc/puppet.confor~/.puppet/puppet.conf) to the forge:[main]module_repository =http://localhost:8000You should now be able search and install withpuppet module.Publishing can be done with interface at/admin/– create an account
with:$ ./manage.py createsuperuserBackgroundThe Puppet Forge (https://forge.puppetlabs.com/) is a central authority for
finding and installing Puppet modules.  This package implements the first
version (v1) and third version (v3) of the JSON web services necessary to house
(or mirror) a private, stand-alone version of the Forge.Simplicity and ease-of-use are goals of this package.### v1This version of the Puppet Forge is undocumented, and the resources here were
reverse-engineered from the behavior of the current API endpoints (which
are buried in the Puppet module tool source code).  Care is taken to
try and imitate the behavior of this API whenever possible.### v3Puppet Labs fully documented and shared the v3 standard with the community,
seehttps://forgeapi.puppetlabs.comfor further details.  This package
only implements the subset of this API necessary to talk to open source
Puppet 3.6+ clients.
Package: django-forgiving-collectstatic
# django-forgiving-collectstaticAn extension of thedjango.contrib.staticfiles.storage.ManifestStaticFilesStoragethat skips missing files and assets during thepython manage.py collectstaticcommand run.## InstallationUse pip:`shell pip installdjango-forgiving-collectstatic`## UsageSet in yoursettings.py:`python STATICFILES_STORAGE = 'django_forgiving_collectstatic.storages.ForgivingManifestStaticFilesStorage' `## CreditsContributed by [Tim Kamanin](https://timonweb.com).
Package: django-form-action
django-form-actionDjango action/button with an intermediate page to parse data from a formInstallationJust install the pakage from PyPIpip install django-form-actionUsageDjango admin action with formfromdjango.contribimportadminfromdjango.contribimportmessagesfromdjango.formsimportCharFieldfromdjango.formsimportFormfromdummyapp.modelsimportFruitfromform_actionimportform_actionclassMyForm(Form):message=CharField()@form_action(MyForm,description="Do some task")defmy_action(modeladmin,request,queryset,form):msg=form.cleaned_data["message"]messages.add_message(request,messages.INFO,f"Got message:{msg}")@admin.register(Fruit)classMyModelAdmin(admin.ModelAdmin):actions=[my_action]Or use it as an extra button with formfromdjango.contribimportadminfromdjango.formsimportCharFieldfromdjango.formsimportFormfromdjango.http.responseimportHttpResponsefromdummyapp.modelsimportFruitfromform_action.decoratorsimportextra_buttonfromform_action.mixinsimportExtraButtonMixinclassMyForm(Form):message=CharField()@extra_button("Test Button",MyForm)deftest(request,form):msg=form.cleaned_data["message"]returnHttpResponse(f"Got message:{msg}")@admin.register(Fruit)classMyModelAdmin(ExtraButtonMixin,admin.ModelAdmin):extra_buttons=[test]
Package: django-form-admin
Contentsdjango-form-adminInformationRequirementsHow to use itOption 1Option 2Option 3DevelopmentReleases0.5.1 (2018-03-05)0.5.0 (2018-03-05)0.4.2 (2013-10-28)0.4.1 (2013-10-04)0.4.0 (2013-09-12)0.3.2 (2011-12-03)django-form-adminInformationIt is a Django application that lets to render forms like django admin, with the same HTMLRequirementsDjango(>= 1.0, theexample projectneeds >=1.3)How to use itOption 1In your form:classFooForm(forms.Form,FormAdminDjango):passclassFooModelForm(forms.ModelForm,FormAdminDjango):passIn your template:{{form.as_django_admin}}Option 2But you don’t need inherit of FormAdminDjango, you may also doIn your form:classFooForm(forms.Form):...defas_django_admin(self):fromformadmin.formsimportas_django_adminreturnas_django_admin(self)In your template:{{form.as_django_admin}}Option 3Or even without modify the formOnly in your template:{%loadformadmin_filters%}{{form|as_django_admin}}DevelopmentYou can get the bleeding edge version of django-form-admin by doing a clone
of its git repository:git clone git://github.com/Yaco-Sistemas/django-form-admin.gitReleases0.5.1 (2018-03-05)Fix previous version (Django support > 1.8)0.5.0 (2018-03-05)Django support > 1.8 (1.9 - 1.11)Improve readme fileThanks to:bashupredatell0.4.2 (2013-10-28)Fix an error when to install this egg from pypi0.4.1 (2013-10-04)Improvements in the example project0.4.0 (2013-09-12)New way to render the form (filter)Update metainfoExample project0.3.2 (2011-12-03)Subversion version
Package: django-formaldehyde
Django forms at warp speedDjango Formaldehyde is a small reusable unobtrusiveDjangoapp that leverage forms.Home page:https://github.com/kunitoki/django-formaldehydeDocumentation:http://django-formaldehyde.readthedocs.orgPypi:https://pypi.python.org/pypi/django-formaldehydeExample app on Github:https://github.com/kunitoki/django-formaldehyde/exampleChangelog:Changelog.rstLicense:The MIT License (MIT)Supports: Django 1.6, 1.7 - Python 2.7, 3.2, 3.3, 3.4
Package: django-formalizr
Django AJAX Class Based ViewsQuick startAdd “formalizr” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'formalizr',
)Inherit your form views from formalizr.views.AjaxFormView:from formalizr.views import AjaxFormView

class SampleFormView(AjaxFormView):
     form_class = SampleForm
Package: django-formapi
Create JSON API:s with HMAC authentication and Django form-validation.InstallationInstall django-formapi in your python environment$pipinstalldjango-formapiAddformapito yourINSTALLED_APPSsetting.INSTALLED_APPS=(...'formapi',)Addformapi.urlsto your urls.py.urlpatterns=patterns('',...url(r'^api/',include('formapi.urls')),)UsageGo ahead and create acalls.py.classDivisionCall(calls.APICall):"""
    Returns the quotient of two integers
    """dividend=forms.FloatField()divisor=forms.FloatField()defaction(self,test):dividend=self.cleaned_data.get('dividend')divisor=self.cleaned_data.get('divisor')returndividend/divisorAPI.register(DivisionCall,'math','divide',version='v1.0.0')Just create a class like your regular Django Forms but inheriting fromAPICall. Define the fields that your API-call
should receive. Theactionmethod is called when your fields have been validated and what is returned will be JSON-encoded
as a response to the API-caller. TheAPI.registercall takes yourAPICall-class as first argument, the second argument is
thenamespacethe API-call should reside in, the third argument is thenameof your call and the fourth theversion.
This will result in an url in the form ofapi/[version]/[namespace]/[call_name]/so we would get/api/v1.0.0/math/divide/.A valid call with the parameters{'dividend': 5, 'divisor': 2}would result in this response:{"errors":{},"data":5,"success":true}An invalid call with the parameters{'dividend': "five", 'divisor': 2}would result in this response:{"errors":{"dividend":["Enter a number."]},"data":false,"success":false}AuthenticationBy defaultAPICallshave HMAC-authentication turned on. Disable it by settingsigned_requests = Falseon yourAPICall.If not disabled users of the API will have to sign their calls. To do this they need asecretgenerate, create aAPIKeythrough the django
admin interface. On save a personalsecretandkeywill be generated for the API-user.To build a call signature for theDivisonCallcreate a querystring of the calls parameters sorted by the keysdividend=5&divisor=2. Create a HMAC using SHA1 hash function.
Example in python:importhmacfromhashlibimportsha1hmac_sign=hmac.new(secret,urllib2.quote('dividend=5&divisor=2'),sha1).hexdigest()A signed request againstDivisionCallwould have the parameters{'dividend': 5, 'divisor': 2, 'key': generated_key, 'sign': hmac_sign}DocumentationVisit/api/discoverfor a brief documentation of the registered API-calls.
Package: django-form-builder
Django Form BuilderA Django Framework application to build dynamic forms, with widgets and Django's standards, using JSON objects.Forms can be saved in a configurable storage (or settings.py). Users that requires high levels of customization will find what they're look for.Consult theOfficial Documentationat readthedocs for usage specifications and advanced topics.Image 1:Example of Dynamic Form built via frontendImage 2: Preview of the builded formFeaturesForms definitions via JSON objectSave compiled form as JSON objects in model db and get its structure and contents with a simple model method callOverride form constructor in order to add static common fieldsCreate input fields using heritable classes, with customizable validation methodsManageDjango Formsetfields, with form insertion and removal via javascript;Manage and verify digitally signed file fields (PDF and P7M) without a certification authority validation (TODO via third-party API)Audio and Image CaptchaExamplesExample of a dynamic form JSON in database{"field_1":"value_field_1","field_2":"value_field_2","field_3":"value_field_3","attachments":{"p7m":"file_1.pdf.p7m","pdf":"file_2.pdf"}}CaPTCHAInsettings.pyconfigure these parametersCAPTCHA_SECRET = b'your_secret'
CAPTCHA_SALT = b'your_salt'Tests# build a virtualend where to install all the requirements and requirements-dev ...
cd example
./manage.py test

# coverage
coverage erase
coverage run  ./manage.py test
coverage report -mBuildrm -R build/ dist/ *egg-info
python3 setup.py sdist
twine upload dist/*
Package: django-form-button
django-form-buttonDjango admin extra buttons with formScreenshotsInstallationYou can install the package via pip:pipinstalldjango-form-buttonUsagefromdjango.contribimportadminfromdjango.formsimportFileFieldfromdjango.formsimportFormfromdjango.httpimportHttpRequestfromdjango.httpimportHttpResponsefromdjango_form_buttonimportFormButtonMixinfromdjango_form_buttonimportform_buttonfrom.modelsimportAccountclassUploadForm(Form):file=FileField()@form_button("Upload Accounts",UploadForm)defupload_accounts(request:HttpRequest,validated_form:Form):file=validated_form.cleaned_data["file"]returnHttpResponse(file.name)@admin.register(Account)classAccountAdmin(FormButtonMixin,admin.ModelAdmin):# type: ignoreform_buttons=[upload_accounts]LicenseThis project is licensed under the terms of the MIT license.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.ContactIf you want to contact me you can reach me atpradishbijukchhe@gmail.com.