意外完整性错误(撒尿)

时间:2016-10-02 14:00:12

标签: python flask peewee flask-peewee

以下代码应该是编辑个人资料页面的视图,当提交表单时,应用程序检查并查找用户名或电子邮件是否已存在,如果是,则会引发完整性异常。 但该程序无法按预期工作。提交表单时,即使数据库中没有此类电子邮件或用户名,也会闪烁“用户名/电子邮件已注册”,为什么会这样?

/* =DROP DOWN
----------------------------------------------- */
.main-navigation ul li ul,
.main-navigation ul li:hover ul ul,
.main-navigation ul ul li:hover ul ul,
.main-navigation ul ul ul li:hover ul ul,
.main-navigation ul ul ul ul li:hover ul ul {
    display: none;
        left: 0;
    position: absolute;
    z-index: 9999;
}
.main-navigation ul li:hover ul,
.main-navigation ul ul li:hover ul,
.main-navigation ul ul ul li:hover ul,
.main-navigation ul ul ul ul li:hover ul,
.main-navigation ul ul ul ul ul li:hover ul {
    display:block;
}
.main-navigation ul li ul {
    position: absolute;
    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.8);
    border-top: 1px solid #0FBE7C;
    top: 45px;
    left: 25px;
    width: 150px;
}
.main-navigation ul li ul li {
    float: none;
    border-bottom: 1px solid #EAEAEA;
    padding: 0;
}
.main-navigation ul li ul li a,
.main-navigation ul li.current-menu-item ul li a,
.main-navigation ul li ul li.current-menu-item a,
.main-navigation ul li.current_page_ancestor ul li a,
.main-navigation ul li.current-menu-ancestor ul li a,
.main-navigation ul li.current_page_item ul li a {
    float: none;
    line-height: 21px;
    font-size: 13px;
    font-weight: normal;
    height: 100%;
    padding: 6px 10px;
    color: #666666;
}
.main-navigation ul li ul li a:hover, .main-navigation ul li ul li:hover > a, .main-navigation ul li.current-menu-item ul li a:hover {
    background: none repeat scroll 0 0 rgba(255, 255, 255, 1);
    color: #0FBE7C;
}
.main-navigation ul li ul li ul {
    left: 150px;
    top: -1px;
}
.main-navigation select {
    display: none;
}

0 个答案:

没有答案