pythonyeyu

pycharm使用bootstrap组件方法

ok,最近一直在用的编辑器是pycharm2019.1的 体验感还是就是那样

有个地方是pycharm将一些插件已经封装成第三方库了 这个bootstrop插件好像在新版找不到了

今天给大家带来使用方法

  1. 安装插件 pip install django-bootstrap3
  2. 在项目settings.py上的INSTALLED_APPS中加入 \'bootstrap3,\'
  3. 在模版中,加载bootstrap3库,用 bootstrap_*的标签,如下:

<!DOCTYPE html>

<html lang="zh-CN">

<head>

     <meta charset="utf-8">

     {% load bootstrap3 %}

     {% bootstrap_css %}

     {% bootstrap_javascript %}

     {% bootstrap_messages %}

<title>登陆</title>

</head>

#使用的时候会自动提示bootstrap3的相关组件

div+Tab键 然后class=  会自动提示

 

 

 

<body>

</body>

 

</html>

分类:

技术点:

相关文章:

  • 2021-04-15
  • 2022-12-23
  • 2021-09-10
  • 2021-10-14
  • 2021-11-13
  • 2021-11-05
  • 2022-02-01
  • 2021-11-02
猜你喜欢
  • 2021-11-23
  • 2021-12-06
  • 2022-01-26
  • 2021-12-13
  • 2022-01-21
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案