Django "Pinax" magick ... unexplained form behavior

This legacy Django website uses "Pinax" for notification. I know for certain that the following "Signup" template is being used:

            {{ form.captcha.label }}
            {{ form.captcha }} {{ form.captcha.errors }}
            <br/>
            {{ form.email.label }}
            {{ form.email }} {{ form.email.errors }}
            <br/>
            {{ form.email2.label }}
            {{ form.email2 }} {{ form.email2.errors }}

But here are my two problems. First of all, my "captcha" field is not appearing in the output. Second of all, I find no justification for the existence of "email2!"

The "form" definition consists, in relevant part:

    email = forms.EmailField(widget=forms.TextInput())
    confirmation_key = forms.CharField(
        max_length = 40,
        required = False,
        widget = forms.HiddenInput()
    )
    
    # "Solve a math problem" challenge
    captcha = CaptchaField(
        label = "Solve A Simple Math Problem",
        widget = forms.TextInput()
    )

Notice that there is no "email-two." Yet, it appears with the label, "Email (again)." And, my "captcha" field does not appear in the template at all.

I do not understand this "Django magick." I have searched the source code diligently for the phrase, "(again)." And I find no reference to it with regards to "email."

(I have already, for other reasons, brought "pinax" directly into my project, because it appears to have been abandoned.)

I am going to close this question, "not fully answered." I now see in the source-code references to now-outdated Django constructs such as render_to_response(). It is going to take some time to figure out exactly what this code is actually doing. Clearly, in its time, this package had quite a lot of "magick." (But, so far as I can now see, it has been abandoned.)

Вернуться на верх