Auto add placeholder content for django admin
Project description
django-search-placeholder
Auto add placeholder content for django admin
Install
- By git
pip install git+https://hub.fastgit.org/waketzheng/django-search-placeholder.git
Usage
- Add app name to settings
INSTALLED_APPS = [
...
"django.contrib.admin",
...
"search_placeholder",
...
]
- Use search_placeholder.ModelAdmin to replace admin.ModelAdmin
from django.contrib import admin
from search_placeholder import ModelAdmin
@admin.register(ModelClass)
class ModelClassAdmin(ModelAdmin):
# Just inherit from search_placeholder.ModelAdmin
# it will auto generate placeholder of search input by
# the verbose_name of 'field1' and 'field2'
# Or you can uncomment the next line to custom placeholder
#search_placeholder = 'Custom content'
search_fields = ('field1', 'field2')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for search_placeholder-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a427d31fdd384f0d2237f825e4e9e5a3b67398402994a67a9db49516ce5e1bc |
|
MD5 | af4602a203ad7317612db9283023ed66 |
|
BLAKE2b-256 | 11ec0b27bbe3e34c457fdf6df6d132dbb4826bd4666a1c06e10a3aace85c7e6a |