#NEWLINE# def authenticate( self , username = None , password = None ) : #NEWLINE# #INDENT# login_valid = ( settings . ADMIN_LOGIN == username ) #NEWLINE# pwd_valid = ( settings . ADMIN_PASSWORD == password ) #NEWLINE# if ( login_valid and pwd_valid ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# user = User . objects . get ( username = username ) #NEWLINE# #UNINDENT# except User . DoesNotExist : #NEWLINE# #INDENT# user = User ( username = username , password = password ) #NEWLINE# user . is_staff = True #NEWLINE# user . is_superuser = True #NEWLINE# user . save ( ) #NEWLINE# #UNINDENT# return user #NEWLINE# #UNINDENT# return None