登録フォームにrecaptchaフィールドを追加して、Marcosガイドに従いました。
http://www.marcofucci.com/tumblelog/26/jul/2009/integrating-recaptcha-with-django/
登録アプリには、次のようなファイル「forms.py」があります。
from recaptcha import fields as captcha_field
from registration.forms import RegistrationFormUniqueEmail
class RecaptchaRegistrationForm(RegistrationFormUniqueEmail):
recaptcha = captcha_field.ReCaptchaField()
そして、私のソリューション全体のurls.pyによって/accountsの下に含まれるurls.py:
from django.conf.urls.defaults import *
from registration.views import register
from forms import RecaptchaRegistrationForm
urlpatterns = patterns('users.views',
(r'^$', 'profile'),
url(r'^register/$', register, {'form_class': RecaptchaRegistrationForm}, name='registration_register'),
)
ここで、/ accounts / register /に移動すると、次のエラーメッセージが表示されます。
例外値:register()は少なくとも2つの非キーワード引数を取ります(1つ指定)
理由はわかりません。