擅长:python、mysql、java
<p>在<strong>版本3(最新)-<strong>请求中,数据已替换为<strong><a href="http://www.django-rest-framework.org/api-guide/requests/#data" rel="nofollow">request.dat</a>a</strong>:</p>
<pre><code>user = dict(
full_name=request.data['full_name'],
password=request.data['password'],
email=request.data['email']
)
</code></pre>
<hr/>
<p>在版本2中-它是<a href="http://tomchristie.github.io/rest-framework-2-docs/api-guide/requests#data" rel="nofollow">request.DATA</a>:</p>
<pre><code>user = dict(
full_name=request.DATA['full_name'],
password=request.DATA['password'],
email=request.DATA['email']
)
</code></pre>