~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlggz/forms.py

  • Committer: franku
  • Author(s): GunChleoc
  • Date: 2016-12-13 18:30:38 UTC
  • mfrom: (438.1.6 pyformat_util)
  • Revision ID: somal@arcor.de-20161213183038-5cgmvfh2fkgmoc1s
adding a script to run pyformat over the code base

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
import hashlib
14
14
import base64
15
15
 
 
16
 
16
17
class EditGGZForm(forms.ModelForm):
17
 
    password = forms.CharField(label=_(u'Online Gaming Password'), widget = forms.PasswordInput(render_value = False), required=True)
 
18
    password = forms.CharField(label=_(u'Online Gaming Password'),
 
19
                               widget=forms.PasswordInput(render_value=False), required=True)
18
20
 
19
21
    class Meta:
20
22
        model = GGZAuth
21
 
        fields = [ 'password', ]
 
23
        fields = ['password', ]
22
24
 
23
25
    def __init__(self, *args, **kwargs):
24
 
        instance = kwargs.pop("instance")
 
26
        instance = kwargs.pop('instance')
25
27
 
26
 
        super(EditGGZForm, self).__init__(instance=instance, *args,**kwargs)
 
28
        super(EditGGZForm, self).__init__(instance=instance, *args, **kwargs)
27
29
 
28
30
    def clean_password(self):
29
31
        pw = self.cleaned_data['password']