app/projrev/views/login.py
changeset 17 5c1e26fa0fc4
parent 9 38727da8a948
child 18 05b9e60e6a10
equal deleted inserted replaced
16:bed14c9685a5 17:5c1e26fa0fc4
    53     confirm_pasword = request.POST['confirmpassword']
    53     confirm_pasword = request.POST['confirmpassword']
    54     if password == confirm_pasword:
    54     if password == confirm_pasword:
    55       try:
    55       try:
    56         user = User.objects.create_user(username, username, password)
    56         user = User.objects.create_user(username, username, password)
    57         user.save()
    57         user.save()
       
    58         subject = "[Sakshath] Registration at Saskshath portal"
       
    59         message = """Hi,
       
    60             We have received a request for registration of your
       
    61             email address, "%s", to the http://sakshath.ac.in mailing list.
       
    62             \n\n
       
    63             Your login credentials are:\n
       
    64               username: %s\n
       
    65               password: %s\n\n\n
       
    66             Regards,
       
    67               Saksath admin
       
    68             """ % (username, username, password)
       
    69 
       
    70         user.email_user(subject=subject, message=message)
    58         context = {
    71         context = {
    59             'created': True,
    72             'created': True,
    60             'username': username,
    73             'username': username,
    61             }
    74             }
    62       except IntegrityError:
    75       except IntegrityError: