Issue #18 new
Francesco Spegni
created an issue

When I follow this tutorial:

for simple rating, using the star form (I've added the lines below in my

ratings.register(<ModelName>, score_range=(1, 5), form_class=StarVoteForm)

I get the error above, and in the console (using Firebug) I see:

TypeError: objects.rating is not a function

related to the following piece of code added by the star_widget.html template:

var vote_form = objects.closest('form');
    callback: function(value, link) {
    if (value) {
        vote_form.trigger('star_change', [value]);
    } else {

is objects.rating(...) a lecit method call? where is it defined?

I don't know if it is related to this, but later in your tutorial I can see (on a different example), the following included js/css:

<link href="/path/to/jquery.rating.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/path/to/jquery.MetaData.js"></script>
<script type="text/javascript" src="/path/to/jquery.rating.js"></script>

should I include those files? If yes, where do I find them?

Comments (2)

  1. Francesco Spegni reporter

    update: installing jquery.rating.css / js and jquery.metadata.js plugins I get rid of the "TypeError: objects.rating is not a function", but the original problem "Invalid data in vote form" remains.

    The generated post looks like the following:

    Vote : Vota
    content_type : resources.concept
    csrfmiddlewaretoken : ZMRxoFKEoinCDQLPNmxQsO7xnGFusxea
    honeypot : 
    key : main
    object_pk : 1
  2. Paola Coccia

    Your POST data is missing the should look like this:


    Have you rendered the full rating form?

  3. Log in to comment