設定.py
AUTH_USER_MODEL = "app_registration.MyUser"
AUTH_PROFILE_MODULE = 'app_registration.MyUserProfile'
models.py
class MyUserProfile(models.Model):
user = models.ForeignKey(MyUser, unique=True)
...
MyUser.profile = property(lambda u: MyUserProfile.objects.get_or_create(user=u)[0])
login.html
<form id="login_form" method="post" action=".">
....
<input type="hidden" name="next" value="" />
<input type="submit" value="LogIn" />
</form>
したがって、これを行って、カスタム MyUser モデルの MyUserProfile モデルを作成しました。htp://localhost:9999/accounts/profile
ログイン(localhost/accounts/login)すると、フォームの隠し入力で指定したように、インデックスページの代わりにURLがリダイレクトされることを除いて、すべて正常に動作します。
このリダイレクト URL はどこで定義されていますか..??