Django Kaleidos Rate is a django application for rate objects.
Configuration
Configure the app in your setting INSTALLED_APPS:
INSTALLED_APPS = [ ... krate, ... ]
DBRateHandler configuration
configure the dbratehandler, for example:
INSTALLED_APPS = [ ... krate.ratehandlers.dbratehandler, ... ]
Configure the rate handler on settings.py, for example:
KRATE_RATE_HANDLER = "krate.ratehandlers.dbratehandler.DBRateHandler"
If you want to have an copy of the average rate stored in the models add the KRateableMixin to your models, for example:
from krate.ratehandlers.dbratehandler.models import KRateableMixin
class MyModel(models.Model, KRateableMixin):
... # My model definition...
If you want to show and manage the valorations of the objects in the admin panel add a new inline to your models admin classes, for example:
from django.contrib.contenttypes.generic import GenericTabularInline
from krate.ratehandlers.dbratehandler.models import ObjRate, ObjRateAggregate
class ObjRateInline(GenericTabularInline):
model = ObjRate
class ObjRateAggregateInline(GenericTabularInline):
model = ObjRateAggregate
class MyModelAdmin(admin.ModelAdmin):
model = models.MyModel
inlines = [MyOtherInlines, ..., ObjRateAggregateInline, ObjRateAggregateInline]
Usage
Now you can use rate_object in your views to store the rate from users, and use the {% krate object %} and {% mykrate request_or_user object %} to get the average rate, and my own rate.
Metadata
Release files for django-krate 0.0.1
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 |
|---|---|---|---|---|
| django-krate-0.0.1.tar.gz | 6.2 kB | Without provenance | Details for django-krate-0.0.1.tar.gz |
Release files / django-krate-0.0.1.tar.gz
| Download URL | django-krate-0.0.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb2de11834ff64f8825590ebde5b0cbbf020afe3bde59de548f5b63f2eddf119
|
|
BLAKE2b-256 checksum How to use checksums |
1669416c61eff30276f4205a48cef80241d1985da72e3012282f068fc6603631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-krate 0.0.1
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.