yes I got it working. I override the User fields inside contrib.auth.models and also override UserManager in which I removed username as one of the necessary argument while calling 'create_user' method. Now I have call like this
CustomUser.objects.create_user(# check for cleaned email, # check for cleaned pasword) This only logs in with email and password. I had ovveride certain other tags in templates too. Thanks for the reply. Dhruv Adhia http://thirdimension.com On Sat, Aug 15, 2009 at 6:12 AM, Léon Dignòn <leon.dig...@gmail.com> wrote: > > Sorry, I assumed you used django-registration. But the idea is the > same until you did not set up an own user model. :) > > On Aug 15, 3:11 pm, Léon Dignòn <leon.dig...@gmail.com> wrote: > > django-registration uses the django.contrib.auth module which includes > > the models.User model. in this model it is necessary to supply a > > username, but not an e-mail address. > > > > I assume you want to authenticate users via the e-mail address, then > > you'd simply copy the e-mail address into the username field until a > > user decides to use another username. > > > > Léon > > > > On Aug 12, 11:59 pm, Dhruv Adhia <druf...@gmail.com> wrote: > > > > > > > > > Hello, > > > > > I have a registration system working and most of the code is pulled > > > out from django code base. I would like to make username optional. Is > > > there any shorter way? > > > > > Thanks > > > Dhruv- Hide quoted text - > > > > - Show quoted text - > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---