Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
form field lable will now be according to vtype
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Jain committed Mar 2, 2011
1 parent a64f32b commit b8cebab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from setuptools import find_packages

setup(name='django-valuate',
version='1.0-beta-1',
version='1.0-beta-2',
description='Easy plugging of user evaluation system to any django object.',
long_description=open('README').read(),
author='Rohan Jain',
Expand Down
6 changes: 4 additions & 2 deletions valuate/templatetags/valuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def form(self, context):
request = context['request']
form = ValuationForm(request, obj=self.obj.resolve(context),
vtype=self.vtype)
form.fields['choice'].queryset=self.vtype.choice_queryset()
form.fields['choice'].queryset=self.vtype.choice_queryset()
form.fields['choice'].label=self.vtype.title
return form
methods['form'] = form

Expand Down Expand Up @@ -172,7 +173,8 @@ def form(self, context):
form = ValuationForm(context['request'],
obj=self.obj.resolve(context),
vtype=self.vtype)
form.fields['choice'].queryset=self.vtype.choice_queryset()
form.fields['choice'].queryset=self.vtype.choice_queryset()
form.fields['choice'].label=self.vtype.title
context['form']=form
return render_to_string('valuate/form.html', context)
methods['form']=form
Expand Down

0 comments on commit b8cebab

Please sign in to comment.