# HG changeset patch # User Madhusudan.C.S # Date 1249903482 -19800 # Node ID c64531b3afb4c71d68bf64ac46636b7ff5ebd5d0 # Parent 21942fac2b4b226b680b672d32494f7a681dd8ed Added settings.py to .hgignore. diff -r 21942fac2b4b -r c64531b3afb4 .hgignore --- a/.hgignore Mon Aug 10 16:38:13 2009 +0530 +++ b/.hgignore Mon Aug 10 16:54:42 2009 +0530 @@ -21,4 +21,5 @@ .gitignore .DS_Store index.yaml +app/settings.py .settings diff -r 21942fac2b4b -r c64531b3afb4 app/projrev/models.py --- 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