Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Valuate
=======
A portable application to easily associate a user valuation (rating, like etc)
to any object, just on the basis of template tags. No configuration of existing
models and views required.


Installation
============

- Run `python setup.py install`
- Include 'valuate' in your installed apps settings.
- Add `(r'^valuate/', include('valuate.urls'))` to your main urls.py.
- Ensure you have request context preprocessor added in the list of preprocessors
or pass request varible context to views.


Usage
=====
Create a valuation type from admin site.
Let us say:
**Rating**

- Excellent 5
- Good 4
- Average 3
- Bad 2
- Poor 1

or

**LikeDislike**

- Like 1
- Dislike 0


**Available settings:**

`DEFAULT_VALUATION_TYPE_ID`: The ID of default valuation type to be used in the project
Load the template tags: `{% load valuation %}`

**Available tags:**

{% render_valuate form of object for valuation_type %}
------------------------------------------------------
Renders the valuation form for the provided object.
Override template: 'valuate/form.html' for modifying the look.

{% render_valuate form of object for valuation_type %}
---------------------------------------------------------
Renders the status according to the score of various choices.
Override template: 'valuate/status.html' for modifying the look.

{% get_valuate ajax_fields of object for valuation_type as variable %}
---------------------------------------------------------------------
Get the fields as dictionary required for an ajax post request in the context
or directly.
Variables available:
For post request: 'content_type','object_pk', 'choice' (to be selected
by user, can have an initial value if user has already submitted once)
'choices': dictionary of choices for user to provide the 'value' data.
'target': target for the request.
'vtype'": the valuation type.
On a successfull request, true will be retuned.
If you are not using a popular javascript liberary, pass on a POST
variable with name `ajax` and a `true` value.

{% get_valuate form of object for valuation_type as variable %}
--------------------------------------------------------------
Gets the valuation form in context or directly.
User `form_name.target` to access the target for the post request.

{% get_valuate score of object for valuation_type as variable %}
-----------------------------------------------------
The average score of the object using the corresponding values
of chioces.

{% get_valuate choice_count of object for_chioce choice_name for valuation_type as variable %}
----------------------------------------------------------------------------------------------
Returns the score count for a perticular choice of an object. Choice
should be provided with quotes (as string).

*The `for valuation_type` and `as variable` are optional arguments*

And Thats it!

Metadata

Release files for django-valuate 1.0-beta-2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-valuate 1.0-beta-2.2
File Size Uploaded Provenance Actions
django-valuate-1.0-beta-2.2.tar.gz 13.7 kB Without provenance Details for django-valuate-1.0-beta-2.2.tar.gz

Release files / django-valuate-1.0-beta-2.2.tar.gz

Download URL django-valuate-1.0-beta-2.2.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
88937fe62c2480d3964e92989676408a2bb6c9f462f00b7a1dd0a58270765144
BLAKE2b-256 checksum
How to use checksums
ab19bf5cf2c76dba1ccd890bc9e4dcbbda464f685b9e22e35651e2fa72fd4217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-valuate 1.0-beta-2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page