Created
May 3, 2014 11:51
-
-
Save ustun/8789956a9cb84cdda73b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: u = User(username="foo") | |
In [2]: u.save() | |
In [3]: from myapp.models import * | |
In [4]: my_form = StudentProfileForm({"name": "Foo", "website": "http://foo.com"}) | |
In [5]: my_form.is | |
my_form.is_bound my_form.is_multipart my_form.is_valid | |
In [5]: my_form.is_valid() | |
Out[5]: True | |
In [6]: my_instance = my_form.save(commit=False) | |
In [7]: my_instance.student = u | |
In [8]: my_instance.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment