fix unicode issues with piwik
[wolnelektury.git] / src / wolnelektury / forms.py
1 # -*- coding: utf-8 -*-
2 from django.contrib.auth.forms import UserCreationForm
3 from django.contrib.auth.models import User
4
5 from newsletter.forms import NewsletterForm
6
7
8 # has to be this order, because otherwise the form is lacking fields
9 class RegistrationForm(UserCreationForm, NewsletterForm):
10     class Meta:
11         model = User
12         fields = ('username', 'email')
13
14     def save(self, commit=True):
15         super(RegistrationForm, self).save(commit=commit)
16         NewsletterForm.save(self)