Because the value you want is a string, you can cheat and do:

```
redirect_to = next or getattr(settings, 'LOGIN_REDIRECT_URL', '/')
```