Anthony,
maybe I did not find the right words to describe the situation:.
1. While the error message is visible, I *can *edit the page.
2. The "save"-button is not disabled, but it does nothing. No changes
are stored.
3. It is clear, that I have to dismiss the message.
4. Again lik
Well, just removing the db.commit() made it work as well except that it
doesn't populate the self referencing field.
if db(db.comment).count()<2:
populate(db.comment, 30)
On Monday, August 22, 2016 at 9:09:45 PM UTC-7, pbreit wrote:
>
> I fixed by specifying:
>
> if db(db.comment).count()<2
I fixed by specifying:
if db(db.comment).count()<2:
import random
for i in range(1,20):
populate(db.comment, 1, contents={'parent_comment': i})
db.commit()
On Monday, August 22, 2016 at 8:47:48 PM UTC-7, pbreit wrote:
>
> Trying to populate:
>
> db.define_table('comment',
>
What steeps?
--
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" gro
Trying to populate:
db.define_table('comment',
Field('post_id', 'reference post'),
Field('parent_comment', 'reference comment'),
Field('body', 'text', requires=IS_NOT_EMPTY()),
Field('votes', 'integer'),
auth.signature)
with:
if db(db.comment).count()<2:
populate(db.comm
The paging includes references to "category" except when viewing posts by
author, there is no category.
A quick fix would be to skip the paging when listing by author:
{{if request.function!='list_posts_by_author':}}
{{if page>0:}}
{{=A('previous', _class='btn', _href=URL(args=(category.name, pa
Figured out.
It works on name after class.
On Sunday, August 21, 2016 at 5:22:11 PM UTC-4, Ron Chatterjee wrote:
>
> Question, how to get the list of drop down menu from request.vars using
> manual form as in the book example (chapter 7) below.
>
> If I do the followiing. I get the input valu
A quick fix is to remove the paging links for the function "
list_posts_by_author" at the bottom since they are using category:
{{if request.function!='list_posts_by_author':}}
{{if page>0:}}
{{=A('previous', _class='btn', _href=URL(args=(category.name, page-1)))}}
{{pass}}
{{if len(rows)>=10:}
Its all good. Just checking. Thanks for the help Niphlod.
On Monday, August 22, 2016 at 5:11:17 PM UTC-4, Ron Chatterjee wrote:
>
> What I want is allowing user to put limited string but they can't submit
> the form with an empty field.
>
> requires = IS_EMPTY_OR([IS_LENGTH(8), IS_NOT_EMPTY()] )
OK, I see. At the bottom of the editor page there is a "Hooks" link which
reveals a hidden Ajax component when clicked (it shows any _before/_after
database callbacks attached to the DAL table models). That Ajax component
actually calls the hooks() action in the appadmin.py controller of the app
this is what i do in dev environment :
*controllers/truncate.py*
from gluon.admin import *
auth.requires(has_membership_admin)(lambda: None)()
def index():
for table in db.tables:
db[table].truncate()
app = request.application
clean = app_cleanup(app, request)
redirect(URL('default', 'index') )
be
Is the Reddit Clone source code from the Vimeo videos
(https://vimeo.com/104823162) available anywhere? I saw the Reddit app in
the "appliances" source: https://github.com/mdipierro/web2py-appliances
But it's quite a bit different.
Or does anyone know if a good Reddit and/or HackerNews "clone"?
What I want is allowing user for put limited string but they can't submit
the form with an empty field.
requires = IS_EMPTY_OR([IS_LENGTH(8), IS_NOT_EMPTY()] )
That don't work. Obviously not because its conflicting. Right? In one hand
I am saying empty or insert value (8) and then saying can't
to my knowledge, the general rule for validators is that if you have
multiple requirements, you should pass a list.
That being said, the are "special" validator, like IS_EMPTY_OR, that take a
validator as an argument.
Goes without saying (it quite translates well), that
IS_EMPTY_OR(IS_LENGTH(8)
Hi Anthony!
No, the error is within the app.
Please try it:
(1) Create a new app
(2) Add this line to db.py:
db.define_table("mytable", Field("message"))
(3) Wait some seconds. The message
"An error occured, please reload the page"
appears.
(4) The error message in the error file is:
Ticke
web2py application foe bets portal in bitcoin payments
https://github.com/icreator/web2py_bets_bitcoin
--
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)
---
Yo
On Monday, August 22, 2016 at 6:58:08 AM UTC-7, Annexx Xaar wrote:
>
> Hello sir i have tried all i could, still having errors in the reddit
> clone application.
> everything works fine except when i
> implemented {{=author(user_id)}} under list_posts_by_votes.html
> the errors blows when i cl
There is no template. you need to edit the pdfinvoice.py file.
On Sunday, 21 August 2016 04:00:42 UTC-5, Vic Ding wrote:
>
> Hi all,
> I am trying to generate pdf using pdfinvoice. The invoice is being
> generated and presented in the view.
> I am wondering, how can I customise the layout of the
what?
On Sunday, 21 August 2016 05:01:02 UTC-5, Steve Joe wrote:
>
> How would you do it?
>
--
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
I'm not using the web interface. Any assistance would be appreciated.
--
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 yo
In other words, if I do this:
IS_EMPTY_OR(IS_LENGTH(8))
It prevents longer length string but the empty field is inserted as None. I
want to prevent both.
On Monday, August 22, 2016 at 10:54:08 AM UTC-4, Ron Chatterjee wrote:
>
> Two question, if you don't mind.
>
> (1) requires = IS_NOT_EMPTY
Two question, if you don't mind.
(1) requires = IS_NOT_EMPTY(IS_LENGTH(64)) Or requires =
IS_EMPTY_OR(IS_LENGTH(64)) Doesn't work. In other words, if I want to limit
the string field entry but also want requires not empty, how to go about it?
(2) for my sql, do I still need length = 64 (or 255
It's possible show the result of get_category function ? Or show errors in
these point ?
Em segunda-feira, 22 de agosto de 2016 11:12:44 UTC-3, Annexx Xaar escreveu:
>
> Pls I am waiting for reply. pls anyone help?
>
>
>
>
>
>
>
> On Monday, August 22, 2016 at 2:58:08 PM UTC+1, Annexx Xaar wrote:
Thanks!
On Mon, Aug 22, 2016 at 10:36 AM, Niphlod wrote:
> mysched = Scheduler(., migrate=True)
>
>
> On Monday, August 22, 2016 at 3:17:24 PM UTC+2, Tito Garrido wrote:
>>
>> I have upgraded from 2.5.1 to the latest version but seems that the
>> scheduler tables had changed... I have droppe
Hello sir i have tried all i could, still having errors in the reddit clone
application.
everything works fine except when i
implemented {{=author(user_id)}} under list_posts_by_votes.html
the errors blows when i click on the author of a comment. it does not
dislay the author's name as it showe
Pls I am waiting for reply. pls anyone help?
On Monday, August 22, 2016 at 2:58:08 PM UTC+1, Annexx Xaar wrote:
>
> Hello sir i have tried all i could, still having errors in the reddit
> clone application.
> everything works fine except when i
> implemented {{=author(user_id)}} under lis
Examine ur controller, its likely from the controller, i had similar issue.
On Friday, November 27, 2015 at 12:43:33 AM UTC+1, Carlos Zenteno wrote:
>
> Coming back to web2py again.
>
> I am going through Massimo's videos and doing the reddit clone.
>
> I use appadmin to add users and categories a
Hello sir i have tried all i could, still having errors in the reddit clone
application.
everything works fine except when i
implemented {{=author(user_id)}} under list_posts_by_votes.html
the errors blows when i click on the author of a comment. it does not
dislay the author's name as it showe
"""What I am not clear on is the best way to invoke this code so that only
one copy of the task is created"""
if you need what you asked, that is the way to do it. You asked for a piece
of code that ensures a task is queued but only that one.
My solution to the "problem" is having a piece of cod
mysched = Scheduler(., migrate=True)
On Monday, August 22, 2016 at 3:17:24 PM UTC+2, Tito Garrido wrote:
>
> I have upgraded from 2.5.1 to the latest version but seems that the
> scheduler tables had changed... I have dropped the old ones and now I am
> trying to set web2py to recreate it.
>
I have upgraded from 2.5.1 to the latest version but seems that the
scheduler tables had changed... I have dropped the old ones and now I am
trying to set web2py to recreate it.
If I try to enable migrate it complains about some tables that already
exists... how to circunvent the tables that are a
What is a "protected controller"? It sounds like I need a recurring task
to monitor my recurring task ("recurring tasks all the way down").
- Scott
On Monday, August 22, 2016 at 7:47:07 AM UTC-4, Niphlod wrote:
>
> just queue the task in a protected controller that checks before inserting
> if
If you are receiving an error while in the admin app, then the error is
within the admin app itself, not your own app code. To see what the error
is, visit the errors page for the admin app itself. You can also open the
browser developer tools to examine the specific Ajax request and response
t
>
> def resizedp():
> display=db(db.dp.user_id == auth.user_id).select().first()
> from PIL import Image
> im1=Image.open(display.pic);
>
display.pic is just the file name, but you must provide the entire path --
try:
import os
im1 = Image.open(os.path.join(db.dp.pic.retrieve_file_p
requires=IS_LENGTH(64) will limit insertion upon validation. the "length"
attribute gets translated, wherever possibile, to backend-specific syntaxes.
On Sunday, August 21, 2016 at 4:21:22 AM UTC+2, billy...@gmail.com wrote:
>
> How we limit string length in DAL? It seems length = 64 doesn't work
just queue the task in a protected controller that checks before inserting
if another instance has been already queued and call that protected
controller once in a while (i.e. once per day)
On Monday, August 22, 2016 at 3:10:44 AM UTC+2, Scott Hunter wrote:
>
> The book seems pretty clear ab
max(version_date) . group by item.id
On Monday, August 22, 2016 at 9:52:55 AM UTC+2, Encompass solutions wrote:
>
> Consider the following pseudo model.
>
> item
> ->name = "string"
>
> version
> ->item_id = item.id
> ->version_date = "datetime"
>
>
> While I can easily create a collectio
def index():
display=SQLFORM(db.dp ,point.id, showid=False, submit_button="Update"
).process()
if display.accepted:
redirect(URL('you','resizedp', args=auth.user_id))
return locals()
def resizedp():
display=db(db.dp.user_id == auth.user_id).select().first()
from PIL im
see the source and adapt to your likings: web2py is not going to become an
LDAP inventory automatically...studying LDAP is not bad per se: you'll find
its query syntax pretty much in every 3rd party tool that integrates with
LDAP for some kind of reason.
On Friday, August 19, 2016 at 4:23:14 PM
Probably something with foreign key integrity (cascade, restrict, ...)
because after deleting of records in other tables it works.
However, how to understand such error tickets?
Dne pondělí 22. srpna 2016 13:31:50 UTC+2 Mirek Zvolský napsal(a):
>
> I am trying delete all records with appadmin.
I am trying delete all records with appadmin.
Error message is not very descriptive.
Any idea?
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/main.py", line 464, in wsgibase
session._try_store_in_db(request, response)
File "/home/www-data/web2py/gluon/globals.py", li
Consider the following pseudo model.
item
->name = "string"
version
->item_id = item.id
->version_date = "datetime"
While I can easily create a collection of the item with it's versions.
all_items = db((db.item.id > 0) & (db.version.item_id ==
db.item.id)).select(orderby=db.item.name | db.
Try :
response.static_version_urls = True
in your model.
I think it is not documented in the book, but there is a bug report about
it.
On Mon, Aug 22, 2016 at 6:46 AM T.R.Rajkumar
wrote:
> I hope the question is not clear. The purpose is to reduce band with by
> making the browser store the s
43 matches
Mail list logo