美文网首页
python101开发碎碎念-2

python101开发碎碎念-2

作者: 吕阳 | 来源:发表于2018-01-19 18:32 被阅读35次

前情提要

  • 这是我完全自己开发.
    思路是狗书blog整合bootstrap前端,外加moive_project
    目前已经磕磕绊绊做好了index和login.

register

  • 思路,views-forms-register.html
    1.思路一,完全用狗书,先把quick的表格放在前端的home里面.然后改forms里面的类.
  • 问题,提示我没找到wtf,解决就是导入{% import "bootstrap/wtf.html" as wtf %}
  • run-1


    微信截图_20180119101755.png

结果还是很不错的.

  • 想法: forms加入类看看.就RegistrationForm加入kv那个
    这样不行,显示不出来css.还是要分开自己改写

  • 以上全退到,按照login一点点写.foms,还有改造register.html
    gogogo

  • 注册也算可以了


    微信截图_20180119105510.png
  • 更改登录,


  • 一个棘手的问题出现了,就是密码错误的提示.
    还是沿着狗书flash提示,其中email错误是可以登录框自己提示的.登录密码错误是flash提示.
    home.html基类


{% block content %}
<div style="padding-top: 105.5px">

    {% for message in get_flashed_messages() %}
    <div style="margin-bottom: 0" class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message }}
    </div>
    {% endfor %}

    {% block page_content %}{% endblock %}
</div>
{% endblock %}

后台views给发flash前台就显示了.
其中很坑的事情是被nav挡住了,导致我看不见flash
成果如下:

11111111111.gif

邮箱错误提示,密码错误提示,logout提示,么么哒.

bbs页面-讨论组

然后今天我又做了,教程页面.

bbs页面.

用户页面

fff.gif

成果还是喜人的.

相关文章

网友评论

      本文标题:python101开发碎碎念-2

      本文链接:https://www.haomeiwen.com/subject/bhqooxtx.html