mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-18 04:09:29 +00:00
Added Primary Character field
This commit is contained in:
@@ -124,3 +124,13 @@ class EmailChangeForm(forms.Form):
|
||||
raise forms.ValidationError("The two e-mail fields didn't match.")
|
||||
return email2
|
||||
|
||||
|
||||
def CreatePrimaryCharacterForm(user):
|
||||
""" Generate a Primary Character form populated with the user's characters """
|
||||
|
||||
chars = EVEPlayerCharacter.objects.filter(eveaccount__user=user)
|
||||
|
||||
class PrimaryCharacter(forms.Form):
|
||||
character = forms.ModelChoiceField(queryset=chars, required=True, empty_label=None)
|
||||
|
||||
return PrimaryCharacter
|
||||
|
||||
Reference in New Issue
Block a user