From a085da1c22f7cc8ea245ec2fc018cd5eaadc3032 Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Tue, 11 Aug 2009 13:55:33 -0600 Subject: So now the created user passwords should work and Aaron will be less pissed off at me. --- devel/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'devel') 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 Meta: 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 @@ def save(self): 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( -- cgit v1.2.3-54-g00ecf