上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页
摘要: BBS论坛(二十一) 21.1.编辑轮播图功能完成 (1)cms_banners.html 把属性绑定到<tr>上面,方便找到各属性的值 <tbody> {% for banner in banners %} <tr data-name="{{ banner.name }}" data-id="{{ 阅读全文
posted @ 2018-11-26 16:28 王竹笙 阅读(196) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(二十) 20.1.cms添加轮播图后台逻辑代码完成 (1)apps/models.py from exts import db from datetime import datetime class BannerModel(db.Model): __tablename__ = 'bann 阅读全文
posted @ 2018-11-26 16:26 王竹笙 阅读(156) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十八) 18.首页轮播图实现 (1)front/css/front_base.css .main-container{ width: 990px; margin: 0 auto; overflow: hidden; } .lg-container{ width: 730px; float 阅读全文
posted @ 2018-11-26 16:24 王竹笙 阅读(217) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十七) 17.首页导航条实现和代码抽离 (1)temlates/common/_head.html <meta name="csrf-token" content="{{ csrf_token() }}"> <script src="http://cdn.bootcss.com/jque 阅读全文
posted @ 2018-11-26 16:23 王竹笙 阅读(196) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十六) 16.登录功能完成 (1)front/forms.py class SigninForm(BaseForm): telephone = StringField(validators=[Regexp(r'1[3578]\d{9}', message='请输入正确格式的手机号码')] 阅读全文
posted @ 2018-11-26 16:21 王竹笙 阅读(200) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十五) 15.1.登录界面完成 (1)front/signbase.html {% from 'common/_macros.html' import static %} <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF 阅读全文
posted @ 2018-11-26 16:20 王竹笙 阅读(285) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十四) 14.1注册完成跳到上一个页面 (1)front/form.py # front/forms.py __author__ = 'derek' from ..forms import BaseForm from wtforms import StringField from wtf 阅读全文
posted @ 2018-11-26 16:19 王竹笙 阅读(162) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十三) 13.1点击更换图形验证码 (1)front/signup.html <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" name="graph_ca 阅读全文
posted @ 2018-11-26 16:18 王竹笙 阅读(274) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十二) 12.1.图形验证码生成 (1)utils/captcha/init.py import random import string # Image:一个画布 # ImageDraw:一个画笔 # ImageFont:画笔的字体 from PIL import Image,Imag 阅读全文
posted @ 2018-11-26 16:16 王竹笙 阅读(202) 评论(0) 推荐(0) 编辑
摘要: BBS论坛(十) 10.1.客户端权限验证功能完成 (1)cms/cms_profile 显示当前用户的角色和权限 <tr> <td>角色:</td> <td> {% for role in user.roles %} {{ role.name }} {% if not loop.last %},{ 阅读全文
posted @ 2018-11-26 16:11 王竹笙 阅读(268) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页