Hi rochacbruno, thank you for the kind words.
Yes select2 should be an improvement over chosen, I found about it here:
https://github.com/h5bp/lazyweb-requests/issues/92 (they are planning to
upgrade standard select). A widget would be great.
The url trick is very welcome I will get it in the
Does anybody know why do I get App does not exist or your are not
authorized when I install https://github.com/rif/web2admin ?
The plugin install fine, though.
-rif
--
Hi all : The below code snippet in web2py manual (p. 340), isn't resulting
to the expected output.
def list_records():
table = request.args(0) #returns db
query = request.vars.query #db.dog.owner == 1
records = db(query).select(db[table].ALL) # db(...) requires
owner==1 as parameter
I have a couple of case discriminations to reduce a parameter to the
tablename. I found that in gluon, this is often done by simply str(table).
But did you know:
x = lambda: str(table)
timeit.Timer(x).timeit()
5.487793207168579
x = lambda: table._tablename if hasattr(table,
yeah, you need to quote them though!!!
MSSQL for example doesn't allow to do
select * from 123a
but works if you select * from [123a]
PS: fields with only integers in names are to be quoted as well (this
happens to all dbs adhering to T-SQL standard)
select 123 from mytable returns a column
why are you calling session.forget() ?
On Thursday, September 13, 2012 8:43:30 PM UTC+2, Luis Furtado wrote:
Hello,
When I submit the form no validation errors are shown and, after a few
seconds, it just shows the form again, totally blank even if I had filled
some fields.
If I include
If you have data from one table only, leave out the table name. (which is
in your case)
If you have data from more than one table, you need to use the table name
to access the correct info.
This has always been the way web2py functions. :)
I think it is a matter of perspective. When you only
Hi,
I'm trying to use SQLTABLE in components... Is there a way to make orderby
links to works in components?
It seems that miss an option to pass cid to orderby links.
I can copy SQLTABLE and make my own but is really a little change...
What do you think to add such option?
Thank you
--
I do not think SQLTABLE was ever intended for production systems.
Why not use the SQLFORM.grid()? You can switch off all the things you
don't want.
On Friday, September 14, 2012 9:23:25 AM UTC+1, Massimiliano wrote:
Hi,
I'm trying to use SQLTABLE in components... Is there a way to make
Hi!
I receive the following error
Traceback (most recent call last):
File /home/gniemetz/webapps/web2py/web2py/gluon/restricted.py, line 209, in
restricted
exec ccode in environment
File
/home/gniemetz/webapps/web2py/web2py/applications/tauchbuch/controllers/default.py
Hi again!
I found it, the right way is
if FORM(grid).errors:
but unfortunately the response.flash gets not set, it has always the value
Errors in form, please check it out. I tried to set it in index and in
check_km with no luck
Has someone a good idea?
Regards
Gerd
Am Freitag, 14.
Yes, it makes sense, and I've already modified my code; thanks. It's the
inconsistency that gets me. It's not a big deal, but still. If I add
another field from another table to my select, then I have to change all my
field references to include the table references. I suspect the Rows/Row
Use group!
2 apps means you will have to tell your user on which app to load or hack
something to redirect request of login to the other so the user can log
seamlessly from a single app, but this may be bring security holes.
I really don't see why you can just put your particular users in a
The main problem is that the truncation is done silently. In my case, we
were creating new data models with fields like string(1000) and just
recently a team member noted the result in the database was varchar(255).
It violates the principle of least amazement :) that a directive to
create
This is really nice? If you think this is ready for production (or when you
think it is ready for production) let me know. Where do you do you think
would be a place to link it to make it more visible?
massimo
On Monday, 10 September 2012 08:49:35 UTC-5, rif wrote:
I started the development
Alignment for the Add button in sqlform.grid seems to be broken in 2.0.9
(See attached)
Is there a way to download 2.0.8 version ?
-Mandar
--
attachment: alignment-208.pngattachment: alignment-209.png
Thanks for pointing that out. The example in the book is wrong and has been
wrong for a while. :-(
I changed it into this:
def list_records():
REGEX = re.compile('^(\w+)\.(\w+)\.(\w+)\=\=(\d+)$')
match = REGEX.match(request.vars.query)
if not match:
redirect(URL('error'))
Thank you massimo,
Just added history, fields selection and better access url. I am working on
filters and on using the links and left parameters from smartgrid.
Considering that most of the heavy lifting is done by the brilliant
smartgrid I think it is quite ready for beta testing (and any
Interesting. We need to review the source and see where we can use this
improvement. I think we use the latter almost anywhere already but not sure.
On Friday, 14 September 2012 02:57:11 UTC-5, Dominic wrote:
I have a couple of case discriminations to reduce a parameter to the
tablename. I
An Niphlod implies,
session.forget()
breaks the form logic. Unless you do form.process(session=False)
On Thursday, 13 September 2012 13:43:30 UTC-5, Luis Furtado wrote:
Hello,
When I submit the form no validation errors are shown and, after a few
seconds, it just shows the form again,
Can you provide an example?
On Friday, 14 September 2012 03:23:25 UTC-5, Massimiliano wrote:
Hi,
I'm trying to use SQLTABLE in components... Is there a way to make orderby
links to works in components?
It seems that miss an option to pass cid to orderby links.
I can copy SQLTABLE and
Hello Gerd, the grid is a grid. It is not a form (although it may contain
forms) therefore it does not have a grid.errors. Embedding into a form does
not solve the problem.
Yet you can check if the grid contains a form and whet the errors for that
form are:
if grid.create_form and
I am glad to say that this problem is a windows problem. My local host is a
windows machine, but this is just for testing. My actual server is a linux
machine and dropbox put_file works fine on the linux machine.
Peter
On Thursday, 13 September 2012 14:17:28 UTC+1, peter wrote:
This is not
So far so good moving my apps from 1.99 to 2.09
One thing did not work
My user password of an app is 123 and i could not login with error
message...
Password too short
I have other users using this app
What if they have simple passwords too?
Best regards
António
--
http://web2py.com/books/default/chapter/29/09#Settings-and-messages
Default is a minimum of 4 chars for the password. If you feel you should
let users use simple passwords, set auth.settings.password_min_length
accordingly
On Friday, September 14, 2012 4:45:09 PM UTC+2, Ramos wrote:
Ticket ID
177.98.249.72.2012-09-14.09-53-47.33747c9a-7600-4a12-9f1f-b855fbd21214
type 'exceptions.AttributeError' 'FaceBookAccount' object has no
attribute 'request' Versão web2py™ (2, 0, 8, datetime.datetime(2012, 9, 7,
3, 47, 51), 'stable') Python Python 2.7.3: /usr/local/bin/python
I've got an app that uses SQLFORM.grid in a number of pages.
At the end of each row in my grid, the View, Edit, Create, Delete buttons
are rendered as text links with no horizontal margin or padding, ie they
render like this:
*ViewEditCreateDelete*
I'd like to at least put some horizontal space
Thanks for your help Massimo
Am Freitag, 14. September 2012 16:08:14 UTC+2 schrieb Massimo Di Pierro:
Hello Gerd, the grid is a grid. It is not a form (although it may contain
forms) therefore it does not have a grid.errors. Embedding into a form does
not solve the problem.
Yet you can
El sábado, 1 de septiembre de 2012 14:00:49 UTC-3, Massimo Di Pierro
escribió:
The web2py book app has been rewritten
http://www.web2py.com/book
and the source of the app and the book itself is now on github
I'm trying to add a chapter 8th subsection with an imap howto Reading
there's no development app. The book app is the one in production :p .
It caches the output of markmin pages to avoid cpu usage. If you are
developing, open controllers/default.py and edit line 95 to if 1:
On Friday, September 14, 2012 5:15:44 PM UTC+2, Alan Etkin wrote:
El sábado, 1 de
I'm calling session.forget() to try and fix the problem, but it didn't.
Anyway, the problem was there before that. I just removed it and it made no
difference.
The whole behaviour of the app is variable.
Sometimes it does the validation phase and then I fill it w/o errors and,
after
Thank you.
Igor Rafael
On Fri, Sep 14, 2012 at 12:12 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
admin is readonly on GAE. GAE has a readonly file system. You have to
create apps locally and then deploy them.
On Thursday, 13 September 2012 21:10:18 UTC-5, Igor Rafael wrote:
Hi everyone,
tl;dr: if you've ever manually installed any packages with --user, you need
to go and make sure they're also installed for Python2.7
--
@Niphlod- I was hoping this embedded mode patch was going to become part
of the 2.0 implementation. I see you added a -X flag to allow for launching
the scheduler alongside an app, but we can't use this in our situation
where web2py is running as wsgi under Apache while our scheduler processes
there's no development app. The book app is the one in production :p .
It caches the output of markmin pages to avoid cpu usage. If you are
developing, open controllers/default.py and edit line 95 to if 1:
Thanks niphlod
Changed the line, the same output. I even changed a book/static_chaps
Scheduler is not useful if managed by a webserver, so forget about -X: just
like softcron, it is meant to be used when the internal webserver is used,
not when web2py is managed by apache co.
Having a master starting the actual workers is needed to have multiple
workers started with one
@Alan- delete the html file completely from the static_chaps folder- that's
what worked for me
On Friday, September 14, 2012 11:48:53 AM UTC-4, Alan Etkin wrote:
there's no development app. The book app is the one in production :p .
It caches the output of markmin pages to avoid cpu usage. If
Thanks niphlod
Changed the line, the same output. I even changed a book/static_chaps file
with chapter 8 in html with no luck.
Nevermind my last message, now refreshed the page and the chages appeared.
Looks like static_chaps is for app auto-generated files cause my previous
changes
What do you have in your view? are you using any JavaScript to manage the
form submission?
--
I think you encountered another fine feature of my patches to the
production book: cache headers correcly set ... Useful when the book
sources rarely change but not so if you're hitting f5 to see the results of
your work. Changing that line (95) definitely triggers the output to be
Right, I was just voting for having the script integrated into web2py
outright, so that calling it with maybe a lowercase -k would execute a
single scheduler process without spawning subprocesses.
On Friday, September 14, 2012 11:57:49 AM UTC-4, Niphlod wrote:
Scheduler is not useful if
well, maybe we can support not spawning if -K is followed by one app only.
Thoughts ?
On Friday, September 14, 2012 6:16:08 PM UTC+2, Yarin wrote:
Right, I was just voting for having the script integrated into web2py
outright, so that calling it with maybe a lowercase -k would execute a
actually, even better instead of commenting 92,93,94, change 81 from
TOMORROW = now + datetime.timedelta(days=1)
to
TOMORROW = now - datetime.timedelta(days=1)
On Friday, September 14, 2012 6:11:11 PM UTC+2, Niphlod wrote:
I think you encountered another fine feature of my patches to the
Sure that works for me
On Friday, September 14, 2012 12:25:02 PM UTC-4, Niphlod wrote:
well, maybe we can support not spawning if -K is followed by one app only.
Thoughts ?
On Friday, September 14, 2012 6:16:08 PM UTC+2, Yarin wrote:
Right, I was just voting for having the script
ok, give me a few hours, I need to get home first :P
--
I've been trying to compile my app and I get the following backtrace, which
doesn't strike me
as very useful, given that the application has around 100 views. Any hints
as to what I can do
so as to track down the problem?
Cannot compile: there are errors in your app:
1.
2.
3.
4.
5.
6.
7.
8.
It was intentional to move the [add] button to the same line as the search
(if search is enabled). Something in the css is breaking the alignment for
you. Can you try copying over the new web2py.css and web2py_bootstrap.css?
On Friday, September 14, 2012 8:54:52 AM UTC-5, Mandar Vaze wrote:
On Friday, September 14, 2012 8:59:13 AM UTC-5, rif wrote:
Thank you massimo,
Just added history, fields selection and better access url. I am working
on filters and on using the links and left parameters from smartgrid.
Considering that most of the heavy lifting is done by the brilliant
Please open a ticket. Looks like a bug.
On Friday, September 14, 2012 10:02:57 AM UTC-5, Tito Garrido wrote:
Ticket ID
177.98.249.72.2012-09-14.09-53-47.33747c9a-7600-4a12-9f1f-b855fbd21214
type 'exceptions.AttributeError' 'FaceBookAccount' object has no
attribute 'request' Versão
Make sure you are using 2.0.9 because there is a subtle issue in 2.0.x
(x9) which may affect the behavior in your case.
On Friday, September 14, 2012 9:04:49 AM UTC-5, Luis Furtado wrote:
I'm calling session.forget() to try and fix the problem, but it didn't.
Anyway, the problem was there
Doesn't the ticket say which file is causing the problem?
On Friday, September 14, 2012 11:43:01 AM UTC-5, rick817 wrote:
I've been trying to compile my app and I get the following backtrace,
which doesn't strike me
as very useful, given that the application has around 100 views. Any
No, I don't manage the form submission.
Just use jQuery to:
1. fill in user_id
2. populate a select dropdown depending on an option on another select
3. add some titles in the form
-- index.html
{{ extend 'modelo.html' }}
{{ =response.toolbar() }}
R_ID = {{ =session.r_id
db.define_model('animal',
Field('species'),
Field('genus'),
Field('family'))
I suppose db.define_table.
--
Is it possible to send both Plain Text and HTML Emails with
auth.messages.verify_email? From the book, it seems
auth.messages.verify_email only accepts a single string.
--
There is Pyodel (learning tool), I dont know about the status of QAStak and
PyForum.
@rif what about multiple databases and databases named differently?
your code expects a db object, so I think you can put on the models a
config variable for dbs
plugin_web2admin_dbs = [db, other_db,
Following on an earlier question of mine, I'm trying to arrange for
persistent data (per user) by writing session data to the db. The trick I'm
stumbling over is how to make sure that the session data that is stored
always represents the end of the most recent user session. It seems to me
like
I have a solution now that seems to work. In style.css, I added:
#content a.w2p_trap.button {
margin-right: 8px;
}
This solves the spacing problem between the buttons. I'm wondering is this
is specific enough, i.e does web2py apply the w2p_trap and button classes
to any anchors other
it's not hashed, it's pickled.
On Friday, September 14, 2012 7:40:47 PM UTC+2, monotasker wrote:
Following on an earlier question of mine, I'm trying to arrange for
persistent data (per user) by writing session data to the db. The trick I'm
stumbling over is how to make sure that the
I use MySQL and after upgrading to 2.0.x I see MySQL warnings from time to
time printed to stdout. It appears they originate from MySQLdb.
Here is a simple example of how to produce the warnings.
db.executesql('DROP TABLE IF EXISTS non_existent_table')
/path/to/2.0.8/web2py/gluon/dal.py:1653:
Ok, so would I then just have python read the contents of the file and then
unpickle the whole as a single string?
Ian
On Friday, September 14, 2012 2:52:33 PM UTC-4, Niphlod wrote:
it's not hashed, it's pickled.
On Friday, September 14, 2012 7:40:47 PM UTC+2, monotasker wrote:
Following
no, sessions are Storage() objects. You need to unpickle them, change
whatever you need to change and pickle them back before saving.
On Friday, September 14, 2012 9:18:01 PM UTC+2, monotasker wrote:
Ok, so would I then just have python read the contents of the file and
then unpickle the
Excellent suggestion. dbs will be available in the next version.
-rif
vineri, 14 septembrie 2012, 20:34:16 UTC+3, rochacbruno a scris:
There is Pyodel (learning tool), I dont know about the status of QAStak
and PyForum.
@rif what about multiple databases and databases named differently?
+1. Thanks Yarin.
On Thursday, September 13, 2012 11:36:34 PM UTC+2, Yarin wrote:
@Massimo @Niphlod
Patch for scheduler docs. Mostly clarifications and syntactical
corrections. Thanks-.
--
I would like to translate in french too, is there chapter that will not
change too much? I don't want to do it for nothing...
Richard
On Fri, Sep 14, 2012 at 4:10 PM, Niphlod niph...@gmail.com wrote:
+1. Thanks Yarin.
On Thursday, September 13, 2012 11:36:34 PM UTC+2, Yarin wrote:
In the process of sandbox testing with the POS plusing and google checkout,
in the pos plugin, the
instructions indicate in the model to add,
4) in your payment page add the button
img src={{=URL(request.application,'plugin_google_checkout','button',
dict(next='http://your.urlname.com'))}}
fixed in the source. Thanks for reporting this. Will post the updated book
asap.
On Friday, 14 September 2012 12:11:49 UTC-5, martzi wrote:
db.define_model('animal',
Field('species'),
Field('genus'),
Field('family'))
I suppose db.define_table.
--
If the email text looks like 'html/html' it should be send as html.
On Friday, 14 September 2012 12:12:21 UTC-5, Mark Li wrote:
Is it possible to send both Plain Text and HTML Emails with
auth.messages.verify_email? From the book, it seems
auth.messages.verify_email only accepts a
Please open a ticket about this. I would prefer is there where a way to
tell the driver to send the error directly to the logfile.
On Friday, 14 September 2012 14:00:27 UTC-5, Jim Karsten wrote:
I use MySQL and after upgrading to 2.0.x I see MySQL warnings from time to
time printed to
The chapter that change the most are 0,3,4 and 6. Most of the work on 6 has
been done I think. The other chapters will not change much as content but
the content may be re-arranged as I am considering adding one chapter about
background processes.
On Friday, 14 September 2012 15:42:15 UTC-5,
i noticed that in 2.0.8 and trunk that IS_IN_DB when multiple=True tries to
do a belongs query with the string values posted by the user rather than
int values needed for the query (at least on GAE). bug report + proposed
patch is here: http://code.google.com/p/web2py/issues/detail?id=1005
Sorry I should've been more specific in my question.
I wanted to know if you could combine plain text and html emails with
auth.messages.verify_email like you can with the following:
mail.send('y...@example.com',
'Message subject',
('Plain text body', 'htmlhtml body/html'))
On Friday,
for what it's worth i have re-implemented some of the auth functions that
send mail so that i can send both plain text and HTML emails (i don't read
email in HTML so i still like plain text versions). i'm not sure how many
people are left who are like meif there are enough it would be
i would argue in that case that there is a bug if login is prevented
because the password is too short.once a user creates a password it
should remain valid until they change it. we should only check password
length on creation, otherwise you break existing users when you try and
change
I would like to know how I should go about adding a 'resend_email_verify'
action to utilize the 'request_reset_password' action, but instead of
sending a link to the reset_password view, it simply resends
auth.message.verify_email .
--
@rif I have some suggestion
Screenshot: http://i.imgur.com/3t2kv.png
For the suggested [fields] buttom it can be done with a modal or popup, it
can loads a table style=display:none; id=tablename_fields inside the
popup or modal, or if prefered it can retrieve this info via ajax.
To retrieve
On 14 Sep 2012, at 4:22 PM, howesc how...@umich.edu wrote:
i would argue in that case that there is a bug if login is prevented because
the password is too short.once a user creates a password it should remain
valid until they change it. we should only check password length on
Hi there,
Making the following minor change:
def clear(self, key = None):
if key:
key = '%s/%s' % (self.request.application, key)
self.delete(key)
else:
self.flush_all()
would allow the entire cache to be cleared via.
cache.ram.clear()
Matt
Richard ... Villas ...
thank you both for your insights ... for now .. I will go on ... and will
try to figure it out as I go along ...
I will probably end up trying both approach and see / compare etc ..
I foresee issues of various bottlenecks in an app like this .. so .. ...
lately ..
Hi there,
I've noticed that the new lazy_tables option is causing problems.
if I do the following (at least on GAE and Cloud SQL):
setting dal(lazy_tables = True)
db.define_table('x',
Field('name', 'string')
)
db.define_table('y',
Field('x', 'reference x'),
Field('age', 'integer',
in trunk! Thanks.
On Friday, 14 September 2012 19:33:11 UTC-5, Matt wrote:
Hi there,
Making the following minor change:
def clear(self, key = None):
if key:
key = '%s/%s' % (self.request.application, key)
self.delete(key)
else:
I cannot reproduce this. tested with and without lazy_tables = True on
2.0.9.
On Friday, 14 September 2012 20:19:48 UTC-5, Matt wrote:
Hi there,
I've noticed that the new lazy_tables option is causing problems.
if I do the following (at least on GAE and Cloud SQL):
setting
Hi there,
Another bug in 2.0.x:
def test_execute():
rows = db.executesql('select * from y where id = %(id)s', placeholders =
dict(id = 1), as_dict = True)
return str(rows[0])
raises:
File /Projects/www/gluon/dal.py, line 7257, in executesql
adapter.execute(query, placeholders)
Weird. Did you try with GAE?
Matt
On Saturday, September 15, 2012 2:20:57 PM UTC+12, Massimo Di Pierro wrote:
I cannot reproduce this. tested with and without lazy_tables = True on
2.0.9.
On Friday, 14 September 2012 20:19:48 UTC-5, Matt wrote:
Hi there,
I've noticed that the new
Great. Thanks :)
Matt
On Saturday, September 15, 2012 2:16:56 PM UTC+12, Massimo Di Pierro wrote:
in trunk! Thanks.
On Friday, 14 September 2012 19:33:11 UTC-5, Matt wrote:
Hi there,
Making the following minor change:
def clear(self, key = None):
if key:
key =
84 matches
Mail list logo