This release is a pre-release and may not be stable for production use.
Use pyrecommend in Django projects.
Warning: not yet suitable for production.
django_recommend/ is the actual Django app intended for use in projects.
simplerec/ is a Django project used for testing.
Quickstart
Add django_recommend to your INSTALLED_APPS, and run python manage.py migrate.
Set SESSION_SAVE_EVERY_REQUEST=True in your settings, to ensure anonymous users can be tracked.
In your views, call django_recommend.set_score(request, object, score) to start recording user scores. (Currently this is assumed to be implicit feedback.) Note: This will use session keys to store scores for users who aren’t authenticated.
In your templates, use {% load django_recommend %} and {{ obj|similar_objects }} to show similar objects to visitors. This filter returns a list, so you may also do, for example:
{% with similar_products as product|similar_objects %} {% if similiar_products %} <h2>Other users also liked:</h2> <ul> {% for product in similar_products %} <li><a href="{{ product.get_absolute_url }}">{{ product }}</a></li> {% endfor %} </ul> {% endif %} {% endwith %}
Release files for django-recommend 0.1.dev4
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-recommend-0.1.dev4.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_recommend-0.1.dev4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 19.4 kB
Release files / django-recommend-0.1.dev4.tar.gz
| Download URL | django-recommend-0.1.dev4.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38e1e6d0817b2218e84ef1906cdf1ad1757efa1c28c1523d18fcd69935baf5c9
|
|
BLAKE2b-256 checksum How to use checksums |
7128e11f78c20be3606524cb2aadf9f5b54d83093ca7cc6cb5011af3bee54d37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_recommend-0.1.dev4-py2-none-any.whl
| Download URL | django_recommend-0.1.dev4-py2-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
91bdb43e950a6d0d2533baa92e3df953c385d5e372c4c791d44457de674a6380
|
|
BLAKE2b-256 checksum How to use checksums |
c31c987f4aadd179c64ec98a7a48b2282b9fb46d5e9be5cbfbbbb986ebe11246
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |