On Jan 21, 2:35 pm, coded kid wrote:
> Thanks for the help bro.
>
> How can I make the form verify users name and password before login
> in. So that if the user wants to login in with wrong data, the form
> will tell the user to login in with the correct data. Any idea?
>
> Can this code be put
Thanks for the help bro.
How can I make the form verify users name and password before login
in. So that if the user wants to login in with wrong data, the form
will tell the user to login in with the correct data. Any idea?
Can this code be put in the views.py?
def get_user(self, user_id):
t
No problem. You will likely use the form objects in your template, I just
chose to create my own form in HTML.
Since the 'views.Login' is a string, you don't need to import it. It just
tells Django which view to pass the request to when that url pattern is
found. The ^ means the beginning of the u
Thanks bro. Don't you think I should import Login in urls.py? What
about / in before the $ in urls.py? Or I should just place it like
that?
Mark Furbee wrote:
> This is my login process.
>
> urls.py:
> url(r'^login$', 'views.Login'),
> url(r'^logout$', 'views.Logout'),
>
>
> views.py:
> def Login(
This is my login process.
urls.py:
url(r'^login$', 'views.Login'),
url(r'^logout$', 'views.Logout'),
views.py:
def Login(request, next=None):
"""
Used to log into the application.
"""
# If the user is authenticated pass them through to the homepage.
if request.user.is_a
Is that template mainpage.html?
I'm not sure exactly what you mean is happening. When you open the login
page it takes you back to the home page? Also, I would add in the my_login
view that if they are already logged in to redirect them to another page
besides the login page. As your view is now,
Yeah, I've done that, but its not working! Any help?
On Jan 17, 10:37 pm, Mark Furbee wrote:
> It means, don't use the "decorator" @login_required above your login view.
> Your login view cannot require a login, because you'd never get to log in.
> Chicken and egg.
>
>
>
> On Tue, Jan 17, 2012 at
It means, don't use the "decorator" @login_required above your login view.
Your login view cannot require a login, because you'd never get to log in.
Chicken and egg.
On Tue, Jan 17, 2012 at 2:34 PM, coded kid wrote:
>
>
> Thorsten Sanders wrote:
> > With using
> >
> > @login_required decorator
Thorsten Sanders wrote:
> With using
>
> @login_required decorator the user needs to be logged in to allow execution,
> don't makes much sense for a login :P
>
>
>
> Am 17.01.2012 22:23, schrieb coded kid:
> > Hi guys, I�m having problem with my login form. The login form will
> > redirect me
How do you mean by that?
Thorsten Sanders wrote:
> With using
>
> @login_required decorator the user needs to be logged in to allow execution,
> don't makes much sense for a login :P
>
>
>
> Am 17.01.2012 22:23, schrieb coded kid:
> > Hi guys, I�m having problem with my login form. The login form
With using
@login_required decorator the user needs to be logged in to allow execution,
don't makes much sense for a login :P
Am 17.01.2012 22:23, schrieb coded kid:
Hi guys, I’m having problem with my login form. The login form will
redirect me to the next page even if I didn’t input anythi
Hi guys, I’m having problem with my login form. The login form will
redirect me to the next page even if I didn’t input anything in the
username and password field. Also it can’t get the username of the
registered users to verify if the user data is wrong or right. How can
I get rid of this problem
12 matches
Mail list logo