summaryrefslogtreecommitdiff
path: root/devel/views.py
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2009-08-11 13:55:33 -0600
committerDusty Phillips <buchuki@gmail.com>2009-08-11 13:55:33 -0600
commita085da1c22f7cc8ea245ec2fc018cd5eaadc3032 (patch)
tree81373aa95971a30e1957a8f5992ce5c8c2ae4816 /devel/views.py
parente1e81c6aab7cf9db46e22a9b4d811ef06d0d7151 (diff)
So now the created user passwords should work and Aaron will be less pissed off at me.
Diffstat (limited to 'devel/views.py')
-rw-r--r--devel/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/devel/views.py b/devel/views.py
index e405a251..4c34d9f5 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -85,7 +85,7 @@ class NewUserForm(forms.ModelForm):
def save(self):
profile = forms.ModelForm.save(self, False)
pw = ''.join([random.choice(pwletters) for i in xrange(8)])
- user = User.objects.create(username=self.cleaned_data['username'],
+ user = User.objects.create_user(username=self.cleaned_data['username'],
email=self.cleaned_data['email'], password=pw)
user.first_name = self.cleaned_data['first_name']
user.last_name = self.cleaned_data['last_name']
@@ -94,8 +94,8 @@ class NewUserForm(forms.ModelForm):
profile.save()
send_mail("Your new archweb account",
- """You can now log into:
-http://dev.archlinux.org/
+ """You can now log into:
+https://dev.archlinux.org/
with these login details:
Username: %s
Password: %s""" % (user.username, pw),
@@ -111,7 +111,7 @@ def new_user_form(request):
form = NewUserForm(request.POST)
if form.is_valid():
form.save()
- return HttpResponseRedirect('/admin/')
+ return HttpResponseRedirect('/admin/auth/user/%d/' %form.instance.user.id)
else:
form = NewUserForm()
return render_to_response('general_form.html', RequestContext(