--- a/app/projrev/models.py Mon Aug 10 16:38:13 2009 +0530
+++ b/app/projrev/models.py Mon Aug 10 16:54:42 2009 +0530
@@ -12,6 +12,13 @@
from django.contrib.auth.models import User
+def dict_tuple(d):
+ """Function to return a tuple from dictionary
+ """
+
+ return [(v, k) for k, v in d.items()]
+
+
def sort_dict(d):
"""Function to sort dictionary elements.
"""
@@ -677,7 +684,7 @@
# Field containing the Line Item to which the project belongs to.
line_item = models.CharField(max_length=256,
- choices=tuple(LINE_ITEM_CHOICES))
+ choices=dict_tuple(LINE_ITEM_CHOICES))
line_item.help_text = 'Select from one of the Line Items.'
# Field containing the name of the institution working on the