I have a single web2py instance running on my localhost. And I have defined
these functions in a controller and displaying the obtained using their
respective views. I'm testing them by opening appropriate urls likes
localhost:8000/application/controller/function.
In first case it returns the
If u have got the answer then please share with us also.
On Wednesday, July 9, 2014 4:30:59 AM UTC+5:30, Fabiano Almeida wrote:
Hi,
Has like 'accepted' attribute in SQLEDITABLE?
I need redirect to other page after 'ok' click.
Thanks,
Fabiano.
--
Resources:
- http://web2py.com
-
I am trying to run web2py application from command line with such a command:
C:\Python27\python.exe T:/MyFolder//web2py.py -a 'recycle' --config=
parameters_8080.py
and I have specified my application's settings in the file called
parameters_8080.py:
password=
Hello to everybody,
I am running web2py on pythonanywhere platform and the TODO element at the
bottom left corner of the code editor keeps loading forever.
The pythonanywhere system recognize this and consider it a sign that my app
has crushed and so it pushes it down and reload.
The result of
It seems that
if is_gae:
in gluon.sqlhtml.AutocompleteWidget.callback is not set properly on GAE
devserver. If I change that line with:
if self.request.global_settings.web2py_runtime_gae:
autocomplete is working fine.
BW
Genadij
--
Resources:
- http://web2py.com
- http://web2py.com/book
This is the function for deleting a record from database.
def pro_del():
d = request.args
db(db.products.product_id == d).delete()
session.flash = Product Deleted
redirect(URL('default','index'))
#return locals()
The id is successfully getting passed to
hello,
how can we do to configure sublime text 3 to work web2py
--
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
On Mon, Jul 7, 2014 at 3:16 AM, Vinicius Assef vinicius...@gmail.com
wrote:
Ricardo, very nice your solution.
Below, I wrote some questions about it.
On Sunday, 6 July 2014 02:01:23 UTC-5, Ricardo Pedroso wrote:
- search is powered by whoosh and bottle - Web2py is querying through a
Hello dlypka,
I was investigating this, but after reading the docs I'm a bit confused:
- To use the scheduler in a module what should i do? Create a scheduler.py
model and pass the scheduler created in the model to the function in my
module as I do with my db?
- Can I start and stop the task
Il 09/07/14 10:32, samurai ha scritto:
def pro_del():
d = request.args
db(db.products.product_id == d).delete()
session.flash = Product Deleted
redirect(URL('default','index'))
#return locals()
try this:
def pro_del():
d = request.args(0) or
Thank you, Ricardo.
It's clear, now.
On Mon, Jul 7, 2014 at 3:50 PM, Ricardo Pedroso rmdpedr...@gmail.com wrote:
On Mon, Jul 7, 2014 at 3:16 AM, Vinicius Assef vinicius...@gmail.com
wrote:
Ricardo, very nice your solution.
Below, I wrote some questions about it.
On Sunday, 6 July 2014
Hi Samurai,
I tried other way: use 2 buttons: sqleditable submit to save grid, then a
second button to process new data and redirect to other page. I think this
is not the best way...
Fabiano.
2014-07-09 5:33 GMT-03:00 samurai shub.jain1...@gmail.com:
If u have got the answer then please
You should in fact use a different filename for your --config. The
paramater_.py file is meant to contain only the password and it can be
overwritten by web2py if you change your password using the admin interface.
On Tuesday, 8 July 2014 06:40:20 UTC-5, Kuba Kozłowicz wrote:
I am trying to
Can you check if the fix in trunk works for you? Thanks for reporting this
problem.
On Tuesday, 8 July 2014 07:26:13 UTC-5, genadij razdorov wrote:
It seems that
if is_gae:
in gluon.sqlhtml.AutocompleteWidget.callback is not set properly on GAE
devserver. If I change that line with:
if
The point of the signature is to digitally sign a URL. If you change the
url manually the signature is no longer valid.
On Tuesday, 8 July 2014 08:27:24 UTC-5, Yebach wrote:
Hello
When I try to put form = SQLFORM.grid(db.mytable) in my controller the
request changes to
Yes. It should be appended... I see there is a pending patch. Will apply
asap.
On Tuesday, 8 July 2014 15:30:45 UTC-5, Anthony wrote:
In DAL.sqlhtml_validators, we have:
if field.unique:
requires.insert(0,validators.IS_NOT_IN_DB(db,field))
I wonder why IS_NOT_IN_DB is
If your problem is the lack of autocompletion try add gluon to path and
include if 0: from gluon import * on your files. Everything else should
work out of the box.
On Wednesday, 9 July 2014 04:29:49 UTC-5, eric cuver wrote:
hello,
how can we do to configure sublime text 3 to work web2py
Thanks Manuele. Just writing (0) worked for me as my product_id is'nt an
int type. Its alphanumeric.
On Wednesday, July 9, 2014 4:32:55 PM UTC+5:30, Manuele wrote:
Il 09/07/14 10:32, samurai ha scritto:
def pro_del():
d = request.args
db(db.products.product_id ==
Hi.
You can write same as SQLFORM.
example.
def demo070():
response.title = 'demo070'
response.view = 'plugin_sqleditable/sample.html'
editable = SQLEDITABLE(db.employee_sheet, showid=False, maxrow=5)
if editable.accepts(request.vars, session):
response.flash =
I was thinking the other day it's so unfortunate that web2py has to live in
the shadow of the great Django. As Massimo pointed out a while ago, the
reason is because Django gets great PR. And Django users are a very vocal
bunch.
You can't walk the web framework landscape without tripping over
Hi Jim,
Thanks for you reply.
I've been working on this function on and off, so far this works:
In the view:
script type=text/javascript
$(function() {$(#no_table_name).autocomplete({source: {{=URL('jqueryui',
'organization_autocomplete')}}, minLength: 2});});
$(function()
It should not return zero, it should return the number of deleted rows. The
purpose of using a DAL is to abstract away this kind of differences.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
It should be:
d = request.args(0)
--
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
Hi,
On 09/07/14 13:31, horridohobbyist wrote:
Let's improve web2py's PR. A blast of articles over the next year could
change the fortunes of our favourite web framework.
Good piece, great finish.
I'll take that as a challenge, and see if I can describe my own journey
from desktop databases
I like it.
I wonder if we could do it in an organized in some way.
Recently I lost to convince my boss to change everything to web2py because
there are few developers that know it.
So it would be very good to have a massive community. As we will have more
opportunities to work on the framework
Note, the pending patch makes the change only in the case of SQLite with
date and time fields, so it will need to be altered to make the change
universal.
Anthony
On Wednesday, July 9, 2014 8:12:01 AM UTC-4, Massimo Di Pierro wrote:
Yes. It should be appended... I see there is a pending
There are some examples in the web2py's book
http://web2py.com/books/default/chapter/29/10/services#SOAP and lots of
more in pysimplesoap repository https://code.google.com/p/pysimplesoap/,
as Massimo said. Besides, I just created a WS and a SOAP client with basic
authentication and I used
There is any authentication on that? If yes, you should try something like
this:
server = ServerProxy('http://'+ ws_user + ':' + ws_pass + '
@127.0.0.1:8000/app22/default/call/jsonrpc
http://127.0.0.1:8000/app22/default/call/jsonrpc')
And If you created by yourself the WS through web2py, make
db.auth_user._before_update.append(lambda s,f: before_trigger_auth(s,f))
db.auth_user._after_update.append(lambda s,f: after_trigger_auth(s,f))
First, note that if your callback is just an existing function that takes
the parameters as they will be passed, there is no need to wrap it in a
Hi Kato,
Thanks again!!
Fabiano.
2014-07-09 8:52 GMT-03:00 'kato' via web2py-users web2py@googlegroups.com:
Hi.
You can write same as SQLFORM.
example.
def demo070():
response.title = 'demo070'
response.view = 'plugin_sqleditable/sample.html'
editable =
Can you show your delete code that generated SQL without any condition?
On Tuesday, July 8, 2014 1:18:45 PM UTC-4, Leonel Câmara wrote:
I noticed I was getting zero returned from my deletes. After reading the
python docs I found this:
With SQLite versions before 3.6.5, rowcount
Hello web2py community!
I created a shell script that essentially checks if web2py is running or
not. Every hour CRON will run my script. If web2py is not running then it
starts web2py from source with the following:
export web2py_path=/Users/superman/desktop/web2py
export port=8000
cd
You mean in the OS dir path??
On Wednesday, July 9, 2014 7:13:46 AM UTC-5, Massimo Di Pierro wrote:
If your problem is the lack of autocompletion try add gluon to path and
include if 0: from gluon import * on your files. Everything else should
work out of the box.
On Wednesday, 9 July
Say you want to develop and distribute a plugin, and that this plugin
relies on a third-party module or package.
For the example, we'll say the third-party is matplotlib.
In order to distribute your plugin, you'd need give instructions so that
your plugin's users install matplotlib either in
The code was literally just this line:
count = db(db.static_page.id == request.args(0)).delete()
I have no idea why the sql is going without a condition, the static page
does get deleted. I only noticed the problem because the next lines were:
if not count:
raise
Humm wait a minute, could this be because I enabled versioning and nothing
is in fact deleted?
--
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
I think this would help a lot web2py.
I can share some personal experience. In my experience the best articles
are those that show how to build something and focus on one feature at the
time. People are very religious about certain frameworks and for the
message to get across one really has to
I do know sublime text. I am assuming there is a way to tell it where to
look for python modules for autocomplete.
On Wednesday, 9 July 2014 10:06:25 UTC-5, JorgeH wrote:
You mean in the OS dir path??
On Wednesday, July 9, 2014 7:13:46 AM UTC-5, Massimo Di Pierro wrote:
If your problem is
yes/.That is it. Please open a ticket about this, it may be considered a
bug even if we should discuss it on web2py-developers. Not so clear cut.
On Wednesday, 9 July 2014 10:16:10 UTC-5, Leonel Câmara wrote:
Humm wait a minute, could this be because I enabled versioning and nothing
is in
I do not understand how to do it to add the folder gluon to path
Le mercredi 9 juillet 2014 14:13:46 UTC+2, Massimo Di Pierro a écrit :
If your problem is the lack of autocompletion try add gluon to path and
include if 0: from gluon import * on your files. Everything else should
work out
I was a little wrong. If you want to redirect, and will not work because
such in the ajax.
Please write as the following.
def demo050():
response.title = 'demo050'
response.view = 'plugin_sqleditable/sample.html'
editable = SQLEDITABLE(db.employee_sheet, showid=False, maxrow=5,
I agree with you Massimo, the best ones are those that built something.
Videos like this http://vimeo.com/6782736 helped me to decide to stay with
web2py.
Not only that title is quite marketish but content is so true.
2014-07-09 12:28 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com:
I
Hi,
How to make a query with multiple values to field?
q = db(db.auth_membership.group_id in [2,3,4]).select()
thanks,
Fabiano.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Thanks Kato!
Fabiano.
2014-07-09 9:24 GMT-03:00 'kato' via web2py-users web2py@googlegroups.com:
I was a little wrong. If you want to redirect, and will not work because
such in the ajax.
Please write as the following.
def demo050():
response.title = 'demo050'
response.view =
I agree, web2py is a pragmatic framework. so the best way to make it
shine is comparing how to get something done: there is not (only)
theoretical blather behind it, facts and results drive web2py from the
start.
Usually is better avoiding critics towards others, but rather underline the
Use contains [1].
[1]
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#like--regexp--startswith--endswith--contains--upper--lower
On Wed, Jul 9, 2014 at 12:47 PM, Fabiano Almeida fabi...@techno7.com.br wrote:
Hi,
How to make a query with multiple values to field?
Thanks everyone for helping me sort this out, issue submitted:
https://code.google.com/p/web2py/issues/detail?id=1948
--
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
q = db(db.auth_membership.group_id.belongs([2,3,4]).select()
Also see:
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#belongs
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Hi Vinicius,
I tested it contains, but it did not work with integer field.
Thanks,
Fabiano.
2014-07-09 12:55 GMT-03:00 Vinicius Assef vinicius...@gmail.com:
Use contains [1].
[1]
Hi Leonel,
belongs solve my question.
Thanks.
Fabiano.
2014-07-09 13:02 GMT-03:00 Leonel Câmara leonelcam...@gmail.com:
q = db(db.auth_membership.group_id.belongs([2,3,4]).select()
Also see:
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#belongs
--
Thanks for the tip
And yet...
Could you post a fool-proof example?
Thanks
On Wednesday, July 9, 2014 10:31:36 AM UTC-5, Massimo Di Pierro wrote:
I do know sublime text. I am assuming there is a way to tell it where to
look for python modules for autocomplete.
On Wednesday, 9 July 2014
Hi,
I'm trying to do a join table auth_user and auth_membership. I need the
list of users with membership.group_id in [2,3,4].
I tried to create a query for membership before the join, but it did not
work.
Is to make this join? How?
Thanks in advance,
Fabiano.
--
Resources:
-
list_of_users_in_all_groups = db( (db.auth_membership.group_id.belongs([2,
3, 4])) (db.auth_membership.userd_id == db.auth_user.id)
).select(db.auth_user.ALL)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Is the most efficient way to just modify the json before I perform the
bulk_insert? Or should I break out the fields individually.
On Tuesday, July 8, 2014 10:37:00 PM UTC-4, LoveWeb2py wrote:
I have data in json format and I love the db.table.bulk_insert(jsondata)
feature
However, if I
This is a sublime text question - if you search, many have suggested using
this tool:
https://github.com/SublimeCodeIntel/SublimeCodeIntel
On Wednesday, July 9, 2014 12:24:28 PM UTC-4, JorgeH wrote:
Thanks for the tip
And yet...
Could you post a fool-proof example?
Thanks
On
Great Leonel!
Thanks a lot!
Fabiano.
2014-07-09 13:31 GMT-03:00 Leonel Câmara leonelcam...@gmail.com:
list_of_users_in_all_groups = db( (db.auth_membership.group_id.belongs([2,
3, 4])) (db.auth_membership.userd_id == db.auth_user.id)
).select(db.auth_user.ALL)
--
Resources:
-
Excellent point. We don't need to criticize Django. We can compare Django
and web2py side by side, and show how web2py makes the job so much easier.
Which brings up another point...
One of the most common refrains I hear about Django vs something like
web2py is that when you scale to really
Is it possible to use detect_record_change while submitting an edit with
SQLFORM.grid. I'm talking the remotely possible but still possible case
where two users choose to edit the same record simultaneously. Just the
first one to submit her/his change should be successful. The second one
Hi again,
It's possible insert virtual field in auth_user? how?
thanks,
Fabiano.
--
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
Hi @all!
I am using SQLFORM.grid extensively in my application. How to visually mark
the required fields on the form when the user adds record?
Thanks in advance,
Fabiano.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
You can do something like this in your models:
required = SPAN('* required', _class='required')
db.define_table('mytable', Field('myfield', comment=required))
Use CSS to style the comment (e.g., make the text red).
Anthony
On Wednesday, July 9, 2014 4:08:00 PM UTC-4, Fabiano Almeida wrote:
There is also this plugin, which automates the process based on field
validators: http://dev.s-cubism.com/plugin_notemptymarker
Anthony
On Wednesday, July 9, 2014 5:12:57 PM UTC-4, Anthony wrote:
You can do something like this in your models:
required = SPAN('* required', _class='required')
It turns out that Cron didn't have access to cx_Oracle because it wasn't in
the environment. Oops, should have checked that out first thing!
On Wednesday, July 9, 2014 9:57:05 AM UTC-5, Michael Gheith wrote:
Hello web2py community!
I created a shell script that essentially checks if web2py
Some ajax links that used to work have just broken and I'm not sure where
to start in debugging. The links target a load component on the page (using
cid) and they have started throwing this error:
Syntax error, unrecognized expression:
I'm with some problems here... I really hate .table files.
That's my deploy routine:
1. download web2py from src
2. get my application from git and put inside web2py
3. remove some unused folders
4. backup my database
5. migrate my database structure *(that's the point!!)*
6.
Hi Anthony,
Great plugin!
Thanks,
Fabiano.
2014-07-09 18:15 GMT-03:00 Anthony abasta...@gmail.com:
There is also this plugin, which automates the process based on field
validators: http://dev.s-cubism.com/plugin_notemptymarker
Anthony
On Wednesday, July 9, 2014 5:12:57 PM UTC-4,
My fault. I meant belongs, as Leonel wrote.
On Wed, Jul 9, 2014 at 1:16 PM, Fabiano Almeida fabi...@techno7.com.br wrote:
Hi Vinicius,
I tested it contains, but it did not work with integer field.
Thanks,
Fabiano.
2014-07-09 12:55 GMT-03:00 Vinicius Assef vinicius...@gmail.com:
Use
I ran into something similar. If you use versioning, you need to create
your own function to delete the item, which is in fact, to just disable
the entry and then filter all searches by excluding the deleted entries,
otherwise it would break your foreign key links to the other (versioning)
Hello,
I have an app runing in production on Apache and sometimes when navigating
over it I receive a ticket with a lambda error. It happens ramdomly in a
way that I wasn't able to predict what was causing it: already ocurred in a
function called dashboard, in another called invite and some
Did you change auth.settings.on_failed_authentication from its default
value?
On Wednesday, July 9, 2014 8:11:25 PM UTC-4, Júlia Rizza wrote:
Hello,
I have an app runing in production on Apache and sometimes when navigating
over it I receive a ticket with a lambda error. It happens
Also, what version of web2py?
On Wednesday, July 9, 2014 8:31:19 PM UTC-4, Anthony wrote:
Did you change auth.settings.on_failed_authentication from its default
value?
On Wednesday, July 9, 2014 8:11:25 PM UTC-4, Júlia Rizza wrote:
Hello,
I have an app runing in production on Apache and
I've completely forgot about the on_failed_authentication, sorry.
*models/db.py*
auth.settings.on_failed_authentication = lambda: redirect(URL('painel',
'index'))
(web2py version 2.8.2-stable)
Em quarta-feira, 9 de julho de 2014 21h31min19s UTC-3, Anthony escreveu:
Did you change
If you just want to specify a URL for redirect, you can do so without the
lambda:
auth.settings.on_failed_authentication = URL('painel', 'index')
However, if you do define a lambda (or any callable), it should accept an
argument.
Anthony
On Wednesday, July 9, 2014 9:31:17 PM UTC-4, Júlia
Thanks Anthony :)
--
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
74 matches
Mail list logo