django-registration-redux でユーザー登録までやってみる

django-registration-redux でユーザー登録までやってみる

前回までの記事でdjango-registration-reduxの画面を映すまで設定をしてみました。今度は実際に登録する所をやってみたいと思います。

参考:公式

site.domainを解決する

http://localhost:8000/accounts/register/にアクセスすると下の画面が映るので入力してSubmitボタンを押してみます。

下記の内容のメールがターミナルに届くので確認してみます。ドメインがexample.comになってしまってますね。これでは django があるローカルホストにアクセスできません。

You (or someone pretending to be you) have asked to register an account at example.com. If this wasn't you, please ignore this email and your address will be removed from our records.

To activate this account, please click the following link within the next 3 days:

example.com/accounts/activate/00d8087f053e0748afa3e(はみ出ちゃうので以下略).../

Sincerely, example.com Management

django_siteと言うテーブルに domain と name というカラムがあるのでこれをlocalhost:8000django-registration-redux(こっちは何でもよいでしょうが...)に変えてみます。

もう一度アカウントを登録してメールを確認してみます。

You (or someone pretending to be you) have asked to register an account at django-registration-redux. If this wasn't you, please ignore this email and your address will be removed from our records.

To activate this account, please click the following link within the next 3 days:

localhost:8000/accounts/activate/32ad325540f07b9a655cd(はみ出ちゃうので以下略).../

Sincerely, django-registration-redux Management

無事にlocalhost:8000になりました。
それではこのリンクをクリックしてみます。

登録が完了したみたいですね。

YouTube