from Subscriptions.models import RegistrationForm, Student
from django import template
register = template.Library()

@register.filter
def getStudentPaymentMethod(pk):
    registerForm = RegistrationForm.objects.get(student=pk)
    return Student.PaymentMethod(int(registerForm.student.payment_method)).label

@register.filter
def getStudentLevel(pk):
    registerForm = RegistrationForm.objects.get(student=pk)
    return Student.StudentLevel(int(registerForm.student.level)).label

@register.filter
def getStudentGender(pk):
    registerForm = RegistrationForm.objects.get(student=pk)
    return Student.StudentGender(int(registerForm.student.gender)).label