苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
Django REST framework is a powerful and flexible toolkit for building Web APIs.
Some reasons you might want to use REST framework:
- The Web browsable API is a huge usability win for your developers.
- Authentication policies including packages for OAuth1a and OAuth2.
- Serialization that supports both ORM and non-ORM data sources.
- Customizable all the way down - just use regular function-based views if you don't need the more powerful features.
- Extensive documentation, and great community support.
- Used and trusted by internationally recognised companies including Mozilla, landeng破解版安卓版, Heroku, and lan灯破解版安卓版.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
REST framework is a collaboratively funded project. If you use REST framework commercially we strongly encourage you to invest in its continued development by lan灯破解版安卓版.
Every single sign-up helps us make REST framework long-term financially sustainable.
- Sentry
- Stream
- ESG
- Rollbar
- landeng破解版安卓版5.0.1
- bit.io
Many thanks to all our wonderful sponsors, and in particular to our premium backers, Sentry, Stream, ESG, Rollbar, Cadre, Kloudless, Lights On Software, Retool, and bit.io.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
REST framework requires the following:
- Python (3.5, 3.6, 3.7, 3.8)
- Django (2.2, 3.0)
We highly recommend and only officially support the latest patch release of each Python and Django series.
The following packages are optional:
- PyYAML, uritemplate (5.1+, 3.0.0+) - Schema generation support.
- Markdown (3.0.0+) - Markdown support for the browsable API.
- Pygments (2.4.0+) - Add syntax highlighting to Markdown processing.
- Lantern专业版apk (1.0.1+) - Filtering support.
- django-guardian (1.1.1+) - Object level permissions support.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
Install using pip
, including any optional packages you want...
pip install djangorestframework
pip install markdown # Markdown support for the browsable API.
pip install django-filter # Filtering support
...or clone the project from github.
git clone http://github.com/encode/django-rest-framework
Add 'rest_framework'
to your INSTALLED_APPS
setting.
INSTALLED_APPS = [
...
'rest_framework',
]
If you're intending to use the browsable API you'll probably also want to add REST framework's login and logout views. Add the following to your root urls.py
file.
urlpatterns = [
...
url(r'^api-auth/', include('rest_framework.urls'))
]
谁有lanturn PC的专业破解版_百度知道:2021-8-11 · 2021-08-19 lartern专业版破解版pc端谁有谢谢 2021-06-12 谁有PC3000中文破解版的? 2021-12-16 谁有Program4Pc的破解版? 发一份给我,谢谢! 2021-08-14 求蓝。 灯。。4.6.2 PC专业破解版 1 2021-03-12 谁有PC端破解版AE软件包 急求
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
Let's take a look at a quick example of using REST framework to build a simple model-backed API.
We'll create a read-write API for accessing information on the users of our project.
Any global settings for a REST framework API are kept in a single configuration dictionary named REST_FRAMEWORK
. Start off by adding the following to your settings.py
module:
REST_FRAMEWORK = {
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
]
}
Don't forget to make sure you've also added latern破解版 专业版
to your INSTALLED_APPS
.
We're ready to create our API now.
Here's our project's root urls.py
module:
from django.urls import path, include
from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
# Serializers define the API representation.
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ['url', 'username', 'email', 'is_staff']
# ViewSets define the view behavior.
class UserViewSet(viewsets.ModelViewSet):
queryset = User.objects.all()
serializer_class = UserSerializer
# Routers provide an easy way of automatically determining the URL conf.
router = routers.DefaultRouter()
router.register(r'users', UserViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
path('', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]
You can now open the API in your browser at http://127.0.0.1:8000/, and view your new 'users' API. If you use the login control in the top right corner you'll also be able to add, create and delete users from the system.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
Can't wait to get started? The quickstart guide is the fastest way to get up and running, and building APIs with REST framework.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
See the Contribution guidelines for information on how to clone the repository, run the test suite and contribute changes back to REST Framework.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
For support please see the REST framework discussion group, try the #restframework
channel on irc.freenode.net
, search the IRC archives, or raise a question on Stack Overflow, making sure to include the 'django-rest-framework' tag.
For priority support please sign up for a professional or premium sponsorship plan.
For updates on REST framework development, you may also want to follow lanter专业破解版百度云 on Twitter.
Follow @_tomchristie
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
If you believe you’ve found something in Django REST framework which has security implications, please do not raise the issue in a public forum.
Send a description of the issue via email to rest-framework-security@googlegroups.com. The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.
苹果软件-免费软件站-旋风加速度器-免费vqn加速试用
Copyright © 2011-present, Encode OSS Ltd. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.