Saravanan666/pypi-org huggingface dataset:
Package: django-admin-vali
Django Admin ValiThis project is based in django-vali project from cnanyihttps://github.com/cnanyi/django-vali.OverviewDashboard AdministrationUser who has permission to access the dashboard.Can view all log entries.Can view all dynamics data.Requirementsdjango >= 2.0python >= 3.0Routesurl:/admin→	Page with administrator access.url:/admin/dashboard→	Page with dashboard access.ExtraThis project allows you to use i18n in urls. See more inDjango Website.InstallationInstall usingpip...$pipinstalldjango-admin-valiAddvalito yourINSTALLED_APPSsetting beforedjango.contrib.admin.INSTALLED_APPS=(...'vali','django.contrib.admin',...)If you want to use Vali Dashboard, includevali.urlsto yoururls.pyfile.urlpatterns=(...path('admin/',include(('vali.urls','vali'),namespace='dashboard')),...)In your settings, addVALI_CONFIGto enable dashboard view, change theme and get responsive permission fields.VALI_CONFIG={'theme':'default','dashboard':{'name':'Dashboard','url':'/admin/dashboard/','subtitle':'Dashboard view with all statistics','site_name':'Dashboard admin','url_image_profile':''},'fieldset':{'fields':['user_permissions','permissions']},'applist':{'order':"registry","group":True}}To change the theme, just choose one of this: default, green, brown, blue, purple or create your own.UsageIn yourcounters.pyadd ...fromvali.countersimportCounterBasefrom.modelsimportModelclassMyModelCounter(CounterBase):title='Title goes here'defget_value(self,request):returnModel.objects.count()orfromvali.countersimportModelCounterfrom.modelsimportModelclassMyModelCounter(ModelCounter):model=ModelIn yourcharts.pyadd ...fromvali.chartsimportModelChartsfrom.modelsimportModelclassChartCounter(ModelCharts):model=Modelchart_type='Bar'name='barchart1'labels=["2018-03-01","2018-03-02","2018-03-03","2018-03-04","2018-03-05"]datasets=[{"label":"dataset 1","fillColor":"rgba(220,220,220,0.2)","strokeColor":"rgba(220,220,220,1)","pointColor":"rgba(220,220,220,1)","pointStrokeColor":"#fff","pointHighlightFill":"#fff","pointHighlightStroke":"rgba(220,220,220,1)","data":[65,59,80,81,80]},{"label":"dataset 2","fillColor":"rgba(151,187,205,0.2)","strokeColor":"rgba(151,187,205,1)","pointColor":"rgba(151,187,205,1)","pointStrokeColor":"#fff","pointHighlightFill":"#fff","pointHighlightStroke":"rgba(151,187,205,1)","data":[28,48,40,19,69]}]In yourviews.pyadd ...from .counters import MyModelCounter
from .charts import ChartCounter
from vali.views import ValiDashboardBase


class ModelDashboardView(ValiDashboardBase):
    template_name = 'dashboard.html'

    list_counters = [
        MyModelCounter(),
    ]   
    list_charts = [
        ChartCounter(),
    ]LicenseThis project is licensed under theMITLicense.
Package: django-admin-view
Installationpipinstalldjango-admin-viewor from gitpipinstall-egit+https://githib.com/Apkawa/django-admin-view.git#egg=django-admin-viewDjango and python versionPythonDjango3.53.63.73.81.8✘✘✘✘1.11✔✔✔✘2.2✔✔✔✔3.0✘✔✔✔UsageContributingrun example apppipinstall-rrequirements-dev.txt
./test/manage.pymigrate
./test/manage.pyrunserverrun testspipinstall-rrequirements-dev.txt
pytest
toxUpdate versionpythonsetup.pybumpversionpublish pypipythonsetup.pypublish
Package: django-admin-view-permission
Reusable application which provides a view permission for the existing models.RequirementsDjangoSupportThe package isdeprecatedforDjango 2.1. Django added the functionality
into thecore(
the 2 implementations are different). You should use this package only if you
use Django < 2.1.If you have installed this package by accident to your Django 2.1
project, it won’t affect the build-in view permission which comes
with Django.If you have upgraded you application to use Django > 2.1 just uninstall
this packageDjango: 1.8, 1.9, 1.10, 1.11, 2.0Python: 2.7, 3.4, 3.5, 3.6Compatible withdjango-parler’s translatable models. To verify which django-parler version our test suite runs against, checkrequirements-debug.txt. You do not need django-parler to install django-admin-view-permission.DocumentationFor a full documentation you can visit:http://django-admin-view-permission.readthedocs.org/Setuppip installdjango-admin-view-permissionand then addadmin_view_permissionat the INSTALLED_APPS like this:INSTALLED_APPS = [
    'admin_view_permission',
    'django.contrib.admin',
    ...
]and finally runpython manage.py migrate.You need to place theadmin_view_permissionbeforedjango.contrib.adminin INSTALLED_APPS.In case of a customized AdminSite in order to apply the view permission, you
should inherit from theAdminViewPermissionAdminSiteclass:from admin_view_permission.admin import AdminViewPermissionAdminSite

