app/projrev/models.py
changeset 37 e78a5483553e
parent 36 a7c525ec281a
child 38 3cb38edbe05f
equal deleted inserted replaced
36:a7c525ec281a 37:e78a5483553e
    30 
    30 
    31 class Project(models.Model):
    31 class Project(models.Model):
    32   """Model class for NME funded projects.
    32   """Model class for NME funded projects.
    33   """
    33   """
    34 
    34 
    35   LINE_ITEM_CHOICES = {
    35   LINE_ITEM_CHOICES = [
    36       "NP": "NPTEL  phase II / III",
    36       ("NP", "NPTEL  phase II / III"),
    37       "PG": "PG Classes",
    37       ("PG", "PG Classes"),
    38       "UG": "UG Classes",
    38       ("UG", "UG Classes"),
    39       "VC": "Video content digitization, conversion,  chunking and dubbing CEC / IGNOU / NCERT / SIET / OTHERS",
    39       ("VC", "Video content digitization, conversion,  chunking and dubbing CEC / IGNOU / NCERT / SIET / OTHERS"),
    40       "PE": "Provision of e-books and e-journals free to the learners",
    40       ("PE", "Provision of e-books and e-journals free to the learners"),
    41       "SQ": "Standardisation of quality assurance of contents & certification / automation of certification",
    41       ("SQ", "Standardisation of quality assurance of contents & certification / automation of certification"),
    42       "DS": "Developing suitable pedagogical methods for various classes, intellectual calibers and research in e-learning",
    42       ("DS", "Developing suitable pedagogical methods for various classes, intellectual calibers and research in e-learning"),
    43       "DL": "Development of language converter and translation tool kit",
    43       ("DL", "Development of language converter and translation tool kit"),
    44       "DR": "Development and realization of Virtual Reality Laboratories and supporting facilities for e-learning",
    44       ("DR", "Development and realization of Virtual Reality Laboratories and supporting facilities for e-learning"),
    45       "DC": "Development of Certification & Testing Modules for Virtual Technological Universities & creation of VTU, multi media research and international programmes",
    45       ("DC", "Development of Certification & Testing Modules for Virtual Technological Universities & creation of VTU, multi media research and international programmes"),
    46       "ED": "Experimentation and Development of ultra low cost access devices for wider coverage of learners & their field trials",
    46       ("ED", "Experimentation and Development of ultra low cost access devices for wider coverage of learners & their field trials"),
    47       "TT": "Talk to a teacher to provide a substitute for coaching for the economically poor students",
    47       ("TT", "Talk to a teacher to provide a substitute for coaching for the economically poor students"),
    48       "DH": "Development of software controlled hardware programming for robotics other crucial areas",
    48       ("DH", "Development of software controlled hardware programming for robotics other crucial areas"),
    49       "AD": "Adaptation & deployment of open source simulation packages equivalent to MATLAB, ORCAD etc.",
    49       ("AD", "Adaptation & deployment of open source simulation packages equivalent to MATLAB, ORCAD etc."),
    50       "DU": "Development of unified ERP system for Educational Institutions",
    50       ("DU", "Development of unified ERP system for Educational Institutions"),
    51       "PT": "Publicity & training of motivators & trainers to ensure full utilization of the systems by institutions & students. Teacher Empowerment 'B'",
    51       ("PT", "Publicity & training of motivators & trainers to ensure full utilization of the systems by institutions & students. Teacher Empowerment 'B'"),
    52       "CC": "Conversion of available content in various regional languages",
    52       ("CC", "Conversion of available content in various regional languages"),
    53       "DV": "Development of Vocational Educational modules and use of haptic devices for education & training",
    53       ("DV", "Development of Vocational Educational modules and use of haptic devices for education & training"),
    54       }
    54       ]
    55 
    55 
    56   STATE_CHOICES = {
    56   STATE_CHOICES = {
    57       "AN": "Andaman & Nicobar", 
    57       "AN": "Andaman & Nicobar", 
    58       "DN": "Dadra and Nagar Haveli", 
    58       "DN": "Dadra and Nagar Haveli", 
    59       "DL": "Delhi", 
    59       "DL": "Delhi", 
   682       "MPDM": "Damoh"
   682       "MPDM": "Damoh"
   683       }
   683       }
   684 
   684 
   685   # Field containing the Line Item to which the project belongs to.
   685   # Field containing the Line Item to which the project belongs to.
   686   line_item = models.CharField(max_length=256,
   686   line_item = models.CharField(max_length=256,
   687                                choices=dict_tuple(LINE_ITEM_CHOICES))
   687                                choices=LINE_ITEM_CHOICES)
   688   line_item.help_text = 'Select from one of the Line Items.'
   688   line_item.help_text = 'Select from one of the Line Items.'
   689 
   689 
   690   # Field containing the name of the institution working on the
   690   # Field containing the name of the institution working on the
   691   # project.
   691   # project.
   692   institution = models.CharField(max_length=256)
   692   institution = models.CharField(max_length=256)
   726   @classmethod
   726   @classmethod
   727   def getLineItem(cls, code):
   727   def getLineItem(cls, code):
   728     """Get the State name from its code.
   728     """Get the State name from its code.
   729     """
   729     """
   730 
   730 
   731     return cls.LINE_ITEM_CHOICES[code]
   731     for index, value in cls.LINE_ITEM_CHOICES:
       
   732       if index == code:
       
   733         return value
       
   734 
       
   735     return None
   732 
   736 
   733   @classmethod
   737   @classmethod
   734   def getLineItemCode(cls, name):
   738   def getLineItemCode(cls, name):
   735     """Get the Line Item code from its name.
   739     """Get the Line Item code from its name.
   736     """
   740     """
   737 
   741 
   738     for ln_code in cls.LINE_ITEM_CHOICES:
   742     for ln_code, ln_name in cls.LINE_ITEM_CHOICES:
   739       if cls.LINE_ITEM_CHOICES[ln_code] == name:
   743       if ln_name == name:
   740         return ln_code
   744         return ln_code
   741 
   745 
   742     return None
   746     return None
   743 
   747 
   744   @classmethod
   748   @classmethod
   860   reviewed_on = models.DateTimeField(auto_now=True)
   864   reviewed_on = models.DateTimeField(auto_now=True)
   861 
   865 
   862   #: Field containing the review value for this attribute.
   866   #: Field containing the review value for this attribute.
   863   attribute1 = models.PositiveSmallIntegerField(
   867   attribute1 = models.PositiveSmallIntegerField(
   864       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   868       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   865   attribute1.verbose_name = 'Feasibility of the proposed activity and the      '
   869   attribute1.verbose_name = ('Feasibility of the proposed activity and the '
   866       'appropriateness of the time frame.'
   870       'appropriateness of the time frame.')
   867   
   871   
   868   attribute2 = models.PositiveSmallIntegerField(
   872   attribute2 = models.PositiveSmallIntegerField(
   869       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   873       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   870   attribute1.verbose_name = 'Uniqueness/novelty/innovation of the said proposal'
   874   attribute1.verbose_name = ('Uniqueness/novelty/innovation of the said '
       
   875       'proposal')
   871 
   876 
   872   attribute3 = models.PositiveSmallIntegerField(
   877   attribute3 = models.PositiveSmallIntegerField(
   873       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   878       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   874   attribute1.verbose_name = 'Scope for inter-institutional collaboration and   '
   879   attribute1.verbose_name = ('Scope for inter-institutional collaboration and '
   875       'development.'
   880       'development.')
   876 
   881 
   877   attribute4 = models.PositiveSmallIntegerField(
   882   attribute4 = models.PositiveSmallIntegerField(
   878       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   883       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   879   attribute1.verbose_name = 'The organisation of the programme to be carried   '
   884   attribute1.verbose_name = ('The organisation of the programme to be carried '
   880       'out.'
   885       'out.')
   881 
   886 
   882   attribute5 = models.PositiveSmallIntegerField(
   887   attribute5 = models.PositiveSmallIntegerField(
   883       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   888       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   884   attribute1.verbose_name = 'The details of the work as the outlined by the    '
   889   attribute1.verbose_name = ('The details of the work as the outlined by the '
   885       'principal investigator(PI).'
   890       'principal investigator(PI).')
   886 
   891 
   887   attribute6 = models.PositiveSmallIntegerField(
   892   attribute6 = models.PositiveSmallIntegerField(
   888       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   893       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   889   attribute1.verbose_name = 'Sufficiency of funds as requested by the PI.'
   894   attribute1.verbose_name = ('Sufficiency of funds as requested by the PI.')
   890 
   895 
   891   attribute7 = models.PositiveSmallIntegerField(
   896   attribute7 = models.PositiveSmallIntegerField(
   892       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   897       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   893   attribute1.verbose_name = 'Social impact/reach/spread of the outcome of the  '
   898   attribute1.verbose_name = ('Social impact/reach/spread of the outcome of the '
   894       'proposal.'
   899       'proposal.')
   895 
   900 
   896   attribute8 = models.PositiveSmallIntegerField(
   901   attribute8 = models.PositiveSmallIntegerField(
   897       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   902       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   898   attribute1.verbose_name = 'Contribution of the proposal to minimizing the    '
   903   attribute1.verbose_name = ('Contribution of the proposal to minimizing the '
   899       'digital divide in our country.'
   904       'digital divide in our country.')
   900 
   905 
   901   attribute9 = models.PositiveSmallIntegerField(
   906   attribute9 = models.PositiveSmallIntegerField(
   902       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   907       choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])
   903   attribute1.verbose_name = 'Any other matter which is likely to affect the    '
   908   attribute1.verbose_name = ('Any other matter which is likely to affect the '
   904       'execution of the project(max 600 characters).'
   909       'execution of the project(max 600 characters).')