Question: I'm working on an algorithm that makes a guess at K for kmeans clustering. I guess I'm looking for a data set that I could use as a comparison, or maybe a few data sets where the number of clusters is "known" so I could see how my algorithm is doing at guessing K.

Answer: 
Your issue is here:

```
user = User.objects.get(request.user)

```

Ideally, it would have been

```
user = User.objects.get(id=request.user.id)

```

You dont need a query to retrieve the user object here, since `request.user` evaluates to an instance of the logged in user object.

```
user = request.user
user.set_password(form.cleaned_data['password1'])
user.email = form.cleaned_data['email']
user.save()

```

Should work

Also, make sure you have the [`@login_required`](https://docs.djangoproject.com/en/1.2/topics/auth/#the-login-required-decorator) decorator to the `account_admin` method
You seem to have you answer from the above posts but I notice that you did not authenticate the user (you may have done it elsewhere that I don't know about). In case you want to do so, try the login\_reqired decorator <https://docs.djangoproject.com/en/1.5/topics/auth/default/#django.contrib.auth.decorators.login_required>