class MyAdminSite(AdminViewPermissionAdminSite):
    ...ConfigurationThis app provides a setting:ADMIN_VIEW_PERMISSION_MODELS = [
    'auth.User',
    ...
]in which you can provide which models you want to be added the view permission.
If you don’t specify this setting then the view permission will be applied to
all the models.UninstallRemove theadmin_view_permissionfrom yourINSTALLED_APPSsettingDelete the view permissions from the database:from django.contrib.auth.models import Permission
permissions = Permission.objects.filter(codename__startswith='view')
permissions.delete()It will be helpful to check if the queryset contains only the view
permissions and not anything else (for example: custom permission added)
Package: django-admin-views
OverviewWhile “the admin is not your app”, it is often useful to be able to easily add
a bit of functionality to the admin for internal staff or other internal users
that are tech savvy enough to use the admin.There are several third party project such asAdminPlus, but they require the
user to redefine the Admin.site object.  This is fine for developers who are
setting up a Django project, but not ideal for developers who are writing
third party tools for other developers to use in their projects.django-admin-views attempts to solve this by simply overriding the admin
templates to provide two features:Easily define custom admin views and link them on the admin pagesEasily add in external URL linksInstallation Stepspip installdjango-admin-viewsAddadmin_viewstoINSTALLED_APPSin yoursettings.pybefore admin site, i.e.django.contrib.adminIf you are using a custom Admin Site, you’ll need to configure theADMIN_VIEWS_SITEsetting to point to your admin site instance:ADMIN_VIEWS_SITE = 'myproject.admin.admin_site'UsageAll of this magic happens in your model’s admin definition.  You simply subclass your
admin fromAdminViewsinstead of the standardadmin.ModelAdmin.
In this example we have a custom view that does nothing but redirect the user to CNN
and a direct URL link that goes to my company’s homepage:from django.contrib import admin
from django.shortcuts import redirect

from admin_views.admin import AdminViews

from example_app.models import TestModel

class TestAdmin(AdminViews):
    admin_views = (
                    ('Redirect to CNN', 'redirect_to_cnn'),
                    ('Go to google.com', 'https:/google.com'),
        )

    def redirect_to_cnn(self, *args, **kwargs):
        return redirect('https://www.cnn.com')

admin.site.register(TestModel, TestAdmin)These will now show up in the admin below the usual Django admin model CRUD interfaces
forexample_appwith a couple of different icons to distinquish between custom admin
views and a direct URL link.With this third-party developers need only instruct their users to install their app
anddjango-admin-views.Hope you find it useful and as always feedback is certainly welcome.ScreenshotAuthorFrank Wilesfrank@revsys.comMaintainerHugo Defrancedefrance.hugo@gmail.com
Package: django-admin-visualsearch
django-admin-visualsearch=========================Replace for standard search input in django admin interface.![Example of usage](https://raw.github.com/unk2k/django-admin-visualsearch/master/screenshoot.png)Install-------For install you can use pip:```pip install django-admin-visualsearch```Usage-------models.py```from django.db import modelsclass Author(models.Model):first_name = ....last_name = ....class Books(models.Model):title = ....author = models.ManyToManyField(Author)```admin.py```from visualsearch import VisualSearchAdminfrom django.contrib import adminfrom books.models import Booksclass BooksAdmin(VisualSearchAdmin, admin.ModelAdmin):visualsearch_fields = {'title': u'Book title','author__first_name__last_name': u'Author',}admin.site.register(Books, BooksAdmin)```django-admin-visualsearch split "author__first_name__last_name" and find usage keys (author__first_name, author__last_name).For related fields you must use specifical subfield for search (for example: author__first_name).Note-------If you use visualsearch, you don't use other standart filter in admin interface cls
Package: django-admin-watchdog
Admin watchdogAdmin watchdog is a simple Django app to register and view logs in the django admin backoffice.Tested with Django 2.2 through 4.0.Quick startAdd “admin_watchdog” to your INSTALLED_APPS settings.Runpython manage.py migrateto create the admin watchdog model.Edit your LOGGING settings to use the admin watchdog handler.
For example, to replace the default mail handler:LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'admin_watchdog': {
            'level': 'ERROR',
            'class': 'admin_watchdog.handlers.AdminWatchdogHandler',
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['admin_watchdog'],
            'level': 'ERROR',
            'propagate': False,
        }
    }
}Your error logs will now be registered. Visit your admin backoffice to see the log entries.You can run the tests by doingmake test.ScreenshotsAUTHORSYann FOUILLAT (alias Gagaro) <yann.fouillat@makina-corpus.com>LICENSEGPLv3+
Package: django-admin-wizard
django-admin-wizarddjango-admin-wizard is a Django app providing helpers for django admin actions
with intermediate forms.DescriptionDo you know "delete selected" action in Django-admin? This package provides
helpers for creating such actions with intermediate forms in two lines of code.
Also, you may add a link from django admin change page to a custom form view to
perform some form-supplied action on single object.Installationpipinstalldjango-admin-wizardWorking example is intestproject.testapp.Add application to installed apps in django settings:INSTALLED_APPS.append('admin_wizard')And an action to your admin:fromdjango.contribimportadminfromadmin_wizard.adminimportUpdateActionfromtestproject.testappimportforms,models@admin.register(models.MyModel)classMyModelAdmin(admin.ModelAdmin):actions=[UpdateAction(form_class=forms.RenameForm)]Add custom view to your admin:fromdjango.contribimportadminfromdjango.urlsimportpathfromadmin_wizard.adminimportUpdateDialogfromtestproject.testappimportforms,models@admin.register(models.MyModel)classMyModelAdmin(admin.ModelAdmin):defget_urls(self):urls=[path('<int:pk>/rename/',UpdateDialog.as_view(model_admin=self,model=models.MyModel,form_class=forms.RenameForm),name='rename')]returnurls+super().get_urls()Add a link to custom dialog in admin change page:fromdjango.contribimportadminfromdjango.urlsimportreversefromtestproject.testappimportmodels@admin.register(models.MyModel)classMyModelAdmin(admin.ModelAdmin):readonly_fields=('update_obj_url',)defupdate_obj_url(self,obj):# FIXME: it's XSS, don't copy-pasteurl=reverse('admin:rename',kwargs=dict(pk=obj.pk))returnf'<a href="{url}">Rename...</a>'update_obj_url.short_description='rename'Now you have "rename" action in changelist and "rename" link in change view.
Enjoy :)
Package: django-admin-xtra-widgets
django-admin-xtra-widgets===============================================Overview------------------------------------more widgets for the django adminQuick start------------------------------------If you need the SelectAndLink widgetIn settings.py, add 'admin_xtra_widgets' to the INSTALLED_APPSIn urls.py add ``(r'^admin-xtra-widgets/', include('admin_extra_widgets.urls'))`` to your urlpatternsVerboseManyToManyRawIdWidget------------------------------------This widget adds a clickable text value to the usual raw_id widget. It indicates the current values of the fieldIn your adminfrom admin_xtra_widgets.widgets import VerboseManyToManyRawIdWidgetclass YourAdmin(admin.ModelAdmin):#raw_id_fields = ["your_m2m_field"]def formfield_for_dbfield(self, db_field, **kwargs):if db_field.name in ('your_m2m_field', 'other_m2m_field'):kwargs['widget'] = VerboseManyToManyRawIdWidget(db_field.rel, self.admin_site)else:return super(YourAdmin,self).formfield_for_dbfield(db_field,**kwargs)kwargs.pop('request')return db_field.formfield(**kwargs)License=======django-favman is licensed under the GNU-LGPL
Package: django-admirarchy
https://github.com/idlesign/django-admirarchyDescriptionDjango Admin addon to navigate through hierarchies.Have you ever wanted Django Admin to be able to navigate through hierarchies?Without existing models modifications? Yeah!Admirarchy does it in an old-school way, just like Norton Commander and Co - one level at a time.Hierarchies described as adjacency lists and nested sets are supported.# admin.py of your applicationfromdjango.contribimportadminfromadmirarchy.toolboximportHierarchicalModelAdminfrom.modelsimportMyModel# Let's say this model represents a hierarchy.# Inherit from HierarchicalModelAdmin instead of admin.ModelAdmin@admin.register(MyModel)classMyModelAdmin(HierarchicalModelAdmin):hierarchy=True# This enables hierarchy handling.Done. Go navigate %)Documentationhttp://django-admirarchy.readthedocs.org/
Package: django-adobesign
django-adobesigndjango-adobesignis a Django application for Adobe AdobeSign’s digital signature.It implementsdjango-anysignAPI.Run the demoCreate an account Adobe SignTrial account: go toAdobe create trial accountORDeveloper account with watermark: gotAdobe developer accountCreate an applicationGo toyour Adobe Sign ProfileSetup the applicationSelect the application then click onConfigure OAuth for ApplicationIn theRedirect URIfield set: “https://localhost:8000/token” then save.Obtain the corresponding application_id/application_secretDouble click on the applicationClone this repoInstall Python module dependenciesIn django-adobesign, run: make demoRun the demoIn django-adobesign, run: make serveGo tohttps://localhost:8000:https://localhost:8000Adobe OAuth DiagramAdobe Sign API is based on OAuth2 authentication.UseMSCGenin modeMsGennyto visiualize theauthentication sequence diagram
Package: django-ad-rotator
A reusable Django app for managing and displaying banner ads.InstallationTo get the latest stable release from PyPipipinstalldjango-ad-rotatorTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-ad-rotator.git#egg=ad_rotatorAddad_rotatorto yourINSTALLED_APPSINSTALLED_APPS=(...,'ad_rotator',)Don’t forget to migrate your database./manage.pymigratead_rotatorUsageCreate banner ads by creatingBannerAdobjects in the Django admin.Hook them up in your tempalte by just adding theget_bannerinclusion tag.{% load ad_rotator_tags %}

{% get_banner %}Customize how the banner is displayed by overriding the template atad_rotator/partials/banner.html.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-ad-rotatormakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branch
Package: django-adsense-injector
django_adsense_injectordjango_adsense_injector is a Django app to inject adsense ad code inside ckeditor body. easy to intergrate and and show ads to the users.Detailed documentation is in the "www.instandblog.xyz" website.Quick startAdd "polls" to your INSTALLED_APPS setting like this::INSTALLED_APPS=[...'django_adsense_injector',]Add this line under templates settings in settings.pyTEMPLATES=[{'BACKEND':'django.template.backends.django.DjangoTemplates','DIRS':[os.path.join(BASE_DIR,'templates')],'APP_DIRS':True,'OPTIONS':{'context_processors':['django.template.context_processors.debug','django.template.context_processors.request','django.contrib.auth.context_processors.auth','django.contrib.messages.context_processors.messages','social_django.context_processors.backends',],'libraries':{'adsense_tags':'django_adsense_injector.templatetags.adsense_tags'#<---------}},},]Include the template tags load tag like this inside the template::{% load adsense_tags %}Filter your ckeditor body field like below to inject your adsense code::{{post.body|inject_adsense_after_paragraph:"your_template_directory/your_html_file_name.html"|safe}}createyour_html_file_name.htmlfile inside the template directory and paste your adsense code.Start the development serverhttp://127.0.0.1:8000/Visithttp://127.0.0.1:8000/your-post-url/to see the outputs(you can't view adsense ad in the development time, but if you inspect the page you can see the injected code).
Package: django-ads-txt
Django Ads-txtThis is a basic Django application to manage Authorized Digital Sellers (ads.txt) file based oniabtech lab specificationRequirementsPython 2.7, 3.5 or PyPy.Django 1.9 or higher.InstallationUse your favorite Python installer to install it from PyPI:pipinstalldjango-ads-txtOr get the source from the application site at:https://github.com/flyingelephantlab/django-ads-txt/Add'ads_txt'to yourINSTALLED_APPSsetting.Run themigratemanagement commandTo activate ads.txt generation on your Django site, add this line to yourURLconf:url(r'^ads\.txt',include('ads_txt.urls')),Add the domains you need to appear from admin panelRulesThe instructions are encoded as a formatted plain text object, described here. A complete
description of the syntax of this format:<Domain #1>, <Account ID #2>, <Account type #3>, <Authority ID #4>FieldDescriptionDomain (Required)Domain name of the advertising systemAccount ID (Required)The identifier associated with the seller or reseller accountAccount type (Required)Type of Account/Relationship. It has two valuesDIRECTandRESELLERAuthority ID (Optional)An ID that uniquely identifies the advertising system within a certification authorityExamples:example.com,108933,DIRECT,7857hf1d2fr6d8b34
opexample.com,[538220672-CC],RESELLER,6a69ec356744c6
opexample.com,[537120668-CC],RESELLER,6a69ec356744c6
ex.com,7118,RESELLERCachingYou can optionally cache the generation of the ads.txt. Add or change the ADSTXT_CACHE_TIMEOUT setting with a value in seconds in your Django settings file:ADSTXT_CACHE_TIMEOUT=60*60*24Bugs and feature requestsAs always your mileage may vary, so please don’t hesitate to send feature requests and bug reports:https://github.com/flyingelephantlab/django-ads-txt/issues
Package: django-adtools
Django-adtools is a package with a set of utilities for integrating web applications based on the django framework with
MS ActiveDirectory.All documentation is in the “docs/build” directory and online athttp://django-adtools.readthedocs.orgShort example of using Active Directory authentication system# views.pyfromdjango_adtools.ad.ad_toolsimportad_login,ad_clear_usernamedefpost(self,request):form=LoginForm(request.POST)ifform.is_valid():ifad_login(# checking, if user is able to login using Active Directory credentialsdc=DomainController.get(),# A hostname or an ip address of a Domain Controllerusername=form.cleaned_data['username'],password=form.cleaned_data['password'],domain=settings.ADTOOLS_DOMAIN,# A name of domain, e.g. domain.comgroup=settings.ADTOOLS_GROUP,# A group name of valid users):# get full domain username like user@domain.ruusername_without_domain=ad_clear_username(form.cleaned_data['username'])username=f"{username_without_domain}@{settings.ADTOOLS_DOMAIN}"try:# looking for existing user profile (case insensitive)user=User.objects.get(username__iexact=username)exceptUser.DoesNotExist:# create a new user profile, if it does not existuser=User(username=username)user.save()login(request=request,user=user)returnredirect(reverse(f'{__package__}:index'))context={'package':__package__,'form':form,'login_failed':True,}returnrender(request,f"{__package__}/login.html",context)
Package: django-advanced-pages
Django advanced pagesWith this you can enhance the Django flatpages app by some features.FeaturesCategorize pagesOriginal Django flatpages are not touchedPriorize the pagesCategorize the pagesAdmin loads the enhanced model instead of the flatpagesInstallationInstall using pip:pipinstalldjango-advanced-pagesYou need to load both, advanced and original pages because this package uses onetoone field to enhance the original Django Flatpages app:# settings.pyINSTALLED_APPS=[# ...'django.contrib.flatpages','pages.apps.PagesConfig',# ...]You can pass the pages to the template like this:frompages.modelsimportPage,Category'pages':{'company':Page.objects.filter(category=Category.COMPANY),'legal':Page.objects.filter(category=Category.LEGAL),},
Package: django-advanced-password-validation
django_advanced_password_validationExtends Django password validation options to include minimum uppercase, minimum lowercase, minimum numerical, and minimum special characters. This was created in an attempt to keep up with industry standards for strong user passwords.This package has been tested with python 3.9+.PrerequisitesRequires Django 3.2 or later.
You can install the latest version of Django via pip:pipinstalldjangoAlternatively, you can install a specific version of Django via pip:pipinstalldjango=3.2NOTE:See thedjango-projectdocumentation for information on non-deprecated Django versions.InstallationNormal installationInstall django_advanced_password_validation via pip:pipinstalldjango_advanced_password_validationDevelopment installationgitclonehttps://github.com/ezrajrice/django_advanced_password_validation.gitcddjango_advanced_password_validation
pipinstall--editable.UsageThe optional validators must be configured in the settings.py file of your django project to be actively used in your project./my-cool-project/settings.pyINSTALLED_APPS=[...'django_advanced_password_validation',...]AUTH_PASSWORD_VALIDATORS=[...{'NAME':'django_advanced_password_validation.advanced_password_validation.ContainsDigitsValidator','OPTIONS':{'min_digits':1}},{'NAME':'django_advanced_password_validation.advanced_password_validation.ContainsUppercaseValidator','OPTIONS':{'min_uppercase':1}},{'NAME':'django_advanced_password_validation.advanced_password_validation.ContainsLowercaseValidator','OPTIONS':{'min_lowercase':1}},{'NAME':'django_advanced_password_validation.advanced_password_validation.ContainsSpecialCharactersValidator','OPTIONS':{'min_characters':1}},...]OptionsHere is a list of the available options with their default values.ValidatorOptionDefaultContainsDigitsValidatormin_digits1ContainsUppercaseValidatormin_uppercase1ContainsLowercaseValidatormin_lowercase1ContainsSpecialCharactersValidatormin_characters1MaximumLengthValidatormax_length128MaxConsecutiveCharactersValidatormax_consecutive3ConsecutivelyIncreasingDigitValidatormax_consecutive3ConsecutivelyDecreasingDigitValidatormax_consecutive3AuthorsEzra Rice-Initial work-ezrajriceLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details.AcknowledgmentsVictor Semionov-Contributor-vsemionovMostafa Moradian-Contributor-mostafa