> from django.shortcuts import get_object_or_404
>
> get_object_or_404(User,username = request.user)
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to djang
If the user is marked as deleted and we want to do soft delete.What can we
do to have the username available again for use.
Can we just mask the deleted usernames with some random string so that the
actual username can be used?
On Sunday, June 24, 2012 10:36:02 AM UTC-4, Dhivya wrote:
>
> Hi,
>
Hi,
username field in django.contrib.auth.User model is unique.
Probably, the username you are trying to save already exists.
In your view, you might want to check,
try:
username = User.objects.get(username=form.cleaned_data['username'])
except ObjectDoesNotExist:
#create user new obje
3 matches
Mail list logo