Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #24788 - Allow Forms to specify a prefix at the class level #4707

Closed
wants to merge 1 commit into from

Conversation

pwmarcz
Copy link
Contributor

@pwmarcz pwmarcz commented May 24, 2015

@@ -1671,6 +1671,20 @@ def add_prefix(self, field_name):
self.assertEqual(p.cleaned_data['last_name'], 'Lennon')
self.assertEqual(p.cleaned_data['birthday'], datetime.date(1940, 10, 9))

# Prefix can be also specified at the class level.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def test_class_prefix(self):

@timgraham
Copy link
Member

Doc updates/release notes?

@pwmarcz
Copy link
Contributor Author

pwmarcz commented May 25, 2015

Done.

@@ -1065,3 +1065,15 @@ You can put several Django forms inside one ``<form>`` tag. To give each
>>> print(father.as_ul())
<li><label for="id_father-first_name">First name:</label> <input type="text" name="father-first_name" id="id_father-first_name" /></li>
<li><label for="id_father-last_name">Last name:</label> <input type="text" name="father-last_name" id="id_father-last_name" /></li>

The prefix can also be specified at the class level::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a versionchanged:: 1.9 annotation

@pwmarcz
Copy link
Contributor Author

pwmarcz commented May 25, 2015

You mean remove the example entirely?

How about now?

@timgraham
Copy link
Member

buildbot, test this please.

@timgraham
Copy link
Member

merged in 4df7e84, thanks!

@timgraham timgraham closed this May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants