vue-django 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
vue-django 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
vue-django 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT License
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
开源组织
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-11-17

软件简介

vue-django-webpack-boilerplate

@NdagiStanley has mirrored the fork to have this repo here. This starterpack has proved useful to many and I thank you for the emails I have received from all of you. The reasoning behind this mirror is that; this is an effort to support the users more by developing further on this project. From here on, I am calling on all potential collaborators by making it easier to make PRs and adding the utility of Issues in this 'new' repo (Of course with the same name 😀 ). Lastly, just so you know, I'll be keeping up with developments in the original.

Listed in
Awesome VueJS

A full-featured Webpack setup with hot-reload, lint-on-save, unit testing & css extraction integrated into a django application

Vue CLI Version Notice

If you are using vue-cli@1.x, it will be pulling the master branch of this template by default. If you are using vue-cli@2.x, it will be pulling the dist branch instead, which provides more configurable options thanks to new features in vue-cli@2.x. It is recommended to upgrade vue-cli as soon as you can.

VueJS Templates Documentation

Common topics are discussed in the docs. Make sure to read it!

Vue Django

Open Source Love GitHub Help Contribute to Open Source

Build Status

Coverage Status

https://vuedjango.herokuapp.com/ is a deployed instance of this boilerplate.

Vue-Django Docs offer a more comprehensive documentation.

Usage of VueDjango

This is a project template that includes VueJS and Django based on the vue-cli templates. It is recommended to use npm 3+ for a more efficient dependency tree.

$ npm install -g vue-cli

Set up

You might want to use sudo if you encounter permissions error

$ vue init NdagiStanley/vue-django my-project  # Follow the prompts
$ cd my-project
$ npm install

Develop

Run:

$ npm run dev

The app runs on localhost:8080

Update the files as you wish and the hot-reload will take effect. Add js and css files within the static folder in the root directory. Link them to the index.html in that same level (the root directory).

Run the Django server

Have Python installed and preferably use a virtual python environment for this.

Run:

$ python -m pip install -r requirements.txt
$ sh server.sh

(Run this command every time you make changes)

At localhost:8000 you should have a page exactly like the image below or as the deployed instance mentioned earlier: https://vuedjango.herokuapp.com/

Vue-Django

Docker

Ensure that docker is running.

If you use docker in your workflow, there is a Dockerfile in the root directory for you. Simply run

docker build -t [image-name] .

Use your preferred image name in place of the image-name in the command. Remember to enter the trailing period before running it.

There is a docker container for vue-django that you can run. Simply run the following command.

docker run -p 8000:8000 stanmd/vue-django

Then get to localhost:8000. You should have a page exactly like the image above

What's Included

  • npm run dev: first-in-class development experience.

    • Webpack + vue-loader for single file Vue components.
    • State preserving hot-reload
    • State preserving compilation error overlay
    • Lint-on-save with ESLint
    • Source maps
  • npm run build: Production ready build.

    • JavaScript minified with UglifyJS.
    • HTML minified with html-minifier.
    • CSS across all components extracted into a single file and minified with cssnano.
    • All static assets compiled with version hashes for efficient long-term caching, and a production index.html is auto-generated with proper URLs to these generated assets.
  • npm run unit: Unit tests run in PhantomJS with Karma + Mocha + karma-webpack.

    • Supports ES2015 in test files.
    • Supports all webpack loaders.
    • Easy mock injection.
  • npm run e2e: End-to-end tests with Nightwatch.

    • Run tests in multiple browsers in parallel.
    • Works with one command out of the box:
      • Selenium and chromedriver dependencies automatically handled.
      • Automatically spawns the Selenium server.

Contributions

NB: This repo has been forked from vue-webpack-boilerplate to help you start a Django application utilizing the awesomeness of VueJS and vue-cli

Feel free to contribute to this repo.

To create your own boilerplate, fork this repo or vue-webpack-boilerplate and use it with vue-cli:

vue init username/repo my-project

Backers

Backers on Open Collective

Thank you to all our backers!

展开阅读全文

代码

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
Django权限许可和访问控制问题漏洞
缺省权限不正确
Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。Python是Python软件基金会的一套开源的、面向对象的程序设计语言。该语言具有可扩展、支持模块和包、支持多种平台等特点。Django存在安全漏洞,该漏洞源于对目录的访问控制权限不足。攻击者可利用该漏洞以管理权限登录到设备上。
CVE-2020-24583 MPS-2020-12291
2022-08-08 20:45
Django 权限许可和访问控制问题漏洞
缺省权限不正确
Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。Python是Python软件基金会的一套开源的、面向对象的程序设计语言。该语言具有可扩展、支持模块和包、支持多种平台等特点。 Django 2.2 至2.2.16, 3.0至3.0.10和3.1至3.1.1版本中存在安全漏洞,该漏洞源于对目录的访问控制权限不足。
CVE-2020-24584 MPS-2020-12292
2022-08-08 20:45
Django信任管理问题漏洞
证书验证不恰当
Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 2.2.13之前的2.2版本和33.0.7之前的3.0版本中存在信任管理问题漏洞。攻击者可利用该漏洞获取敏感信息。
CVE-2020-13254 MPS-2020-8071
2022-08-08 20:45
Django跨站脚本漏洞
XSS
Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 2.2.13之前的2.2版本和33.0.7之前的3.0版本中存在跨站脚本漏洞。该漏洞源于WEB应用缺少对客户端数据的正确验证。攻击者可利用该漏洞执行客户端代码。
CVE-2020-13596 MPS-2020-8072
2022-08-08 20:45
Django 跨站脚本漏洞
XSS
Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 django 存在跨站脚本漏洞,该漏洞源于在Python 3.9.5+上,URLValidator没有禁止换行符和制表符,如果在HTTP响应中使用这些会导致报头注入攻击。
CVE-2021-32052 MPS-2021-6630
2022-08-08 20:45
urllib3 资源管理错误漏洞
拒绝服务
urllib3是一款Python HTTP库。该产品具有线程安全连接池、文件发布支持等。 Urllib3 存在资源管理错误漏洞,该漏洞源于在鉴权模块的URL中添加@参数导致,攻击者可利用该漏洞引起资源冲突导致拒绝服务。以下产品及型号会受到影响:Urllib3 0.3, 0.3.1, 0.4, 0.4.1, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.4, 1.5, 1.6, 1.7, 1.7.1, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.9, 1.9.1, 1.10, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.11, 1.12, 1.13, 1.13.1, 1.14, 1.15, 1.15.1, 1.16, 1.17, 1.18, 1.18.1, 1.19, 1.19.1, 1.20, 1.21, 1.21.1, 1.22, 1.23, 1.24, 1.24.1, 1.24.2, 1.24.3, 1.25, 1.25.1, 1.25.2, 1.25.3, 1.25.4, 1.25.5, 1.25.6, 1.25.7, 1.25.8, 1.25.9, 1.25.10, 1.25.11, 1.26.0, 1.26.1, 1.26.2, 1.26.3, 1.26.4。
CVE-2021-33503 MPS-2021-9054
2022-08-08 20:45
Django SQL 注入漏洞
SQL注入
Django 是一个 Python Web 框架。 传递给QuerySet.annotate()、aggregate()和extra()方法的**kwargs参数,没有经过安全过滤,可导致这些方法受到列别名的SQL注入攻击。 攻击者可利用该漏洞进行 SQL 注入攻击。
CVE-2022-28346 MPS-2022-7490
2022-08-08 20:45
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
0 评论
0 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部