Add associate membership model fields
This commit is contained in:
parent
664a31500f
commit
1e3ff7475a
@ -32,6 +32,10 @@
|
||||
<label class="three wide column">Member number</label>
|
||||
<div class="nine wide column">{{ member.id }}</div>
|
||||
</div>
|
||||
<div class="ui disabled inline grid field">
|
||||
<label class="three wide column">Membership type</label>
|
||||
<div class="nine wide column">{{ member.get_member_type_display() }}</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui required inline grid field">
|
||||
<label class="three wide column">Student ID</label>
|
||||
|
@ -42,6 +42,13 @@ class Member(models.Model):
|
||||
|
||||
phone = models.CharField(max_length=20)
|
||||
|
||||
MEMBER_TYPES = (
|
||||
(1, 'Ordinary Member'),
|
||||
(2, 'Associate Member'),
|
||||
(3, 'Honorary Life Member'),
|
||||
)
|
||||
member_type = models.IntegerField(choices=MEMBER_TYPES)
|
||||
|
||||
expires = models.DateField()
|
||||
|
||||
class Meta:
|
||||
|
@ -53,6 +53,7 @@ def by_email(email):
|
||||
member.year = {'Year A': 0, 'Year 1': 1, 'Year 2': 2, 'Year 3B': 3, 'Year 4C': 4, 'Year 5D': 5, 'BMedSci': 97, 'PhD': 98, 'Intermission': 99}[result[5]]
|
||||
member.is_msa = result[6]
|
||||
member.phone = result[7]
|
||||
member.member_type = 1 # Ordinary Member
|
||||
|
||||
# Calculate expiration date
|
||||
member.expires = timezone.now().date().replace(month=3, day=31)
|
||||
|
Loading…
Reference in New Issue
Block a user