Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Thu, 23 May 2013 20:20:54 UTC Commit: 8c435a9e0475fa2debaca9e3e1dd3b4c508a70e5 https://github.com/geany/www.geany.org/commit/8c435a9e0475fa2debaca9e3e1dd3b...
Log Message: ----------- Remember author name
Modified Paths: -------------- pastebin/forms.py
Modified: pastebin/forms.py 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -61,10 +61,7 @@ def __init__(self, request, *args, **kwargs): except KeyError: pass
- try: - self.fields['author'].initial = self.request.session['userprefs'].get('default_name', '') - except KeyError: - pass + self.fields['author'].initial = self.request.session.get('author', '')
#---------------------------------------------------------------------- def clean_content(self): @@ -94,6 +91,9 @@ def save(self, parent=None, *args, **kwargs): self.request.session['snippet_list'] = [] self.request.session['snippet_list'].append(self.instance.pk)
+ # Remember author + self.request.session['author'] = self.instance.author + return self.request, self.instance
########################################################################
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).