Hi all,
I define a table as below:
db.define_table('partner',
Field('name')
)
In controller, I use execute to get data:
sql = 'select name from partner'
rows = db.execute(sql)
In my laptop, type of rows is LIST, but in other computer in my company,
type of rows is ROWS.
So, when i print data,
hi stifan,
add this to db.py :
auth.settings.extra_fields['auth_user']=[Field('geolat','float'),
Field('geolng','float')]
db.auth_user._manual_entry = False
if not db.auth_user._manual_entry:
db.auth_user.geolat.readable = False
db.auth_user.geol
I saw the issue you posted but frankly I can't reproduce.
https://github.com/web2py/web2py/issues/1089
Can you please pack a minimal app AND the "client" app that pushes the
content web2py is unable to parse ? (even a curl line would suffice)
Thanks
>
>
--
Resources:
- http://web2py.com
- ht
the edit link isn't that hard to rebuild ...
/edit/tablename/record_id
On Saturday, October 24, 2015 at 1:02:31 PM UTC+2, Julian Sanchez wrote:
>
> Is there an easy way to trigger the same URL you get when pressing the
> built-in 'edit' button of the SQLFORM.grid without having to show tha
wait. all I can read from this post is "can I have a clean bs3 layout *without
web2py cruft* but *with web2py cruft* ?"
What's the cruft and what's the bare essential ?
On Saturday, October 24, 2015 at 8:27:17 AM UTC+2, pbreit wrote:
>
> I'm not sure what exactly I need in my template for Web2py
an update operation NEEDS an update() call.
given the records you want to update are defined by a condition, namely
db.table.column_1 == somevalue
and the update on column_2 resulting in all those records equal to
"somevalue_2", you need to write
db(db.table.column_1 == somevalue).update(colum
imho your "x" is a string rather than a dict.
you need to parse that string to a dict if you want your code to run.
On Monday, October 26, 2015 at 5:31:53 AM UTC+1, Alex Glaros wrote:
>
> feel dumb asking about this subject again but what is correct way to get
> the individual value?
>
> here is
BTW: Anthony's answer is the right one because with that you get the best
of both worlds. Mind that you can also disable completely reserved words
(check_reserved argument on the DAL connection) and be prepared to
fireworks when you'll choose something your backend can't distinguish.
Being a sa
Thanks for the heads-up!! Switching over to datetime as we speak (and
working pretty good!!!)
Best,
Julian
On Sunday, October 25, 2015 at 6:29:24 PM UTC-5, Anthony wrote:
>
> FYI, we're going to remove the timezone option from IS_DATE (which doesn't
> work anyway), so you're better off using a
Hi, I have a sqlform with four tabs. There is a main form and 4 additional
tabs. In each tab there is one grid with a related table to the one in the
main form (1 to many relationship), and they are loaded gracefully using
the LOAD function and ajax.
In my first version, I used a separate funct
By the way, I just noticed pushing the "Back" button in the main form (not
loaded with ajax, just a normal grid created by a controller), that it is
also pointing to the url of the last loaded grid. Probable another side
effect of the same problem.
Best regards.
El lunes, 26 de octubre de 2015
Google slipped in support for DISTINCT in its GQL SELECT in 2013.
Are there any plans to add this to the DAL?
Ref: https://cloud.google.com/datastore/docs/apis/gql/gql_reference
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
You can try filling the `formname` argument of SQLFORM.grid().
--
Vinicius Assef
On 26 October 2015 at 08:45, Carlos Kitu wrote:
> By the way, I just noticed pushing the "Back" button in the main form (not
> loaded with ajax, just a normal grid created by a controller), that it is
> also p
Vinicius, thank you so much for your help. It worked fine.
Best regards.
El lunes, 26 de octubre de 2015, 12:11:21 (UTC+1), Vinicius Assef escribió:
>
> You can try filling the `formname` argument of SQLFORM.grid().
>
>
>
>
> --
> Vinicius Assef
>
>
>
> On 26 October 2015 at 08:45, Carlos Kitu
>
Here's my Web2py-driven Python:
db = current.db
rows = db().select(db.person.name, distinct=db.person.name)
for row in rows:
logging.info('name: %s' % row.name)
This logs all rows from person, listing many duplicate name values.
The equivalent GQL I've tried is:
rows = g
Is there a web2py example using this?
On Sunday, October 25, 2015 at 2:16:24 PM UTC-4, Massimo Di Pierro wrote:
>
> Docs say: This is a server for SMTP and related protocols, similar in
> utility to the standard library’s smtpd.py module, but rewritten to be
> based on asyncio for Python 3.
>
>
The Google Datastore adapter doesn't use GQL but instead uses the Python
NDB datastore API. I think you can add the distinct=True argument to the
.query() method (at least for projection queries), so you might try
subclassing pydal.adapters.google_adapters.GoogleDatastoreAdapter and
customize i
I think what Donald is talking about arrive when migrate or pool_size are
missing... In line if in the connection string can do the tricks... But it
more hacky... I would make a default AppConfig file and an user or
application AppConfig file where application AppConfig override the default
one of
I opened this issue : https://github.com/web2py/web2py/issues/1093
On Mon, Oct 26, 2015 at 9:59 AM, Richard Vézina wrote:
> I think what Donald is talking about arrive when migrate or pool_size are
> missing... In line if in the connection string can do the tricks... But it
> more hacky... I wou
So, I took a stab at Ivica's post. Created the db in my model file as:
db.define_table("contact_form",
Field("your_name", "string"),
Field("your_email",
requires=IS_EMPTY_OR(IS_EMAIL(error_message='invalid email'))),
Field("your_phone_number", "stri
@ron: these are questions that rise kinda for nothing.
first, it's a project for python 3.x , leveraging asyncio, that is not
there in python 2.x (which web2py leverages).
second, it's a SMTP server: running it inside a webserver (web2py) is silly.
On Monday, October 26, 2015 at 2:09:07 PM UTC+1
2.12.3-stable+timestamp.2015.08.19.00.18.03
(Running on Apache/2.4.7 (Ubuntu), Python 2.7.6)
---
from gluon.tools import fetch
def index():
page = fetch('http://my_url')
return page
Hi everyone,
I am asking this because new style virtual field is marked as experimental
in the web2py book. what happens if an application using virtual fields is
deployed and the command syntax changes ? will the new syntax/api be
backward compatible ?
ps: I know virtual fields wont explode
.executesql() doesn't return a Rows object unless you pass in fields. Are
you showing the *exact* code? Did you copy the exact application from one
machine and move it to another, or are there any differences at all?
Anthony
On Monday, October 26, 2015 at 3:29:40 AM UTC-4, DucVa wrote:
>
> Hi a
We should probably remove the "experimental" label -- the "new" style is
now several years old. I think it's safe.
Anthony
On Monday, October 26, 2015 at 12:29:16 PM UTC-4, Pierre wrote:
>
> Hi everyone,
>
> I am asking this because new style virtual field is marked as experimental
> in the web
posting the exception may help.
On Monday, October 26, 2015 at 5:10:31 PM UTC+1, sa wrote:
>
> 2.12.3-stable+timestamp.2015.08.19.00.18.03
> (Running on Apache/2.4.7 (Ubuntu), Python 2.7.6)
>
> ---
>
> from gluon.tools imp
This continues to be an issue. http://127.0.0.1:8000/appadmin redirects to
URL('default', 'index'). Any thoughts?
On Friday, October 9, 2015 at 3:49:16 PM UTC-6, Leonel Câmara wrote:
>
> Deleting welcome shouldn't cause problems for your existing apps, as it
> should use the appadmin in myapp's
You seem to be going into infinite recursion because index is fetching
index which fetches index which fetches index ad infinitum.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/
fantastic !!!
nothing is better than web2py
Le lundi 26 octobre 2015 17:33:20 UTC+1, Anthony a écrit :
>
> We should probably remove the "experimental" label -- the "new" style is
> now several years old. I think it's safe.
>
> Anthony
>
> On Monday, October 26, 2015 at 12:29:16 PM UTC-4, Pierr
It turns out I needed to make my gmail account less secured in order for
the email to pass through. And as expected, this wasn't a web2py issue.
This was leonel's solution. Thank you Leonel!
P.S.: https://www.google.com/settings/security/lesssecureapps
On Monday, October 26, 2015 at 10:35:43
Ok I've done some testing and found a couple of typos, including,
tools.py - line 3283:
if not self.setting.bulk_register_enabled:
should be
if not self.settings.bulk_register_enabled:
This results in an exception preventing the feature from working.
I tried submitting a pull request bu
I created a CMS a few years ago now in web2py... It is fairly basic
compared to Carlos one.
I have a test website for a client on GAE
http://badevday-test.appspot.com/
to access the backend
http://badevday-test.appspot.com/admin
login: user-gr...@web2py.com
password: passw0rd
It doesn't have
I've used gmail app password on one of my website (gmail two step auth is
enabled) and I haven't experienced any issues. I guess... it could be insecure
if somebody can access your web2py admin page (admin should be disabled in
anyway) or somebody cracks your hosting account login (e.g. pythonan
On Monday, October 26, 2015 at 9:38:41 AM UTC-7, weheh wrote:
>
> This continues to be an issue. http://127.0.0.1:8000/appadmin redirects
> to URL('default', 'index'). Any thoughts?
>
What's in your httpserver.log, or the equivalent for your engine?
Do you have an /applications//controllers/ap
what do you have in your routes.py?
--
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 Gro
Hi I have a table with upload field and i will report a row of this table
in view. I try to create a form in readonly mode and print in the view but
I see only the string file..How i can report the row in the view with the
file that the user can download and with the image rapresentation of the
Can i create a sqlform grid with one row and open directly in view mode?
On Tuesday, 27 October 2015 00:48:07 UTC+1, Alessio Varalta wrote:
>
> Hi I have a table with upload field and i will report a row of this table
> in view. I try to create a form in readonly mode and print in the view but
>
Ok That was wrong. mod_wsgi was 3.4
On Thursday, October 22, 2015 at 3:46:42 PM UTC-7, Michael M wrote:
>
> Is it Possible that the DAL is talking Python 3.4 when my driver is Python
> 2.7. So when I call it in Web2py from CLI it works but when the framework
> is running its trying to call 3
On Monday, October 26, 2015 at 4:48:07 PM UTC-7, Alessio Varalta wrote:
>
> Hi I have a table with upload field and i will report a row of this table
> in view. I try to create a form in readonly mode and print in the view but
> I see only the string file..How i can report the row in the view w
Hi,
Is it possible to GET an answer with a setup restfull service with
parse_as_rest with:
/rest/table_name?id=1
that is equivalent to the working:
/rest/table_name/id/1
?
Morever with more parameters:
/rest/table_name?id=1&name=Toto
Mike
--
Resources:
- http://web2py.com
- http://
So i noticed something. I was in root when when I was seeing cx_Oracle:
# python web2py.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2015
Version 2.12.3-stable+timestamp.2015.08.19.00.18.03
Database drivers available: sqlite3, imaplib, cx_Oracle, pymysql, pg8000
When I
41 matches
Mail list logo