Garpix Admin lock
Garpix Admin lock allows you to lock a page in the admin panel
Quickstart
Install with pip:
pip install garpix_admin_lock
Add the garpix_admin_lock and dependency packages to your INSTALLED_APPS:
# settings.py
INSTALLED_APPS = [
# ...
'garpix_admin_lock',
# ...
]
Package not included migrations, set path to migration directory. Don't forget create this directory (app/migrations/garpix_admin_lock/) and place empty __init__.py:
app/migrations/
app/migrations/__init__.py # empty file
app/migrations/garpix_admin_lock/__init__.py # empty file
Add path to settings:
# settings.py
MIGRATION_MODULES = {
'garpix_admin_lock': 'app.migrations.garpix_admin_lock',
}
Add url to urls.py
# url.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('page_lock/', include('garpix_admin_lock.urls')),
]
Run make migrations:
python manage.py makemigrations
Migrate:
python manage.py migrate
Example
Add PageLockViewMixin in models
# example/models.py
from django.db import models
from admin_page_lock.mixins import PageLockViewMixin
class ExampleLock(PageLockViewMixin, models.Model):
...
Add PageLockAdminMixin in admin
# example/admin.py
from admin_page_lock.mixins import PageLockAdminMixin
from django.contrib import admin
from .models import Example
@admin.register(ExampleLock)
class ExampleAdmin(PageLockAdminMixin, admin.ModelAdmin):
lock_change_view = True
lock_changelist_view = False
...
Basis
Metadata
Release files for garpix-admin-lock 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| garpix_admin_lock-1.3.2.tar.gz | 26.6 kB | Without provenance | Details for garpix_admin_lock-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| garpix_admin_lock-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for garpix_admin_lock-1.3.2-py3-none-any.whl |
Total release size: 66.4 kB
Release files / garpix_admin_lock-1.3.2.tar.gz
| Download URL | garpix_admin_lock-1.3.2.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa48732ab7a10f442ad8e1a71ac12e610967886848e285b3c912ba7994f73e2f
|
|
BLAKE2b-256 checksum How to use checksums |
49edf6f6f3b7141899de77cfb2de1f6fc3dcc5f71aaf18b067a7a4959abc0720
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/7.0.2 pkginfo/1.10.0 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.2 CPython/3.8.18
|
Release files / garpix_admin_lock-1.3.2-py3-none-any.whl
| Download URL | garpix_admin_lock-1.3.2-py3-none-any.whl |
|---|---|
| Size | 39.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe5b858fe4080804566d64ff5f27365b0cb78fa06bd5022817d125ded50d2c80
|
|
BLAKE2b-256 checksum How to use checksums |
3664bacb7c51f1da59609e596b52fbe14396ea80312b92e086dcb872c88bf4db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/7.0.2 pkginfo/1.10.0 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.2 CPython/3.8.18
|
Security for garpix-admin-lock 1.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.