18

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')
lakshmen
  • 28,346
  • 66
  • 178
  • 276
  • 1
    Just for the records. settings.AUTH_PROFILE_MODULE was removed in Django1.7 https://docs.djangoproject.com/en/1.8/releases/1.7/#features-removed-in-1-7 – guettli Sep 28 '15 at 14:33

1 Answers1

26

Change the value of LOGIN_REDIRECT_URL in your settings.py.

girasquid
  • 15,121
  • 2
  • 48
  • 58