@auth.requires_login()def notes():dbhealth.health.id.readable = Falseg = SQLFORM.grid(dbhealth.health, searchable=True, csv=False, user_signature=True, )return dict(form = g)........codequestion = db(db.answers.author == auth.user.id).select(orderby=~db.answers.created_on,limitby=(2,0))return dict(form=form, question=question)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/YQhEantsews/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@auth.requires_login()#membership('managers')->this gives an errors bout q not being defined in view_searchesdefnotes():dbhealth.health.id.readable = Falseg = SQLFORM.grid(dbhealth.health, searchable=True, csv=False, user_signature=True, )return dict(form = g)@auth.requires_login()def upd_healthinsure():id,column = request.post_vars.id.split('.')value = request.post_vars.valuedbhealth(dbwellness.health.id == id).update(**{column:value})return value....more codename3 = 'testing string 123'db.answers.insert(quest=name3)replies = db(db.answers.author == auth.user.id).select(db.answers.ALL)[-5:-1]question = db(db.answers.author == auth.user.id).select(orderby=~db.answers.created_on,limitby=(2,0))return dict(form=form, question=question, replies=replies)
1. | Traceback (most recent call last): As for the view: {{extend "layout.html"}}
{{for q in question:}}
{{q=XML(q.quest.replace('\n','<br>').replace('(','{').replace(')','}'), sanitize=True)}}
{{pass}}
{{for a in answer:}}
{{a=XML(a.message.replace('\n','<br>').replace('(','{').replace(')','}'), sanitize=True)}}
{{pass}}
<html lang="en">
<meta charset="utf-8"/>
<style type="text/css">
* {
box-sizing: border-box;
}
body {
background-color: #edeff2;
font-family: 'Noto Serif', serif;
font-size: 0.3em;
font-weight: lighter;
overflow-y:hidden;
}
.chat_window {
position: fixed;
width: calc(100% - 20px);
max-width: 90%px;
height: 440px;
border-radius: 10px;
background-color: #fff;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
background-color: #f8f8f8;
overflow: hidden;
bottom:0;
}
.messages {
position: relative;
list-style: none;
padding: 20px 10px 0 10px;
margin: 0;
height: 390px;
overflow-y: scroll;
}
.messages::-webkit-scrollbar {
display: none;
}
.messages .message {
clear: both;
overflow: hidden;
margin-bottom: 20px;
transition: all 0.5s linear;
opacity: 0;
font-size: 0.5em;
}
.messages .message.left .text_wrapper {
background-color: #8C9EFF;
margin-left: 2px;
}
.messages .message.left .text_wrapper::after, .messages .message.left .text_wrapper::before {
right: 100%;
border-right-color: #8C9EFF;
}
.messages .message.left .text {
color: white;
}
.messages .message.right .text_wrapper {
background-color: #E8EAF6;
margin-right: 2px;
float: right;
max-width: 89%;
width: auto;
position: relative;
word-wrap: break-word;
word-spacing: normal;
text-align:justify;
max-height: 150px;
height:auto;
display: inline-block;
padding: 6px;
border-radius: 7px;
}
.messages .message.right .text_wrapper::-webkit-scrollbar{
display:none;
}
.messages .message.right .text_wrapper::after, .messages .message.right .text_wrapper::before {
left: 100%;
border-left-color: #E8EAF6;
}
.messages .message.right .text {
color: black;
font-size: 1em;
}
.messages .message.appeared {
opacity: 1;
}
.messages .message .message_data_time {
margin-right:0;
margin-top:0;
position: relative;
right:5px;
display: inline-block;
}
.messages .message .text_wrapper {
display: inline-block;
max-height: 150px;
border-radius: 6px;
width:auto;
overflow-y: auto;
text-align:justify;
position: relative;
word-wrap: break-word;
word-spacing: normal;
padding:4px;
line-height: 16px;
}
.messages .message .text_wrapper::-webkit-scrollbar{
display:none;
}
.messages .message .text_wrapper::after, .messages .message .text_wrapper:before {
top: 18px;
border: solid transparent;
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.messages .message .text_wrapper::after {
border-width: 13px;
margin-top: 0px;
}
.messages .message .text_wrapper::before {
border-width: 15px;
margin-top: 2px;
}
.messages .message .text_wrapper .text {
font-size: 18px;
font-weight: 300;
}
.bottom_wrapper {
position: relative;
width: 100%;
background-color: #fff;
padding: 10px 10px;
position: absolute;
bottom: 0;
}
.message_input_wrapper textarea {
border: 1px solid #bcbdc0;
padding: 10px 10px;
font: 16px/22px "Lato", Arial, sans-serif;
margin-bottom: 2px;
border-radius: 5px;
height: 45px;
box-sizing: border-box;
width: 82%;
max-width: 82%;
position: relative;
outline-width: 0;
color: black;
top:5px;
bottom: 10px;
}
.message_input_wrapper button {
border: none;
padding: 8px 2px;
float: right;
border-radius: 5px;
height: 45px;
box-sizing: border-box;
width: 15.5%;
max-width: 15.5%;
position: relative;
outline-width: 0;
color: white;
font-size: 16px;
cursor: pointer;
background: #8C9EFF;
top:5px;
bottom: 10px;
}
.bottom_wrapper .message_input_wrapper .message_input {
border: none;
height: 100%
box-sizing: border-box;
width: calc(100% - 40px);
position: absolute;
outline-width: 0;
color: gray;
}
.bottom_wrapper .send_message {
width: 140px;
height: 40px;
display: inline-block;
border-radius: 50px;
background-color: #a3d063;
border: 2px solid #a3d063;
color: #fff;
cursor: pointer;
transition: all 0.2s linear;
text-align: center;
float: right;
}
.bottom_wrapper .send_message:hover {
color: #a3d063;
background-color: #fff;
}
.bottom_wrapper .send_message .text {
font-size: 18px;
font-weight: 300;
display: inline-block;
line-height: 48px;
}
.message_template {
display: none;
}
</style>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head> |
--
{{for q in question:}}{{q=XML(q.quest.replace('\n','<br>').replace('(','{').replace(')','}'), sanitize=True)}}{{pass}}
...$(function () {...
sendMessage('{{=q}}');
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/YQhEantsews/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
--