http://blog.dato.com/how-to-evaluate-machine-learning-models-part-1-orientationhttp://blog.dato.com/how-to-evaluate-machine-learning-models-part-2a-cl...
分类:
系统相关 时间:
2015-05-28 08:14:17
阅读次数:
231
1. 评论在数据库中的表示app/models.py: Comment 模型class Comment(db.Model): __tablename__ = 'comments' id = db.Column(db.Integer, primary_key=True) body =...
分类:
其他好文 时间:
2015-05-28 00:15:26
阅读次数:
305
1. 提交和显示博客文章app/models.py: 博客文章模型class Post(db.Model): __tablename__ = 'posts' id = db.Column(db.Integer, primary_key=True) body = db.Column(...
分类:
其他好文 时间:
2015-05-27 00:36:55
阅读次数:
612
1. 数据库中添加用户信息app/models.py: 添加用户资料列class User(UserMixin, db.Model): #... name = db.Column(db.String(64)) location = db.Column(db.String(64)) ...
分类:
其他好文 时间:
2015-05-24 18:40:36
阅读次数:
1533
介绍的用户角色实现方式结合了分立的角色和权限: 即赋予用户分立的角色,但角色使用权限定义。1. 角色在数据库中的表示采用如下的权限上述权限采用如下代码表示app/models.py:权限常量class Permission: FOLLOW = 0x01 COMMENT = 0x02 ...
分类:
其他好文 时间:
2015-05-24 17:01:16
阅读次数:
829
前面两篇写了有关Form与Form的验证,今天我们来写些ModelForm,因为现在的web开发都基与db驱动的,所以models.py的定义是少不掉的,但我们会发现它的定义与forms.py定义很接近,为此减少输入,我们可以使用modelForm这个模块,可减少代码输入。先定义models.py#coding:utf-8fro..
分类:
其他好文 时间:
2015-05-24 10:15:35
阅读次数:
151
from django.db.models import CountMembers.objects.values('designation').annotate(dcount=Count('designation'))
分类:
其他好文 时间:
2015-05-21 18:43:50
阅读次数:
145
8.0 采用的是Qweb报表,摒弃了7.0中的RML报表。1.首先在xml文件中注册一个报表:report_type 有两个值,qweb-pdf,qweb-html2.创建报表类class qweb_print(models.AbstractModel): _name="report.qweb...
分类:
Web程序 时间:
2015-05-18 22:51:43
阅读次数:
237
首先,三层登陆由四部分组成。分别是UI层、BLL层、DAL层和Models实体。UI层的作用是接收用户输入的数据,显示用户查询的数据,为用户提供一种交互式操作界面;BLL层是起到数据的承上启下作用,对数据进行业务逻辑处理;DAL层的作用是具体操作数据库,如连接、查询、更改、删除等;Models层的作用是抽象数据库对象,如表实体、视图实体、存储过程实体等。将一个系统分为三层,会增强系统的逻辑性,使其结构清晰明了。...
分类:
其他好文 时间:
2015-05-18 09:12:09
阅读次数:
197
1、基架自动生成@Html.EnumDropDownListFor()辅助方法映射到模型类属性的元数据。@model MajorConstruction.Models.Course @Html.LabelFor(model => model.CourseType, htmlAt...
分类:
Web程序 时间:
2015-05-17 21:46:02
阅读次数:
245