Skip to content

Fix the singleton issue ASAP #7

@pydanny

Description

@pydanny

All your TR fields on the form class are singletons. This is a dangerous security risk. Please correct this and fix it in your documentation. I will try and submit a pull request but I'm swamped with work and advocacy.

The answer is to define your fields in methods or properties. For example:

class BrainTreeForm(forms.Form):

@property  
def tr_fields = OrderedDict([
    ("transaction", OrderedDict([
        ("amount", None),
        ("customer", OrderedDict([
            ("first_name", None),
            ("last_name", None),
            ("company", None),
            ("email", None),
            ("phone", None),
            ("fax", None),
            ("website", None)]),
        ),
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions