<div class="bottom_wrapper clearfix">
<div class="message_input_wrapper">
{{=form.custom.begin}}
<textarea id="message_input" type="text"name="message" placeholder="Type your message here..."></textarea>
<button>send</button>
{{=form.custom.end}}
</div>
<div class="message_template">
<li class="message">
<div class="message-data-time" ></div>
<div class="text_wrapper">
<div class="text"></div>
</div>
</li>
</div>
</div>def c_function():
form = SQLFORM(db.post).process()
row = db(db.post.author== auth.user.id).select(db.post.id, db.post.message, orderby=~db.post.id, limitby=(0,1)).first()
names = row.message if row else None
db.answers.insert(quest=names, message=report())
replies = db(db.answers.author == auth.user.id).select(db.answers.ALL)[-10:-1]
return dict(form=form,names=names,replies=replies)db.answers.insert(quest=names, message=report())
replies = db(db.answers.author == auth.user.id).select(db.answers.ALL)[-10:-1]
--
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/OJRaYk57ZPQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
row = db(db.post.author== auth.user.id).select(db.post.id, db.post.message, orderby=~db.post.id, limitby=(0,1)).first()
row = db(db.post.author== auth.user.id).select(db.post.id, db.post.message, orderby=~db.post.id).first()
--
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 the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
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/OJRaYk57ZPQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
- my first attempt will be to try to add indexes in the post and answers Table on the field author.- secondly i will try to change this rowrow = db(db.post.author== auth.user.id).select(db.post.id, db.post.message, orderby=~db.post.id, limitby=(0,1)).first()to thisrow = db(db.post.author== auth.user.id).select(db.post.id, db.post.message, orderby=~db.post.id).first()limitby ist not needed in that case. it is just my opinion.
--
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/OJRaYk57ZPQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.