mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 15:37:17 +02:00
Updated HTML docs
This commit is contained in:
parent
86fb09d6bf
commit
86c930be7a
1221 changed files with 76528 additions and 29095 deletions
|
|
@ -30,6 +30,7 @@
|
|||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">evennia.web.api.urls</a></li>
|
||||
</ul>
|
||||
<div class="develop">develop branch</div>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
|
|
@ -37,8 +38,22 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="evennia-web-api-urls">
|
||||
<h1>evennia.web.api.urls<a class="headerlink" href="#evennia-web-api-urls" title="Permalink to this headline">¶</a></h1>
|
||||
<section id="module-evennia.web.api.urls">
|
||||
<span id="evennia-web-api-urls"></span><h1>evennia.web.api.urls<a class="headerlink" href="#module-evennia.web.api.urls" title="Permalink to this headline">¶</a></h1>
|
||||
<p>The Django Rest Framework provides a way of generating urls for different
|
||||
views that implement standard CRUD operations in a quick way, using ‘routers’
|
||||
and ‘viewsets’. A viewset implements standard CRUD actions and any custom actions
|
||||
that you want, and then a router will automatically generate URLs based on the
|
||||
actions that it detects for a viewset. For example, below we create a DefaultRouter.
|
||||
We then register ObjectDBViewSet, a viewset for CRUD operations for ObjectDB
|
||||
instances, to the ‘objects’ base endpoint. That will generate a number of URLs
|
||||
like the following:</p>
|
||||
<p>list objects: action: GET, url: /objects/, view name: object-list
|
||||
create object: action: POST, url: /objects/, view name: object-list
|
||||
retrieve object: action: GET, url: /objects/<:pk>, view name: object-detail
|
||||
update object: action: POST, url: /objects/<:pk>, view name: object-detail
|
||||
delete object: action: DELETE, url: /objects/<:pk>, view name: object-detail
|
||||
set attribute: action: POST, url: /objects/<:pk>/set-attribute, view name: object-set-attribute</p>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
@ -84,7 +99,6 @@
|
|||
<li><a href="../../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
|
|
@ -101,6 +115,7 @@
|
|||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">evennia.web.api.urls</a></li>
|
||||
</ul>
|
||||
<div class="develop">develop branch</div>
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2020, The Evennia developer community.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue