Skip to content

hannawong/News-analysis-app

Repository files navigation

backend of xxswl

The backend was bootstrapped with django-admin startproject app.

Comments for project content

单元测试

测试入口:各文件夹中的 tests.py 推荐各功能模块自己实现测试模块,例:新建 funcAtests.py (pytest写法),在此目录的 tests.py 中import funcAtests。

示例 https://gitlab.secoder.net/example/monolithic-example/-/blob/master/meeting/tests.py

Comments for CI/CD

frame from: https://gitlab.secoder.net/example/monolithic-example

Structure

  • app Core settings for Django.
  • meeting Created by python manage.py startapp meeting.
  • manage.py settings for Django.

==the following files should remain unmodified==

  • pytest.ini Configuration for pytest.
  • requirements.txt Package manager with pip.
  • requirements_dev.txt Package manager with pip, including extra tools for development.
  • Dockerfile configure our docker image to run, ' EXPOSE 80 ' set the port we can use
  • .gitlab-ci.yml configure our CI/CD settings
  • sonar-project.properties configure sonar

Tools

  • python manage.py runserver Run this project in development mode.
  • python manage.py makemigrations Detect changes in data schema.
  • python manage.py migrate Apply migrations to current database.
  • pytest Test.
  • pylint --load-plugins=pylint_django app meeting Advanced PEP8 checking.

Usage [ I haven't tried yet ]

docker build -t something .
docker run --rm something

About

cooperate with ByteDance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages