Tag:django-rest-framework

  • Using Django, Vue to build the project

    Time:2020-3-23

    Written in front In order to solve the problem of lack of back-end staff and lack of recruitment, we decided to write the project in a way of front-end and back-end separation, so we tried to usedjango-rest-frameworkFollowVue.jsBuild a project. Refer to the following tutorial for the basic construction project. Use Django + vue.js to quickly […]

  • Django rest framework serialization relationship model

    Time:2020-3-20

    In the past two days, I have been learning Django rest framework, which is a very popular rest API framework, integrating Django in depth. But different from the traditional MVC pattern, Django rest framework needs to understand some new things in the process of using. Share the understanding of the serialization relationship model in the […]

  • A dream about Django rest framework

    Time:2020-3-19

    Django rest framework is a framework with few related materials. It is difficult to solve problems encountered. Even sleeping is thinking about solving problems. Recently, I have been troubled by a problem about Django rest framework. When using view set, sometimes the read and write of serialized model are not exactly the same. How to […]

  • DRF | I write interface business process

    Time:2020-3-17

    in usedjango-restful-frameworkIn the business of writing back-end interface, the following general practices are used; Front end data – > detection (including current restriction, authentication, permission verification, data detection) —- persistence For current restriction and permission verification, you can define classes to solve the requirements, and the focus is still on data detection. Based on the […]

  • Some methods of website optimization

    Time:2020-3-9

    Written in front At the beginning of the year, the first version of the website project developed by Django has been launched. Because the demand changes too much, we want to push the reconstruction early and then optimize according to the way of separating the front and back ends, but the time is not allowed, […]

  • Django rest framework Chinese tutorial 1: serialization

    Time:2020-3-3

    It is suggested to go directly to http://www.chenxm.cc/post/289… This website is followed by this article Building environment Before we do anything, we will use virtualenv to create a new virtual environment. This will ensure that our package configuration is well segregated from any other projects we are working on. virtualenv envsource env/bin/activate Now we are […]

  • Django rest framework Chinese tutorial 2: request and response

    Time:2020-2-20

    From this point on, we will really start to cover the core of the rest framework. Let’s introduce a few basic building blocks. Request objectRest framework introduces request to extend the normal object httprequest, and provides more flexible request resolution. The core function of the request object is the request.data attribute, which is similar to […]

  • Django rest framework Chinese tutorial 3: class based view

    Time:2020-2-19

    We can also use class based view to write our API view instead of function based view. We’ll see that this is a powerful pattern that allows us to reuse common features and helps us keep the code dry. Rewrite our API with class based viewsWe will first rewrite the root view to a class […]

  • Django rest framework Chinese Tutorial 4: authentication and permissions

    Time:2020-2-18

    Currently, our API has no restrictions on who can edit or delete code snippets. We want some more advanced behavior to ensure that: Snippets are always associated with the creator. Only authenticated users can create clips. Only the creator of the clip can update or delete it. Unauthenticated requests should have full read-only access. Add […]

  • Django rest framework Chinese tutorial 5: relationship and hyperlink API

    Time:2020-2-12

    At present, the relationship in our API is represented by using the primary key. In this part of the tutorial, we’ll improve the cohesion and discoverability of the API rather than using hyperlinks for relationships. Create an endpoint for the root of our APINow we have endpoints for ‘snippets’ and’ users’, but our API doesn’t […]

  • Using Django to build a full stack project of front and back end separation under Ubuntu

    Time:2020-2-1

    README Ubuntu16.04;Python3.6.2;Django1.11;Pycharm (Ubuntu) is used as the development tool; For other details, please refer to GitHub (https://github.com/pythonyang…); 2017-12-08: update to message board The first step is to build Django project in Linux Environment //At first, we will use static files for loading. As the project goes on, we will gradually show the practice of front […]

  • A Handy Guide for Newbie of Overriding rest-auth Serializers

    Time:2020-1-28

    Tucao SegmentFault I was going to write “a handy guide for newbie of overriding Django allauth forms and Django rest auth serializers”.. But because SF only allows 64 valid characters at most, I can only write separately.. Even so, the full name of Django rest auth is not enough.. Configurations The documentation for django-rest-auth is […]