-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added feature that lets logged-in users edit the information on their…
… own profile page. This partly resolves issue #194, if not completely.
- Loading branch information
1 parent
7cf770f
commit f859776
Showing
6 changed files
with
182 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
from members.models import Member | ||
from members.forms import BSModelForm | ||
from members.validators import CommonValidators | ||
from ldap import LDAPError | ||
|
||
class EditProfileForm(BSModelForm, CommonValidators): | ||
class Meta: | ||
model = Member | ||
fields = ['phone', 'email', 'street_address', 'postal_code', 'city', 'country', 'subscribed_to_modulen', 'allow_studentbladet', 'allow_publish_info'] | ||
|
||
def clean(self): | ||
BSModelForm.clean(self) | ||
CommonValidators.clean(self) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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