This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSTRUMENTS = [ | |
| 'Acoustic Grand Piano', | |
| 'Bright Acoustic Piano', | |
| 'Electric Grand Piano', | |
| 'Honky-tonk Piano', | |
| 'Electric Piano 1', | |
| 'Electric Piano 2', | |
| 'Harpsichord', | |
| 'Clavi', | |
| 'Celesta', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django import forms | |
| from django.utils.translation import ugettext_lazy as _ | |
| from django.contrib.auth import forms as auth_forms, authenticate, get_user_model | |
| from django.utils.text import capfirst | |
| UserModel = get_user_model() | |
| class DynamicAuthenticationForm(auth_forms.AuthenticationForm): | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def create_user(request): | |
| redirect_to = request.POST.get(REDIRECT_FIELD_NAME, | |
| request.GET.get(REDIRECT_FIELD_NAME, urlresolvers.reverse(user_panel))) | |
| group = get_object_or_404(GroupDomain, domain=request.META['HTTP_HOST']).group | |
| verification_methods = group.groupdomain.verification_method | |
| ctx_forms = {'grade': forms.GradeForm} | |
| # Get the appropriate forms based on the domain settings | |
| if GroupDomain.USERNAME in verification_methods: |
NewerOlder