Changes between Version 2 and Version 3 of AjaxDojoLogin
- Timestamp:
- Jun 13, 2006, 2:17:08 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AjaxDojoLogin
v2 v3 1 1 == Adding an ajax login form to your project == 2 2 3 Assuming you have a project running and using the normal authentification scheme providen by django, it would be nice not to re aload the page to show errors about login and password when the login is wrong.3 Assuming you have a project running and using the normal authentification scheme providen by django, it would be nice not to reload the page to show errors about login and password when the login is wrong. 4 4 5 We need to add a specific method to your projectview.py lets call it '''loginajax'''.6 Simple wedo a copy / past from '''/django/contrib/auth/view.py''' method login.7 we just change the return answers.5 We need to add a specific method to your applications view.py lets call it '''loginajax'''. 6 We simply do a copy / past from '''/django/contrib/auth/view.py''' method login. 7 we just change the return values. 8 8 9 9 {{{ … … 37 37 We then need to add the dojo magic to our login page. 38 38 id = loginForm refer to our <form id="loginform" ..> 39 If you are confuse see [wiki:AjaxDojoFormSub], similar code is more detailed there.39 If you are confused see [wiki:AjaxDojoFormSub], similar code is more detailed there. 40 40 {{{ 41 41 var sendLoginButton;