Revision a048cd77
fixed issue with models for form validation. Allowed fields to be blank
that should be able to be blank.
crm/robocrm/models.py | ||
---|---|---|
7 | 7 |
type = models.CharField(max_length=20) |
8 | 8 |
id = models.CharField(max_length=10, primary_key=True) |
9 | 9 |
maint = models.BooleanField(default=False) |
10 |
dstart = models.DateTimeField() |
|
11 |
dend = models.DateTimeField() |
|
10 |
dstart = models.DateTimeField(blank=True)
|
|
11 |
dend = models.DateTimeField(blank=True)
|
|
12 | 12 |
|
13 | 13 |
def __unicode__(self): |
14 | 14 |
return u'%s %s' % (self.type, self.id) |
... | ... | |
19 | 19 |
user = models.OneToOneField(User) |
20 | 20 |
|
21 | 21 |
# Roboclub RFID Card number |
22 |
rfid = models.DecimalField(max_digits=10, decimal_places=0) |
|
22 |
rfid = models.DecimalField(max_digits=10, decimal_places=0, blank=True)
|
|
23 | 23 |
|
24 | 24 |
# Roboclub Shop Access Permissions |
25 | 25 |
machines = models.ManyToManyField(Machine) |
26 | 26 |
|
27 | 27 |
# Cell Phone |
28 |
cell = models.DecimalField(max_digits=10, decimal_places=0) |
|
28 |
cell = models.DecimalField(max_digits=10, decimal_places=0, blank=True)
|
|
29 | 29 |
|
30 | 30 |
# Class Level |
31 | 31 |
FRESHMAN = 'FR' |
... | ... | |
51 | 51 |
|
52 | 52 |
# Primary and Secondary Major/Minors |
53 | 53 |
major = models.CharField(max_length=20) |
54 |
sec_major_one = models.CharField(max_length=20) |
|
55 |
sec_major_two = models.CharField(max_length=20) |
|
54 |
sec_major_one = models.CharField(max_length=20, blank=True)
|
|
55 |
sec_major_two = models.CharField(max_length=20, blank=True)
|
|
56 | 56 |
|
57 | 57 |
#Club Rank |
58 | 58 |
JUNIOR_MEM = 'JM' |
... | ... | |
129 | 129 |
type = models.CharField(max_length=30) |
130 | 130 |
id = models.CharField(max_length=20, primary_key=True) |
131 | 131 |
checked_out = models.BooleanField(default=False) |
132 |
user = models.ForeignKey('RoboUser', related_name='u+') |
|
133 |
time_out = models.DateTimeField() |
|
134 |
time_due = models.DateTimeField() |
|
135 |
officer = models.ForeignKey('RoboUser', related_name='o+') |
|
132 |
user = models.ForeignKey('RoboUser', related_name='u+', blank=True)
|
|
133 |
time_out = models.DateTimeField(blank=True)
|
|
134 |
time_due = models.DateTimeField(blank=True)
|
|
135 |
officer = models.ForeignKey('RoboUser', related_name='o+', blank=True)
|
|
136 | 136 |
def __unicode__(self): |
137 | 137 |
return u'%s %s %s' (self.type, self.id, self.checked_out) |
138 | 138 |
|
Also available in: Unified diff