class Job(models.Model):
title= models.CharField(max_length=20)
slug = models.SlugField(max_length=40, blank=True)
def __unicode__(self):
return self.title class Vote(models.Model):
job = models.ForeignKey(Job)
score = models.IntegerField(blank=True, default=0)
As I did all the html / css. I would not return the form that way.
I tried a different approach, trying to pass the values of the vote through a link using jquery, but I can not mount the garvar to view the value of voting.
It would be a mess trying to return an HTML inside FormVote, something like:
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/736728d8-dc12-41aa-b223-7c8bed0a2cf4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.