Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Signing in leads to /accounts/profile/ in Django

Tags:

django

I have created user profiles for the user and already added

AUTH_PROFILE_MODULE = 'app.ModelName'

But when the user successfully logs in, he/she are redirected to /accounts/profile/ by default.

How to change this? I would like them to go /profile/ and have created a view for them.

def Profile(request):
    '''
    profile view
    '''
    return render(request,'profile.html')
like image 833
lakshmen Avatar asked Aug 31 '12 16:08

lakshmen


1 Answers

Change the value of LOGIN_REDIRECT_URL in your settings.py.

like image 139
girasquid Avatar answered Oct 10 '22 02:10

girasquid