Merge lp:~widelands-dev/widelands-website/replace_djangoratings into lp:widelands-website
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 508 | ||||
Proposed branch: | lp:~widelands-dev/widelands-website/replace_djangoratings | ||||
Merge into: | lp:widelands-website | ||||
Diff against target: |
195 lines (+62/-3) 10 files modified
media/css/base.css (+4/-0) pip_requirements.txt (+1/-0) settings.py (+9/-0) templates/star_rating/average.html (+7/-0) templates/star_rating/rate.html (+27/-0) templates/wlmaps/base.html (+3/-0) templates/wlmaps/index.html (+5/-1) templates/wlmaps/map_detail.html (+4/-1) urls.py (+1/-0) wlmaps/templatetags/wlmaps_extra.py (+1/-1) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands-website/replace_djangoratings | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
GunChleoc | Approve | ||
Review via email: mp+358958@code.launchpad.net |
Commit message
Exchange old app djangoratings with django-star-ratings
Description of the change
Another cleanup for the update of python. Exchange the old unmaintained app djangoratings with an up-to-date app.
I decided to get this in in two steps:
1. This branch adds the new app. The conversion of old votes to new votes can be done in the django shell (see below). In this branch the old values remains visible, so we can check if the conversion is done correctly.
2. In a another branch we clean up the code to remove the old app djangorating.
After merging this branch it is important to delete a remaining .pyc file:
djangoratings/
We can import the old ratings as follows in the django shell:
from djangoratings.
from star_ratings.models import Rating, UserRating
for obj in Score.objects.
vote_obj = Rating.
for v in Vote.objects.
vote = UserRating.
vote.save()
vote_
LGTM :)