you say form = SQLFORM.grid() but this is not a form, this is a grid
even if you call it form. Therefore there is no form.process(), there is no
form.accepted, there is no form.errors etc. This if not a form.
A grid MAY contain a form so you should do:
grid = SQLFORM.grid()
if grid.create_f
I understand you should not use return but you should build a response, for
example:
def index():
import requests
import json
url = "https://10.10.10.1/wapi/2/";
object_type = "config_templates/search"
data = requests.get(url + object_type, verify=False, auth=('myuser',
'myp
currently no.
On Monday, 21 July 2014 16:02:57 UTC-5, chuan137 wrote:
>
> Example of parse_as_rest function, there define tables
>
> db.define_table('person',Field('name'),Field('info'))
> db.define_table('pet',Field('ownedby',db.person),Field('name'),Field(
> 'info'))
>
> which are served with th
When you inspect the generated html with chrome is the content there? It
may be an html issue, perhaps you should use an iFrame. Hard to say without
seeing the source.
On Monday, 21 July 2014 08:58:32 UTC-5, David Jobes wrote:
>
> I am trying to call a web page from within a function it works fi
web2py does not allow selecting only part of a JSON field. Sorry.
On Monday, 21 July 2014 08:51:59 UTC-5, Nicola Barbieri wrote:
>
>
> Hi everyone,
>
> I'm a web2py newbie and I'm having some hard time with the following
> simple task:
>
> I would like to show in a page all the records stored in
Look into the scripts folder. There are installation scripts for both
apache and nginx on various architectures. Just run the proper script and
it will setup everything.
Anyway, rocket is really fast. Only serving static files is faster in
Apache and Nginx.
On Monday, 21 July 2014 06:29:24 UTC
Looks like everything I do with form.* after I declare it in my controller
I get an error
What am I doing wrong here?
2014-07-22 8:15 GMT+02:00 Vid Ogris :
> If I use
> if form.accepted:
>
> I still get an error
> 'DIV' object has no attribute 'accepted'
>
> I put {{=response.flash}} in my vie
Please open a ticket. Perhaps this should be the default behavior. Easy to
change.
On Monday, 21 July 2014 14:59:34 UTC-5, Mark Li wrote:
>
> Maybe I'm not going about this in the right way. I basically want
> auth.register() functionality, but without a page reload on registration
> fail; just
Please open a ticket about this.
On Monday, 21 July 2014 11:15:36 UTC-5, Ramos wrote:
>
> Hello @Massimo, any news about this?
>
> Em quarta-feira, 21 de setembro de 2011 18h23min18s UTC+1, Massimo Di
> Pierro escreveu:
>>
>> I see the need for this. I need to think bout how to do it in a
>> bac
Example of parse_as_rest function, there define tables
db.define_table('person',Field('name'),Field('info'))
db.define_table('pet',Field('ownedby',db.person),Field('name'),Field('info'
))
which are served with the pattern
"/{person.name}/pets[pet.ownedby]/{pet.name}".
That means a valid URL i
Hi there,
I tweaked a couple of codes of a pagination demo, but it doesn't worked for
me because the page is refreshed, I'm wanting add a button which always
gets the next 10 rows from a table when clicked, so that contents is loaded
always below, like an infinite scroll. I've seen a lot of exa
Massimo,
Thanks for replying, I'm both new to Python and web2py (loving it so far)
Here is an example of the JSON file this is showing one device config
return:
{
"config_templates": [
{
"_class": "ConfigTemplate",
"created_at": "2012-02-24 11:37:53",
web2py rocket server is too slow for my application.
Can somebody share step by step instruction to install Apache or nginx web
server?
I want to install nginx server on Ubuntu.
Kindly help.
Regards,
Jaiprakash
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- ht
I am trying to call a web page from within a function it works fine, except
for the fact that it only shows the raw html page and not a the rendered
page i need, have tried all the urllib2 methods and still not luck, here is
code, any ideas or sugggestions.
def vrt():
fup_form =
FORM(INPUT
Hi everyone,
I'm a web2py newbie and I'm having some hard time with the following simple
task:
I would like to show in a page all the records stored in the following
MongoDB document (called requests):
{
"request": {
"slice": [
{
"origin": "SFO",
"destination": "MI
Hi Anthony,
The code I've posted is working, this is that I define a boolean in the
SQLCustomType as orginial field type, but in the check I need to check
against a string. That's weird (in my opinion). When you define a boolean,
you would expect that you need to check for a boolean in the deco
If I use
if form.accepted:
I still get an error
'DIV' object has no attribute 'accepted'
I put {{=response.flash}} in my view
2014-07-21 16:05 GMT+02:00 Anthony :
> The message is in response.flash, so you need to display that in your view
> somewhere (it is already present in the layout.html
Yes, you're allowed to bump. Use the browser developer tools to see what
gets sent to the server when you submit the form. Perhaps the problem is
with the JavaScript on the client side.
Anthony
On Monday, July 21, 2014 8:18:30 PM UTC-4, Frank Buibish wrote:
>
> Am I allowed to bump in this foru
Am I allowed to bump in this forum? if not this shall be the last
time...most likely
On Thursday, July 17, 2014 10:43:56 PM UTC-4, Frank Buibish wrote:
>
>
> Bench
>
>
> They get added through javascript from the first select element.
>
> On Thursday, July 17, 2014 10:14:17 PM UTC-4, Anthony
Thanks Niphlod, its the latter. A question just concerning rname/ quoting
101.
Haven't used it before, and trying baby steps to see how it works.
A simple working example would give me a push in the right direction.
While Limedrop raises interesting points which I''ll explore but its not
where
This is a great example, but it focuses on the user coming from two
different domains. Let's say for example that we wanted our app called
app1, which is running on localhost with many other applications to be
distinguishable. How would we modify the regular expression to handle that
case?
T
You only need to save d['id'], the reminder is optional you can retrieve
from stripe any time using the check() method.
Unless you want to do relational queries on each field, you may just store
the received JSON in a json type field
2014-07-21 10:53 GMT+02:00 ceriox :
> this is the Stripe inte
Maybe I'm not going about this in the right way. I basically want
auth.register() functionality, but without a page reload on registration
fail; just a flash msg of the error.
On Monday, July 21, 2014 12:07:05 PM UTC-7, Mark Li wrote:
>
> Is it possible to return the registration error msg from
wait a sec.
there are two distinct set of "problems". One is avoiding using reserved
keywords, that is a "bad choice" in respect of what usually are "verbs" in
t-sql dialects. in this matter, the check_reserved argument deals with
(most of) them avoiding to create some table or some field named
Is it possible to return the registration error msg from
auth.register_bare(), similar to how auth.register() would display the
error msg after submit? From what I can gather in the source, seems like it
only returns False on fail, and the user object on success. I would like to
display more in
Thanks but basically, all we're trying to do is to specifically map the DAL
field name to the name as stored in the database, and ascertain why our
original scenario/ approach fails.
(reserved names maybe only a subset of issues we're trying to avoid.
Have a feeling that a QUOTE_TEMPLATE solutio
Hello @Massimo, any news about this?
Em quarta-feira, 21 de setembro de 2011 18h23min18s UTC+1, Massimo Di
Pierro escreveu:
>
> I see the need for this. I need to think bout how to do it in a
> backward compatible way and in a way that works on GAE without joins.
> Please open a ticket about it
Hi Joe,
I suppose that my proposal to use shlex would really apply to Peter's
suggestion.
I guess it might also be considered for use in the build_query function of
sqlhtml.py.
Shlex seems like a great way of using quotes to contain search phrases. I
guess Google would be using something s
The message is in response.flash, so you need to display that in your view
somewhere (it is already present in the layout.html of the scaffolding app).
Anthony
On Monday, July 21, 2014 8:23:16 AM UTC-4, Yebach wrote:
>
> Thank you on fast reply
>
> How do I present this message in my view?
>
>
>
Thank you on fast reply
How do I present this message in my view?
2014-07-21 14:13 GMT+02:00 Anthony :
> Do not call the .process method on a grid -- it automatically does the
> processing itself. If you don't like the default flash messages, you can do:
>
> if form.accepted:
>
> or:
>
> SQLFOR
Do not call the .process method on a grid -- it automatically does the
processing itself. If you don't like the default flash messages, you can do:
if form.accepted:
or:
SQLFORM.grid(..., formargs=dict(message_onsuccess='form accepted',
message_onfailure='form ha
I added this to my user.html view to solve this problem:
if request.args(0)=='register':
form.element(_id='auth_user_password_two__row', replace = lambda el :
DIV(
LABEL(T('Verify Password'),':', _class='col-lg-2 control-label'),
DIV(INPUT(_name='password_two', _type='password
Hello
I have a SQLForm.grid.
I want to create a response.flash message but on my if evaluation I get an
error when my edit view is done
'DIV' object has no attribute 'process'
even on my sqlform.grid view
this is my controller function
form = SQLFORM.grid(query=query,
left=db.stat
this is the Stripe integration example from the manual
from gluon.contrib.stripe import Stripe
stripe = Stripe(api_key)
d = stripe.charge(amount=100,
currency='usd',
card_number='4242424242424242',
card_exp_month='5',
card_exp_year='2012',
No without some work.
You can create a database view and expose that as a web2py table (but I am
not sure sqlite supports table views).
You can create a database in memory and copy the results of the select
there and use that as a new table.
But why?
On Monday, 21 July 2014 02:24:27 UTC-5, ce
Sorry. You are right it appears formstyle_bootstrap3 does not address the
case of the password field. This has to be fixed. Perhaps you can help us
by looking into the current sqlhtml.py, function formstyle_bootstrap3 and
see why it is broken. Otherwise, if you open a ticket about this we will
Thanx.
Works like a charm.
One more question though. How to change the links in table for view, Edit,
delete. Now I have only hyperlinked text, while I would like to have
buttons?
2014-07-16 16:21 GMT+02:00 Anthony :
> #Validators
>> * db.worker.w_status.requires = IS_IN_DB(db,db.status.s_code
This worked for me on postgresql 9.1...
db = DAL('%s%s' % (dal_connection, app_database))
rname = db._adapter.__class__.QUOTE_TEMPLATE % 'ALL'
db.define_table('test', Field('whatever', rname=rname))
Note that I used "ALL" rather than "position" as position is not a reserved
word on postgresql
Hi all,
it is possible to create a table from a recordset?
something like this for example:
db.define_table('t_log', log_results)
thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py
39 matches
Mail list logo