Code Monkey home page Code Monkey logo

ahgz_lbms's Introduction

APP开发流程

1、在控制台进入虚拟环境,然后进入当前项目路径下 2、利用命令创建APP:python manage.py startapp XXX_app 3、在setting.py文件中INSTALLED_APPS中注册添加的APP 4、model层的编写,参照test_app模块中的models.py 5、serializer层的编写,参照test_app模块中的serializer.py 6、core层的编写,参照test_app模块中的core.py 7、view层的编写,参照test_app模块中的view.py 8、url层的编写,参照test_app模块中的urls.py 9、同步数据库操作      |---- python manage.py makemigrations app_name      |      |---- python manage.py migrate app_name      |      |---- 如果上述命令后面不加app_name,则默认同步全部数据库 10、利用RestClient测试开发的模块 11、提交代码

开发规范

命名规范

1、view层命名规范:XyzView(eg:UserView) 2、core层命名规范:小写横杠连接(eg:get_user_by_id) 3、model层命名规范:以对象的英文单词命名,如有多词采用拼接(eg: User、Role、UserRoleMapping) 4、app的命名统一加上后缀“_app”:user_app、common_app、privilege_app

ahgz_lbms's People

Contributors

xbwangh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.