Django Autocomplete
substring occurrence search module.
Allows the use of celery, if it is in the mood. The following settings are required in settings.py
AUTOCOMPLETER = {
'SERILEZER_CLASSES': 'your_module_name.autocompleter',
'LIMIT': 5,
'CELERY': True
}
Where:
- SERILEZER_CLASSES - indicates django_autompleter where to look for serialization ticket offices. The serialization class inherits from the base class SearcherSerializer. In the example below, we indicate which fields from the Publication model we want to return when requested.
from autocompleter import SearcherSerializer
class PublicationsSerializer(SearcherSerializer):
class Meta:
model = Publication
fields = (
'id',
'title',
)
- LIMIT - indicates the number of records received that must be returned.
- CELERY - indicates the start of the autompleter as a celery task. It is important, in this case, your project must have celery.py settings.
example:
from autocompleter import Autocompleter
autocomplete_coonection = Autocompleter()
result = autocomplete_coonection.get(
model=Publication,# search data model
column=["title"],# list of columns of the model to search for
value=value # value
)
Metadata
Release files for django-autocompleter 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_autocompleter-0.0.8.tar.gz | 3.4 kB | Details |
Release files / django_autocompleter-0.0.8.tar.gz
| Download URL | django_autocompleter-0.0.8.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63341e637b6e38e9d2dd475abe1652c8af7c58313c581214718a7ca3ca656cf5
|
|
BLAKE2b-256 checksum How to use checksums |
0c2bd4067088bb69b01936161658fde0fd41ef9f8f785b13d4d788b23ec043c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.6.8
|