Use request.post_vars instead of request.vars.
Other postings discuss this issue.
On Tuesday, August 6, 2013 9:21:06 PM UTC-5, Lamps902 wrote:
>
> I have a controller function which is protected by a standard
> authentication decorator ("@auth.requires_login()"). The function presents
> a page c
Could this be a pyodbc issue? Are you sure web2py hangs or only this one
session hangs? You can try from two separate browsers. It is possible
pyodbc does not return (because for example a circular reference is on
delete cascade) and web2py keeps the session blocked. All requests from
this user
Is that Captain Picard?
On Tuesday, 6 August 2013 21:17:57 UTC-5, davedigerati wrote:
>
>
> ,.-'"...``~.,
> .,.-"..."-.,
>
> .
[image: Inline image 1]
On Wed, Aug 7, 2013 at 10:30 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Is that Captain Picard?
>
>
> On Tuesday, 6 August 2013 21:17:57 UTC-5, davedigerati wrote:
>>
>> ..**..
>> ..
Hi,
I have created a "device_config" table and wanted to create a many to many
relationship between the "device_config" and "auth_group"
db.define_table("devices_membership",
Field("devices_config_id", "integer", db.devices_config),
Field("auth_group_id", "integer", db.auth_group))
I
use
db.define_table("devices_membership",
Field("devices_config_id", "reference devices_config"),
Field("auth_group_id", "reference auth_group")
)
that is the recommended way to specify references. you don't need to
specify the "integer" type, because a) any reference type (other than
I knew it!
On Wednesday, 7 August 2013 03:40:08 UTC-5, Marin Pranjić wrote:
>
> [image: Inline image 1]
>
>
> On Wed, Aug 7, 2013 at 10:30 AM, Massimo Di Pierro
>
> > wrote:
>
>> Is that Captain Picard?
>>
>>
>> On Tuesday, 6 August 2013 21:17:57 UTC-5, davedigerati wrote:
>>>
>>> ..
Massimo,
I tried opening a base url from IE when it had crashed in a session in
Chrome and got no response, so assume it is indeed web2py that crashed.
This was with a field which says ondelete='NO ACTION'. Can we not infer
from the fact pyodbc raised an Exception that was caught by web2py that
con
You are right. Not sure why this happens but I will look into it. Could you
please open a ticket so this is tracked?
On Wednesday, 7 August 2013 04:24:50 UTC-5, Andrew Buchan wrote:
>
> Massimo,
> I tried opening a base url from IE when it had crashed in a session in
> Chrome and got no respon
web2py.com/* is down atm
On Thu, Jul 25, 2013 at 8:13 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Strange. They are the same app and same server, just different processes.
> They all seem to be up now.
> One issue I have discovered is that pythonanywhere ignores regex in static
ok, its back... sorry
On Wed, Aug 7, 2013 at 12:19 PM, Marin Pranjić wrote:
> web2py.com/* is down atm
>
>
> On Thu, Jul 25, 2013 at 8:13 AM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Strange. They are the same app and same server, just different processes.
>> They all seem t
Thanks for your answer, Anthony. Its not necessary to change the code for
this since the id is already known if its being inserted anyway :) . I
just didn't expect that behavior.
On Tuesday, August 6, 2013 11:34:07 PM UTC-5, Anthony wrote:
>
> The DAL does this to get the id for MySQL insert
Hi,
in the docs it uses this code as an example.
for row in db().select(
db.person.ALL,
orderby=db.person.name, groupby=db.person.name):
print row.name
Alex
Bob
Carl
When I run this code it fails.
rsSuppliers = db().select(
db.weekly_data.ALL,
orderby=db
Thank yOU for looking into this. Will you post a follow-up to this thread
or should I monitor the google code issue list re this issue?
On Monday, August 5, 2013 12:38:50 AM UTC+2, Massimo Di Pierro wrote:
>
> Your first solution should also have worked. I will look into it.
>
> On Sunday, 4 Augu
You cannot select fields that are not in group_by.
Every field that appears in SELECT must be in group_by.
You are selecting db.weekly_data.ALL
This doesn't work in any database and never should :)
You can use select(..., distinct=db.weekly_data.supplier_code) but this
works ONLY in postgres.
Mar
I too have this problem, word by word as described. I haven't been able to
spot a pattern. I'm running web2py source on Windows XP (rocket).
On Monday, August 5, 2013 8:26:59 AM UTC+2, David Marko wrote:
>
> I have this problem for years. Working on Windows 7/8 , python 2.7.5 and
> latest web2p
I opened a
ticket:
https://code.google.com/p/web2py/issues/detail?id=1617&thanks=1617&ts=1375873958
On Wednesday, 7 August 2013 06:00:57 UTC-5, step wrote:
>
> I too have this problem, word by word as described. I haven't been able to
> spot a pattern. I'm running web2py source on Windows XP (r
So the web2py documentation is incorrect then and the db.person.ALL line
removed from the example.
>
--
---
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 we
Yes, I think the documentation is not correct. It is nonsensical anyhow to
do a groupby when you select all the fields including the primary key id.
Groupby groups similar values and if you do select.ALL there cannot be two
similar records.
Regards
Johann
On 7 August 2013 13:15, Simon Carr wro
Only GET vars should be added to the _next parameter in the URL on a
redirect to login. Does your form happen to be a GET form rather than a
POST form?
Anthony
On Tuesday, August 6, 2013 10:21:06 PM UTC-4, Lamps902 wrote:
>
> I have a controller function which is protected by a standard
> auth
How would you change this?
On Monday, 5 August 2013 15:42:39 UTC-5, Richard wrote:
>
> Hello,
>
> Is there a way to prevent user to log with there email? I set LDAP
> authentication, I create a username field on custom auth_user model and set
> auth.define_tables(username=True)
>
> But I notice
You must install
distutils
http://stackoverflow.com/questions/3810521/how-to-install-python-distutils
On Monday, 5 August 2013 12:04:47 UTC-5, ndave wrote:
>
> I am using python 2.7 version. Is there anything I can do to fix this
> issue of distutils not installed error? Mine is windows 8 64
The bug appears to be in a template (either index.html or layout.html). I
cannot say without the source of these files.
On Saturday, 3 August 2013 23:07:45 UTC-5, James Burke wrote:
>
> Hi,
>
> My site seems to be working fine, but when I go onto Google Webmaster
> Tools there are crawler errors.
Cool, actually I was going to write something like this just the other day.
Btw, I think directory 'controllers' should be created before:
controller_filename = os.path.join(destination,'controllers',prefix+'.py')
open(controller_filename,'w').write(controller)
so, it will not complain on 'No
Thanks it works.
On Wednesday, August 7, 2013 2:22:49 PM UTC+5:30, Niphlod wrote:
>
> use
> db.define_table("devices_membership",
> Field("devices_config_id", "reference devices_config"),
> Field("auth_group_id", "reference auth_group")
> )
>
> that is the recommended way to specify re
does gluon have notion of .first() (as in sum(), count(), first())?. If
some change to gluon is going to be made in the future then you could have
gluon assume that table.ALL when used with groupby should refer to the
first value in each group.
On Wednesday, 7 August 2013 12:20:29 UTC+1, Johann
Hello,
I was about to post this (I think I answer your question) :
Hello,
I think I found a flaw in the interaction between Auth and LDAP contrib
(web2py 2.4.7).
If I set LDAP as unique authentification method
(auth.settings.login_methods = LDAP) as written in the book, web2py should
leaves LDA
No change... Auth seems to delegate entirely the validation on username
input field in case ldap_auth is used as authentication method.
I guess this simple refactor (not tested) could do the tricks at least for
Active directory :
if not IS_EMAIL()(username)[1]:
AFAIK there's no standard "first()", but min() can be used as well. The
thing is the book needs an update and we shouldn't really return
anything that is not explicitely included in the column.
Having something like
select min(table.field1), min(table.field2), min(table.field3), table.field4
OK, the problem is that you generate the password twice -- once when
creating the form and again when processing it. Because you actually
include the password field in the form (as readonly), the original password
gets submitted with the form and inserted in the database. However, the
password
About routes.py
I have tried to use routes.py. After some hours I have found errors in the
book and in routes.example.py:
--
In the book, chapter "URL rewrite":
The general syntax for routes is more complex than the simple exam
Please send me a patch when you test it. ;-)
On Wednesday, 7 August 2013 07:51:58 UTC-5, Richard wrote:
>
> No change... Auth seems to delegate entirely the validation on username
> input field in case ldap_auth is used as authentication method.
>
> I guess this simple refactor (not tested) could
My intention was that the destination is an existing web2py app and
therefore controllers/ views/ and static/ already exist.
Actually as it is, if views/ or static/ already exist they
will not be overwritten but they should.
You may want to fix it and submit a patch.
The part that detects common
Hi Anthony,
Thanks for helping me solve this problem!
OK, the problem is that you generate the password twice -- once when
> creating the form and again when processing it.
I don't understand why I generate the password twice, I thought, this line
generates the password:
password=generate_pa
Ok!
:)
Richard
On Wed, Aug 7, 2013 at 10:10 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Please send me a patch when you test it. ;-)
>
> On Wednesday, 7 August 2013 07:51:58 UTC-5, Richard wrote:
>
>> No change... Auth seems to delegate entirely the validation on username
>> i
> I don't understand why I generate the password twice
>
The password is only generated once per call to the register action.
However, remember that every form submission in web2py actually involves
two calls to the form's action -- the first call happens when the page is
first loaded (i.e.,
The method was left at default/wasn't explicitly specified, so it was a
post form. Changing the method to 'get' resolves the problem.
On Wednesday, August 7, 2013 6:21:26 AM UTC-5, Anthony wrote:
>
> Only GET vars should be added to the _next parameter in the URL on a
> redirect to login. Does y
The method of the forms was left at default/wasn't explicitly set, so they
had the 'post' method. Setting the method to 'get' seems to fix the problem.
On Wednesday, August 7, 2013 6:21:26 AM UTC-5, Anthony wrote:
>
> Only GET vars should be added to the _next parameter in the URL on a
> redirec
I am attempting to create multiple buttons for an SQLFORM.grid which, upon
being click, will have the effect of redirecting data selected in the
grid's checkboxes to other controller functions. The code is something like
the following:
def redirect_func(x):
if request.vars.action == 'act
Hi Anthony,
Thanks for your extensive reply, now I understand what caused the problem
and how forms work.
Best regards,
Annet
--
---
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
Hello!
I'm doing a website where I have a carousel in which should be the 3 latest
news, going to search for Title, Content and Date to the database but isn't
working like I wanted.
The code:
*default.py*
def index():
"""
example action using the internationalization operator T and fl
from gluon.validators import IS_EMAIL
if ldap_mode == 'ad':
# Microsoft Active Directory
if IS_EMAIL()(username)[1] is not None:
#if '@' not in username:
domain = []
for x in ldap_basedn.split(','):
Better then that I think :
In gluon/tools.py in Auth login() near line 2006 :
Replace :
tmpvalidator = IS_NOT_EMPTY(error_message=self.messages.is_empty)
With :
if 'username' in table_user.fields or \
not self.settings.login_email_validate:
tmpvalidator =
[IS_
Hi Hugo, I dont know bootstrap carousel, but in the view you are iterating
many times the main div "carousel-example-generic".
In your case you need iterate only the dinamic content of the carousel, and
the carousel content are divs.
See this example with my comments:
I would also add this :
tmpvalidator = [IS_NOT_EMPTY(error_message=self.messages.is_empty),
IS_NOT_IN_DB(db,
'auth_user.username'), IS_NOT_EMAIL()]
Since this line in the book :
auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username)
Doesn't seem to works and could be erase since
Hello Hugo
You sait the carousel is not working as you wanted, but what's is the
problem? error message, wrong content, blank field, ...?
For you information, here is an example of a Web2py view with a bootstrap
carousel :
https://github.com/espern/tiny_website/blob/master/views/images/photo_ga
Cool. Thanks for that.
On Tuesday, August 6, 2013 11:28:20 PM UTC+1, Massimo Di Pierro wrote:
>
> I just pushed a new version:
>
> https://github.com/web2py/web2py/blob/master/scripts/import_static.py
>
> Massimo
>
> On Tuesday, 6 August 2013 16:51:31 UTC-5, tim spear wrote:
>>
>> Hi Massimo,
>>
Nevermind. Took care of it by creating a series of images to be used as
buttons, and using jquery to append a hidden var specifying to which
function the redirect should go, and to submit the form contained within
the grid.
>
--
---
You received this message because you are subscribed to th
Hi all
I am trying to deploy on GAE through the admin interface (using the latest
web2py build on Mac OS X).
However I get this error message:
Traceback (most recent call last):
File "/usr/local/bin/appcfg.py", line 171, in
run_file(__file__, globals())
File "/usr/local/bin/appcfg.py",
Hey Roberto!
So, I've used your code and this turned out:
*index.html*
*
*
{{for post in news:}}
{{if index==0:}}
{{=post.title}}
{{=post.post}}
{{=post.created_on}}
Hello,
Firstly, apologies from a relative noob
I need some guidance or help on how to achieve a smooth outcome, please?
I am creating a small "multi-tenant" application. Part of the application
programmatically generates .csv files (they are reports). For obvious
"multi-tenant" reasons, each
On Wednesday, August 7, 2013 11:26:05 AM UTC-4, Lamps902 wrote:
> The method of the forms was left at default/wasn't explicitly set, so they
> had the 'post' method. Setting the method to 'get' seems to fix the problem.
>
Hmm, I would have expected the opposite. Can you show an example of code
you forgot the ":" on the else and pass on the if. index var not exist, was
my example, you need get the index of the iteration, may be with
news.index(post) or using enumerate. Try this two example:
{{for index, post in enumerate(news):}}
Do you have to store the file before inserting the db record? Or can you
create the CSV file object and do the insert in the same action?
If not, here's the code for creating an uploaded filename:
https://code.google.com/p/web2py/source/browse/gluon/dal.py#9387. The
filename is of the form:
ta
you can pass a StringIO instance instead of the open(filename, 'rb')
To avoid the double-pass just create the csv as a StringIO stream and
insert it directly into the table with the db.tablename.field.store() as
the example you posted: web2py will save the file into the uploads/ folder
and
Anthony,
I had thought that the actual content of the stream was used in the hash.
But, reading your response, it seems that's not the case (and in fact why
would it). I will endevour to perhaps write the header record in the csv,
then insert into the upload table, and then write the bulk of the
Forgot to mention : web2py 2.4.7 postgres 9.1 under ubuntu 12.04 server 64
bit...
Richard
On Wed, Aug 7, 2013 at 5:00 PM, Richard wrote:
> Hello,
>
> Found this not working :
>
> db((db.mytable.id == 1) & (db.mytable.mybool != True).select()
>
> That translate as :
> SELECT * FROM mytable WHER
Hello,
Found this not working :
db((db.mytable.id == 1) & (db.mytable.mybool != True).select()
That translate as :
SELECT * FROM mytable WHERE mytable.id = 1 AND mytable.mybool <> 'T'
NO RECORD, BUT THERE IS A RECORD
If i change the select like this :
SELECT * FROM mytable WHERE mytable.id =
what did you expect ?
Any query with a filter (unless IS NOT NULL) doesn't take into account the
NULL value.
It's a pretty standard behaviour in any SQL backend.
If you need to get all rows with both False AND None values, you should do
db((db.mytable.id == 1) & ((db.mytable.mybool != True) | (
I expect it will include the NULL... I said different then TRUE I want the
rest... I didn't know I had to take care of this...
So I have to write this like that
db((db.mytable.id == 1) & (db.mytable.mybool != True) & (db.mytable.mybool
== None)).select()
Thanks
Richard
On Wed, Aug 7, 2013 at
Best thing to do would be to open an issue on Google code and either attach
a patch or make a pull request on Github.
Forum posts can get overlooked and/or forgotten...
Regards,
Ales
On Wednesday, August 7, 2013 3:17:01 PM UTC+2, mweissen wrote:
>
> About routes.py
>
> I have tried to use route
If you never used a db backend dealing with NULL values is a little bit
different than dealing with None in python.
While it's true that in python False != None and True != None, it's not the
same in SQL.
As much as the db engine knows, a column with a NULL value has no data to
compare with, so
ok for the book, but routes.py is ok.
if you notice, there's the r in front of the string that r means
"string literal", as in "literally this string", so \n, \t, etc don't get
interpreted and quoting isn't necessary (because it gets interpreted as a
byte string and not a string)
Actually, w
On 7 Aug 2013, at 3:19 PM, Niphlod wrote:
> ok for the book, but routes.py is ok.
> if you notice, there's the r in front of the string that r means "string
> literal", as in "literally this string", so \n, \t, etc don't get interpreted
> and quoting isn't necessary (because it gets interpre
Hi,
I need tu use websocket with ie 8.
A time ago i have read the tutorial in
http://greg.thehellings.com/2011/04/web2py-websockets-and-socket-io-part-i-basic-display/
But the site is down and i can find on google cache.
1.Can somebody post a simple example ?
2.is websocket_messaging.py compatib
I use Google Drive on all my machines to keep things synced up. I installed
web2py on my windows laptop in a folder in my Google Drive (I use the
windows client). Then I opened up web2py on my windows machine at work from
the same synced folder. I can open up the admin page an all but when I ope
No no no. You need the source version to be able to deploy on GAE.
On Wednesday, 7 August 2013 13:54:21 UTC-5, Morten Jeppesen wrote:
>
> Hi all
>
> I am trying to deploy on GAE through the admin interface (using the latest
> web2py build on Mac OS X).
>
> However I get this error message:
>
> Tr
is it hard to warn users of that or disable the button in the admin
interface? i probably wouldn't have caught that detail. :(
On Wednesday, August 7, 2013 4:26:50 PM UTC-7, Massimo Di Pierro wrote:
>
> No no no. You need the source version to be able to deploy on GAE.
>
> On Wednesday, 7 August
Thank you all.
That will solve what I want to do.
Best regards.
On Monday, August 5, 2013 11:15:59 PM UTC-3, Marcio Andrey Oliveira wrote:
>
> Hi.
>
> In Java there is the concept of URL filter chain (implemented by one or
> more servlets). These filters may intercept requests to a specif URL o
Not to be flip, but couldn't you just reverse the test and use
~(mytable.mybool==False)? That would be false for False and true for True
and None (NULL)
But I agree it is an interesting find, and I will watch out for this in my
own code. Thanks for posting!
-- Joe
On Wednesday, August 7, 20
I occasionally upload a file through admin panel,
i.e.
http://example.com/admin/default/design/welcome
I noticed when uploading to:
static/css
that *- *or transformed to *_*
*(dashes are changed to underscore)
*
Example:
I upload to static/css
css/my-file11.css
but once uploaded it is ch
Not able to upload data using CSV import tool, get the following error
(perhaps, web2py csv import tool needs to read it in using 'rU' option?) -
Running Version 2.5.1, Python 2.7, MacOSX. Tested it using a csv file
exported out using appadmin's Export/Import tool.
Unable to parse CSV file:
I currently have a "settings" page, where a form created by auth.profile()
is displayed. I want to force the user to re-enter his/her password in
order to save any changes they make to their profile (such as email,
username, etc).
Not really sure the best way to go about this, all the authentic
73 matches
Mail list logo