Skip to content
Browse files

Fix login redirect url.

  • Loading branch information...
1 parent aba0fe5 commit ae48420c30b53db78a92dbc589dcd9f13b40aabb @legnaleurc committed Apr 2, 2012
Showing with 6 additions and 3 deletions.
  1. +3 −0 galtrace/settings.py
  2. +3 −3 kernel/tests.py
View
3 galtrace/settings.py
@@ -109,3 +109,6 @@
EMAIL_PORT = PRIVATE_SETTINGS['EMAIL_PORT']
EMAIL_USE_TLS = PRIVATE_SETTINGS['EMAIL_USE_TLS']
SERVER_EMAIL = PRIVATE_SETTINGS['SERVER_EMAIL']
+
+# login settings
+LOGIN_URL = '/'
View
6 kernel/tests.py
@@ -35,7 +35,7 @@ def testWithoutUser( self ):
"""
c = Client()
response = c.post( self.loadUrl )
- self.assertEqual( response.status_code, 302 )
+ self.assertRedirects( response, '/?next={0}'.format( self.loadUrl ) )
def testEmptyArgs( self ):
"""
@@ -113,7 +113,7 @@ def testWithoutUser( self ):
"""
c = Client()
response = c.post( self.saveUrl )
- self.assertEqual( response.status_code, 302 )
+ self.assertRedirects( response, '/?next={0}'.format( self.saveUrl ) )
def testEmptyArgs( self ):
"""
@@ -243,7 +243,7 @@ def testWithoutUser( self ):
"""
c = Client()
response = c.post( self.deleteUrl )
- self.assertEqual( response.status_code, 302 )
+ self.assertRedirects( response, '/?next={0}'.format( self.deleteUrl ) )
def testEmptyArgs( self ):
"""

0 comments on commit ae48420

Please sign in to comment.
Something went wrong with that request. Please try again.