diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..7b3ae37 Binary files /dev/null and b/.DS_Store differ diff --git a/DSTBundesliga/apps/dstffbl/forms.py b/DSTBundesliga/apps/dstffbl/forms.py index 38ad830..40db07c 100644 --- a/DSTBundesliga/apps/dstffbl/forms.py +++ b/DSTBundesliga/apps/dstffbl/forms.py @@ -22,3 +22,23 @@ def clean_sleeper_username(self): message=_('Dein Sleeper Benutzername scheint falsch zu sein - bitte gib deinen aktuellen Benutzernamen an!')) return sleeper_id + + +class ProfileForm(forms.Form): + sleeper_username = forms.CharField(max_length=100) + region = forms.ChoiceField(choices=REGIONS) + email = forms.EmailField() + possible_commish = forms.BooleanField(required=False) + + def clean_sleeper_username(self): + data = self.cleaned_data + sleeper_username = data.get('sleeper_username') + + try: + sleeper_user = sleeper_wrapper.User(sleeper_username) + sleeper_id = sleeper_user.get_user_id() + except TypeError: + raise forms.ValidationError( + message=_('Dein Sleeper Benutzername scheint falsch zu sein - bitte gib deinen aktuellen Benutzernamen an!')) + + return sleeper_id diff --git a/DSTBundesliga/apps/dstffbl/models.py b/DSTBundesliga/apps/dstffbl/models.py index aa4e9a8..c6092bc 100644 --- a/DSTBundesliga/apps/dstffbl/models.py +++ b/DSTBundesliga/apps/dstffbl/models.py @@ -155,7 +155,7 @@ def get_email_subject(self): return self.EMAIL_SUBJECT.format(current_season=Season.get_active()) def get_confirm_link(self): - return "https://dstffbl.uber.space" + reverse('dstffbl:accept_invite', kwargs={"registration_id": self.id}) + return "https://www.fantasybundesliga.de" + reverse('dstffbl:accept_invite', kwargs={"registration_id": self.id}) def get_email_text(self): return self.EMAIL_TEXT.format(current_season=state_service.get_season(), diff --git a/DSTBundesliga/apps/dstffbl/templates/dstffbl/profile.html b/DSTBundesliga/apps/dstffbl/templates/dstffbl/profile.html index 968bc88..21ff293 100644 --- a/DSTBundesliga/apps/dstffbl/templates/dstffbl/profile.html +++ b/DSTBundesliga/apps/dstffbl/templates/dstffbl/profile.html @@ -5,76 +5,116 @@
Weitere Infos folgen bald.
-