Revision 049ebb6e crm/robocrm/models.py

View differences:

crm/robocrm/models.py
33 33
  AFFILIATE = 'AF'
34 34
  OTHER = 'OH'
35 35
  CLASS_LEVEL_CHOICES = (
36
	(UNDERGRAD, 'Undergraduate'),
37
	(GRADUATE, 'Graduate Student'),
38
	(AFFILIATE, 'Non-Student CMU Affiliate'),
39
	(OTHER, 'Other User'),
36
      (UNDERGRAD, 'Undergraduate'),
37
      (GRADUATE, 'Graduate Student'),
38
      (AFFILIATE, 'Non-Student CMU Affiliate'),
39
      (OTHER, 'Other User'),
40 40
  )
41 41
  class_level = models.CharField(max_length=2, 
42 42
                                 choices=CLASS_LEVEL_CHOICES,
......
90 90
  def __unicode__(self):
91 91
    return self.user.username
92 92

  
93
# needed for Django Auth model
94
def create_roboclub_user(sender, instance, created, **kwargs):
95
  if created:
96
      RoboUser.objects.create(user=instance)
97
post_save.connect(create_roboclub_user, sender=User)
98

  
99

  
100 93
# Event Model
101 94
class Event(models.Model):
102 95
  type = models.CharField(max_length=30)

Also available in: Unified diff