擅长:python、mysql、java
<pre><code>p = Person.objects.create(first_name="Bruce", last_name="Springsteen")
</code></pre>
<p><strong>相当于:</strong></p>
<pre><code>p = Person(first_name="Bruce", last_name="Springsteen")
p.save(force_insert=True)
</code></pre>
<blockquote>
<p>The force_insert means that a new object will always be created.<br/>
Normally you won’t need to worry about this. However, if your model
contains a manual primary key value that you set and if that value
already exists in the database, a call to create() will fail with an
IntegrityError since primary keys must be unique. Be prepared to
handle the exception if you are using manual primary keys.</p>
</blockquote>