Saravanan666/pypi-org huggingface dataset:
Package: django-admin-honeypot-advanced
django-admin-honeypot-advancedis an honeypot for the Django framework admin page with the following features:A first fake login page combined with Hashcash, so that each login attempt requires a proof-of-work that will consume computation resources of attackers.A second fake login page again combined with Hashcash and affected by a Blind SQL Injection flaw, the exploitation of which requires enormous computational resources of attackers and would anyhow reveal data from an in-memory database comprising only fake credentials. Additionally, such fake credentials are made of hashed password taken from the famous rockyou list, so to deceive attackers and let them waste more computational resources in the attempt to break such hashes.An endpoint affected by path traversal and pointing to a fake filesystem replicating the structure of Docker containers, so to induce attackers to believe the app is running in a misconfigured Docker container exposing sensible files like /etc/passwd and /etc/shadow. Such credential files contain password hashes that may deceive attackers and waste their computational resources.A custom 404 page that returns the HTTP status code 200 and include random invisible content, so that non-existent URIs are associated with less predictable pages in the aim to make URIs bruteforcing harder.The honeypot is a fork of Derek Payton’s django-admin-honeypotAuthor: Daniele SalimontiVersion: 1.0.1License: MITDocumentationtl;drInstall django-admin-honeypot from PyPI:pip install django-admin-honeypot-advancedAddadmin_honeypottoINSTALLED_APPSUpdate your urls.py:urlpatterns = [
    ...
    path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
    path('secret/', admin.site.urls),
]

handler404 = 'admin_honeypot.views.handler404'Runpython manage.py migrateNOTE: replacesecretin the url above with your own secret url prefix
Package: django-admin-honeypot-dlan
django-admin-honeypotis a fake Django admin login screen to log and notify
admins of attempted unauthorized access. This app was inspired by discussion
in and around Paul McMillan’s security talk at DjangoCon 2011.Author:Derek PaytonVersion: 1.1.0License: MITDocumentationhttp://django-admin-honeypot.readthedocs.iotl;drInstall django-admin-honeypot from PyPI:pip install django-admin-honeypotAddadmin_honeypottoINSTALLED_APPSUpdate your urls.py:urlpatterns = [
    ...
    path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
    path('secret/', admin.site.urls),
]Runpython manage.py migrateNOTE: replacesecretin the url above with your own secret url prefix
Package: django-admin-honeypot-updated-2021
django-admin-honeypotis a fake Django admin login screen to log and notify
admins of attempted unauthorized access. This app was inspired by discussion
in and around Paul McMillan’s security talk at DjangoCon 2011.Author:Derek PaytonVersion: 1.1.0License: MITDocumentationhttp://django-admin-honeypot.readthedocs.iotl;drInstall django-admin-honeypot from PyPI:pip install django-admin-honeypotAddadmin_honeypottoINSTALLED_APPSUpdate your urls.py:urlpatterns = [
    ...
    path('admin/', include('admin_honeypot.urls', namespace='admin_honeypot')),
    path('secret/', admin.site.urls),
]Runpython manage.py migrateNOTE: replacesecretin the url above with your own secret url prefix
Package: django-admin-import
Admin Import============Installation------------**Notice**: This application is still under development and everythingis subject to change.1. Add ``'admin_import'`` to ``INSTALLED_APPS`` in your settings file.2. Add an import to your admin like so::try:from admin_import.options import add_importexcept ImportError:passelse:add_import(InviteeAdmin)3. Add a button in your admin by overriding the ``change_list.html`` templatefor your specific model or use ``add_import(InviteeAdmin, add_button=True)``4. If you need an other modelform than used in the admin you can overridethe ``get_admin_import_model_form` function. But it should be capable ofexcluding some files.Change Notes------------0.3.0~~~~~- add a method to specify a custom form to use during the import- cleaned up some code- replace print with logging
Package: django-admin-index-modules
Django admin index modulesDjango admin index modules is a Django app that gives you the ability to add widgets modules to the django admin dashboard (admin index).Quick startInstallation:pip install django-admin-index-modulescomment "django.contrib.admin" and add "django_admin_index_modules.apps.CustomAdminConfig" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
        ...
        #'django.contrib.admin',
        'django_admin_index_modules.apps.CustomAdminConfig',
        ...

        'django.contrib.staticfiles',
        ...

        'django_admin_index_modules.apps.ModulesDashboardsConfig',
        ...
    ]In admin.py file of any other app create ypur widget module like this:from django_admin_index_modules.admin import AdminModuleView

    class VisitorsAdminModuleView(AdminModuleView):

        template_name = 'visitors.html'
        json_method_names = ['post']
        http_method_names = ['get','post']
        permissions = ['is_superuser']
        css = []
        js = []

        def get(self, request, **kwargs):
            context = {
                'stats': "visitors"
            }
            return contextregister your widget module using one of those methods:using register_module(AdminModuleView, position="middle_top") methods:from django.contrib import admin

    admin.site.register_module(VisitorsAdminModuleView, position="middle_top")using @register_module(position="middle_top") decorator:from django_admin_index_modules.admin import register_module

    @register_module(position="middle_top")
    class VisitorsAdminModuleView(AdminModuleView):
        ...position keyword can take one of those values: top, middle_top, middle_bottom and bottomcreate template file under "admin/modules/" than the name of the template file assigned to template_name propriety ex: "visitors.html"Visithttp://127.0.0.1:8000/admin/to see your widget module.
Package: django-admin-info
Django Admin InfoDescriptionSimple Collapsible Admin view for Django with model information.Installationpip install django-admin-infoQuick startAdd "admin_info" to your INSTALLED_APPS in settings.py like this::INSTALLED_APPS = [
    ...
    'admin_info',
    ...
]Ensure "APP_DIRS" to "True" in settings.py like this::TEMPLATES = [
    {
        ...
        'DIRS': [],
        'APP_DIRS': True,
        ...
    },
]LicenceCopyright (c) 2020 Nilesh Kumar DubeyThis repository is licensed under the MIT license.
See LICENSE for details
Package: django-admin-inline-paginator
Django Admin Inline PaginatorThe "Django Admin Inline Paginator" is simple way to paginate your inline in django adminIf you use or like the project, clickStarandWatchto generate metrics and i evaluate project continuity.Install:pip install django-admin-inline-paginatorUsage:Add to your INSTALLED_APPS, in settings.py:INSTALLED_APPS = [
    ...
    'django_admin_inline_paginator',
    ...
]Create your model inline:from django_admin_inline_paginator.admin import TabularInlinePaginated

class ModelWithFKAdminInline(TabularInlinePaginated):
    fields = (...)
    per_page = 1
    model = ModelWithFKCreate main model admin and use inline:@register(YourModel)
class YourModelAdmin(ModelAdmin):
    fields = (...)
    inlines = (ModelWithFKAdminInline, )
    model = YourModelAdvanced Usage:Paginate multiples inlines:class ModelWithFKInline(TabularInlinePaginated):
fields = ('name', 'active')
per_page = 2
model = ModelWithFK
pagination_key = 'page-model'  # make sure it's unique for page inline

class AnotherModelWithFKInline(TabularInlinePaginated):
fields = ('name', 'active')
per_page = 2
model = AnotherModelWithFK
pagination_key = 'page-another-model'  # make sure it's unique for page inlineUse previous inlines@register(YourModel)
class YourModelAdmin(ModelAdmin):
    fields = (...)
    inlines = (ModelWithFKAdminInline, AnotherModelWithFKInline)
    model = YourModelImages:Need a MaintainerIn the last months i don't have much time, health problemas, change of country and others problems.i have some surgeries for first part of 2022, and all of my current project don't use django-admin.for these reasons, i need a help for a project continuation!!
Package: django-admin-ip-restrictor
A Django middleware to restrict the access to the Django admin based on incoming IPsRequirementsPython >= 3.5Django >= 1.11,<4django-ipware=>2,<4Note that Django 3 has dropped support for Python 3.5UsageFirst install the package:$ pip install django-admin-ip-restrictorThen add the middleware to your settings:MIDDLEWARE = [
    ...
    'admin_ip_restrictor.middleware.AdminIPRestrictorMiddleware'
]Set these variables in yoursettings.pyto control who has access to the admin (IPV4 and IPV6 can be mixed):RESTRICT_ADMIN=True
ALLOWED_ADMIN_IPS=['127.0.0.1', '::1']
ALLOWED_ADMIN_IP_RANGES=['127.0.0.0/24', '::/1']
RESTRICTED_APP_NAMES=['admin']
TRUST_PRIVATE_IP=TrueUseRESTRICTED_APP_NAMESto restrict the access to more apps. Admin app is always included.If using environment variables make sure that the variables receive the right type of value.django-admin-ip-restrictorautomatically converts the following formats:$ export RESTRICT_ADMIN='true'
$ export ALLOWED_ADMIN_IPS='127.0.0.1,::1'
$ export ALLOWED_ADMIN_IP_RANGES='127.0.0.0/24,::/1'
$ export RESTRICTED_APP_NAMES='wagtail_admin,foo'ForRESTRICT_ADMINalso these values can be used:True,1,false,False,0UseTRUST_PRIVATE_IPto skip checking IP addresses from a trusted private network.ChangelogFull changelog athttps://github.com/sdonk/django-admin-ip-restrictor/blob/master/CHANGELOG.rstRun testsInstalltox:$ pip install toxInstallpyenv, usehttps://github.com/pyenv/pyenv#installationas reference.Install Python versions inpyenv:$ pyenv install 3.5.10
$ pyenv install 3.6.12
$ pyenv install 3.7.9
$ pyenv install 3.8.6Specify the Python versions you want to test with:$ pyenv local 3.5.10 3.6.12 3.7.9 3.8.6Run tests:$ toxContributeFork the project and submit a PR!
Package: django-admin-item-owner
django-admin-item-ownerModel item always has an owner, and login user can only see owned items.GoalSet item's owner to current user automatically.Installpipinstalldjango-admin-item-ownerSettingsINSTALLED_APPS=[....'django_global_request','item_owner',...]MIDDLEWARE=[...'django_global_request.middleware.GlobalRequestMiddleware',...]Exampleexample/models.pyfromdjango.dbimportmodelsfromitem_owner.modelsimportItemOwnerMixinfromitem_owner.modelsimportItemShareMixinclassCategory(ItemOwnerMixin,models.Model):title=models.CharField(max_length=32)def__str__(self):returnself.titleclassBook(ItemOwnerMixin,ItemShareMixin,models.Model):category=models.ForeignKey(Category,on_delete=models.SET_NULL,null=True,blank=True,related_name="books")title=models.CharField(max_length=32)def__str__(self):returnself.titleexample/admin.pyfromdjango.contribimportadminfromdjangoimportformsfromitem_owner.adminimportItemOwnerMixinfromitem_owner.adminimportItemShareMixinfrom.modelsimportCategoryfrom.modelsimportBookclassBookInline(ItemOwnerMixin,ItemShareMixin,admin.TabularInline):model=BookclassCategoryAdmin(ItemOwnerMixin,admin.ModelAdmin):list_display=["title"]inlines=[BookInline,]classBookAdmin(ItemOwnerMixin,ItemShareMixin,admin.ModelAdmin):list_display=["title"]admin.site.register(Category,CategoryAdmin)admin.site.register(Book,BookAdmin)Releasesv0.2.0 2020-01-08Add ItemShareMixin for models and admins.v0.1.0 2019-12-01First release.
Package: django-adminjournal
This library added extended capabilities to log access to Django ModelAdmins.FeaturesLog additions, changes, deletions of models via the Django adminLog read access to change lists and model instances (unsaved change views)Log calls to actions in changelists of ModelAdminsRequirementsdjango-adminjournal supports Python 3 only and requires at least Django 1.11.
The package uses Django’s JSONField. Therefore, PostgreSQL database backend is required.Prepare for developmentA Python 3.6 interpreter is required in addition to pipenv.$pipenvinstall--python3.6--dev$pipenvshell$pipinstall-e.Now you’re ready to run the tests:$pipenvrunpy.testResourcesDocumentationBug TrackerCode
Package: django-admin-jqueryui
This app adds jQuery UI to your Django admin panel.InstallationPut ‘admin_jqueryui’ on your python pathAdd ‘admin_jqueryui’ to INSTALLED_APPS tuple in settings fileUnless using Django 1.3 or above, make static/admin_jqueryui/
available under {{ MEDIA_URL }}admin_jqueryui/UsagejQuery UI is now available in admin under both jQuery and
django.jQuery namespace.
Package: django-admin-json-editor
Django Administration JSON EditorApplication adds support for editing JSONField in Django Administration viahttps://github.com/json-editor/json-editor.Quick startInstall application via pip:pipinstalldjango-admin-json-editorAdd application to the INSTALLED_APPS settings:INSTALLED_APPS=[...'django_admin_json_editor',...]Define schema of json field:DATA_SCHEMA={'type':'object','title':'Data','properties':{'text':{'title':'Some text','type':'string','format':'textarea',},'status':{'title':'Status','type':'boolean',},},}Use JSONEditorWidget to bind editor to the form field:classJSONModelAdminForm(forms.ModelForm):classMeta:model=JSONModelfields='__all__'widgets={'data':JSONEditorWidget(DATA_SCHEMA,collapsed=False),}Dynamic schemaIt is possible to build dynamic schema for widget:defdynamic_schema(widget):return{'type':'array','title':'tags','items':{'type':'string','enum':[iforiinTag.objects.values_list('name',flat=True)],}}@admin.register(JSONModel)classJSONModelAdmin(admin.ModelAdmin):defget_form(self,request,obj=None,**kwargs):widget=JSONEditorWidget(dynamic_schema,False)form=super().get_form(request,obj,widgets={'tags':widget},**kwargs)returnform
Package: django-admin-keyboard-shortcuts
About Django Admin Keyboard Shortcuts============Keyboard Shortcuts for your Admin Backend. See "Usage" section below for all implemented shortcuts.Installation============To get the latest stable release from PyPi.. code-block:: bashpip install django-admin-keyboard-shortcutsTo get the latest commit from GitHub.. code-block:: bashpip install -e git+git://github.com/arteria/django-admin-keyboard-shortcuts.git#egg=admin_keyboard_shortcutsThere are not further dependencies!In your project settings, add ``admin_keyboard_shortcuts`` to your ``INSTALLED_APPS`` before ``django.contrib.admin``.. code-block:: pythonINSTALLED_APPS = (...,'admin_keyboard_shortcuts','django.contrib.admin',...,)Optionally, by setting ``ADMIN_KEYBOARD_SHORTCUTS_HIDE_ICON = True`` in project settings, the icon that indicates"shortcut support" will be hidden.Don't forget to collect the icons.. code-block:: bash./manage.py collectstaticUsage============* Just hit ``cmd`` + ``s`` (or ``Ctrl`` + ``s``) instead of clicking the "save" button on the bottom of the Django admin.* Use ``cmd`` + ``o`` (or ``Ctrl`` + ``o``) to save current and open new object (= add another).* Use ``cmd`` + ``c`` (or ``Ctrl`` + ``c``) to save current and continue editing* Use ``j`` and ``k`` navigation for result lists. Pressing the ``return`` key on a selected row opens the detail page.TODO and planned features============* Open new object (= add another) on the for result lists* Navigation using ``j`` and ``k`` in admin start page.Icon============The icon is from Janik Baumgartner http://janikbaumgartner.com/and can be found here: http://www.iconarchive.com/show/woocons-icons-by-janik-baumgartner.htmlHistory============Development Version-------------------0.1.5-----* Bugfix release0.1.4-----* Added new shortcuts, see Usage section.* Changed README to Markdown* Startet HistoryContribute============That's easy - just send your pull request. Thanks![![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/philippeowagner/django-admin-keyboard-shortcuts/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Package: django-admin-keycloak
django-admin-keycloakKeycloakCreate Client OpenID with callback urlhttps://keycloak.example.ru/sso/*add client scopes "roles" and
set client Backchannel logout URLhttps://keycloak.example.ru/sso/logoutSettings# define static config or add provider later in admin managementKEYCLOAK_PROVIDERS=[{'slug':'local',# internal django slug'name':'Local',# name on login form'client_id':'local_django','client_secret':'SECRET','redirect_uri':'/admin',# redirect uri after login'server_url':'https://keycloak.example.ru','realm_name':'django','role_staff_user':'dev_staff',# role for staff users'role_super_user':'dev_super_user',# role for superusers}]Add to INSTALLED_APPSINSTALLED_APPS=['django_admin_keycloak','django.contrib.admin',# ...]Add to urls.pyurlpatterns=[# ...,path('sso/',include('django_admin_keycloak.url')),# ...]If you define static config, you must execute command for update providers.pythonmanage.pyupdate_static_providersAvailable signalsuser_sso_loginOn login SSO usersession: KeycloakSessionrequest: HttpRequestuserinfo: dictaccess_token: struser_sso_logoutOn logout SSO usersession: KeycloakSessionrequest: HttpRequest
Package: djangoadminkit
Polls is a Django app to conduct Web-based polls. For each question,
visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:path('polls/', include('polls.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: django-admin-kubi
Supports Django 4.0+Django admin Kubi applies a face lift for the Django admin interface and mechanics. Its features include:A fast, attractive editor interfaceComplete Bootstrap 5 TemplatesSass support for custom stylingFont awesomeMobile friendlyTinyMce WidgetAdmin with sidebar menu for easy navigationAdmin Search ViewAdmin LogEntry viewdjango-modeltranslation supportdjango-modeltrans supportdjango-import-export supportdjango-two-factor-auth supportdjango-colorfield support
Package: django-admin-lazy-load
django-admin-lazy-loadAllows to speed-up loading of django admin page by loading heavy calculated field in lazy maner - via separate ajax requestsInstallpip install django-admin-lazy-loadAdd"admin_lazy_load"toINSTALLED_APPSMake suredjango.contrib.staticfiles.finders.AppDirectoriesFinderis not disabled in your settings.Usagefrom admin_lazy_load import LazyLoadAdminMixin

....

class YourModelAdmin(LazyLoadAdminMixin, ModelAdmin):
    ...
    lazy_loaded_fields = (
        'calculated_value'
    )
    list_display = (
        ...
        'calculated_value_lazy_click'
        ...
    )

    def calculated_value(self, obj):
        return ...
Package: django-admin-left-menu
Django Admin Left MenuA left menu for django adminTutorialsInstall$ pip install django-admin-left-menuAdd xadmin to Installed AppsINSTALLED_APPS=[...xadmin,...]Copy base_site.html of django admin$ mkdir templates/admin -p
$ copy /path/to/django/admin/templates/admin/base_site.html templates/adminAdd left menu code$ vim templates/admin/base_site.html
Package: django-admin-log
Application that logs errors generated in a web system into a model. The model is displayed in the administrator.Installingpip install django-admin-logQuick startInclude the app ‘log’ to INSTALLED_APPS in the settings.pyApply migration with migrate for registry the model of django-seo-admin:python manage.py migrateRun serverHow to use?For example, to record an errorIn the views.py:from log.utils import set_error_to_log

def myview(request, pk):

        try:
                raise "Error auto generate"
        except Exception, e:
                set_error_to_log(request, str(e))When occurs on error, go the administrator and visualize the record in the model.For example, for get errors loaded on a dateIn the views.py:from log.utils import get_data_log

def myview(request, pk):

        now = datetime.datetime.now()
        data = get_data_log('date', now)
        content = data[0].content

        return HttpResponse(content)In this example, i’m getting errors from field date with the value now. Then getting the first value.
Other field can be username.
Package: django-adminlogentries
By default,django.contrib.admin’s index shows the logged in user’s 10 most
recent actions. This app provides aModelAdminfordjango.contrib.admin’sLogEntrymodel (with everything except the list
disabled), allowing you to see every action taken by every user. The list can
be filtered, searched, and sorted, as you would expect of aModelAdmin.
This app is for Django 1.11 through 5.0. It may work on older versions of
Django, but it has not been tested.InstallationStep 1 of 2: Install the packagepipinstalldjango-adminlogentriesStep 2 of 2: Update “settings.py”Addadmin_log_entriesto yourINSTALLED_APPS:INSTALLED_APPS=(...'admin_log_entries',...)ConfigurationBy default, thehas_module_permissionmethod of this app’sModelAdminretains Django’s default behavior. If you want it to returnFalseinstead,
add the following to your “settings.py”:ADMIN_LOG_ENTRIES={'has_module_permission_false':True,}This will prevent “Log entries” from being displayed on the admin index page
(and sidebar, in the case of Django 3.1+) and will also prevent accessing theadminmodule’s index page.
Package: django-admin-logs
Log entries are automatically created by the Django framework whenever a user
adds, changes or deletes objects through the admin interface.Django Admin Logsis a package that allows you to either view the admin
log entries from within the admin interface, or to disable them entirely.RequirementsPython 3.6+Django 3.2+InstallationInstall the package from PyPI:pipinstalldjango-admin-logsThen add it to yourINSTALLED_APPSin thesettingsfile:INSTALLED_APPS=(...'django_admin_logs',...)ConfigurationBy default,Django Admin Logsenables log entries to be viewed from within
the admin interface but does not allow them to be deleted. Either of these
options can be configured by adding the following to yoursettingsfile.DJANGO_ADMIN_LOGS_DELETABLE=TrueThis allows super users, or any staff users with the delete_logentry
permission, to delete log entries from within the admin interface.DJANGO_ADMIN_LOGS_ENABLED=FalseThis disables admin log entries so that they are no longer created by the
Django framework or viewable from within the admin interface.DevelopmentFrom the local project directory, activate the virtual environment and install the development requirements:pipinstall-e.[dev]To run tests for the installed version of Python and Django using pytest:pytestTo run tests for all supported Python and Django versions using tox:toxTo run tests for specific versions e.g. Python 3.9 and Django 3.2:tox-epy39-django32
Package: django-admin-logviewer
Django AdminLogViewerAllows the viewing and download of specific log files in real time directly from the Django admin interface.Inspired byDjango LogTailerFeatures:log files will be shown incrementally in "follow mode"the whole log file can be downloaded for later inspectionno Django Models are installedthe list of viewable log files is hardcoded in Django settings for security reasonsQuick startInstall Django LogViewer:pip install django-admin-logviewerAdd it to yourINSTALLED_APPS:INSTALLED_APPS = (
        ...
        'logviewer',
        ...
    )Add Django LogViewer's URL patterns:urlpatterns = [
        ...
        path('logviewer/', include('logviewer.urls', namespace='logviewer')),
        ...
    ]Then visit:http://127.0.0.1:8000/logviewer/logsSettingsSettingPurposeDefaultLOGVIEWER_LOGSlist of log files' paths[]LOGVIEWER_REFRESH_INTERVALin [ms]1000LOGVIEWER_INITIAL_NUMBER_OF_CHARSinitial n. of chars read from the tail of the existing file2048Screenshots