Our policy is that request.env is just the wsgi environment, without
computed variables.
Perhaps this?
if not request.env.content_type and request.env.http_content_type:
request.content_type = request.env.http_content_type
else:
request.content_type = request.http_content_type
On
You want an event on the server (form submit) trigger an event in the
client (reload a page). This is not how http work. It cannot be done with
http. It must be done using websockets. I.e. Both pages must open a web
socket (using for example gluon/contrib/websocket_messaging.py) and the
server
Folks here are the best. For start we tend to be nice to and respectful of
people who use other frameworks and we try to learn from them to improve
ours.
On Thursday, 1 August 2013 20:20:48 UTC-5, Jake Angulo wrote:
Hi Massimo,
It worked like a charm!
I changed your code a bit to fit my
The problem is that you never give the current use the permission to
create. You only run this line
auth.add_permission(group_id, 'create', db.contacts)
after the call to create. You need to call it once before, or create the
permission via appadmin.
This is fine but I want to point out
:-)
On Thursday, 1 August 2013 12:17:20 UTC-5, davedigerati wrote:
I've hired someone, thanks for the interest and I look forward to
continuing to learn this great framework;)
On Thursday, August 1, 2013 12:11:59 AM UTC-4, davedigerati wrote:
I have been learning web2py for a project and
@massimo suggested the best possible implementation, because without
websockets you can't push any event to the boss computer. However, if the
B boss doesn't need an instant update (i.e. can wait a few seconds between
the A submit and B's browser reloading the page ) you can hook up in B's
is it an aesthetic request or something doesn't work ? if you loaded the
grid with a .load extension, pagination links needs to have .load as well
else when you change the page it will load in the fragment the whole
layout.html again, and that's probably something you don't want
On Friday,
uhm. the change event must be hooked to an input that changes, not to a
piece of the page ... let me understand: you have a page with a total that
needs to be refreshed via ajax after having submitted with ajax the add
or the sub function ?
On Friday, August 2, 2013 12:45:17 AM UTC+2, Marco
I've started from the PosOnLine demo appliance. There with the 'add' and
'sub' buttons you can change the quantity of the products you want to buy,
but there is no total. I've tried to add a total in the view so that when
the the customer 'adds' a product both the quantity and the total
hi
Got this field, to make sure that a booking is unique.
Field('booking_hash', unique=True, compute=lambda r:
make_secure_val(str(r['bo_teacher_id']) + str(r['bo_lesson_date']) +
str(r['bo_start_lesson_time'])+ str(r['bo_student_id']) )),
Instead of getting an error poping up saying the
well, given that you're not an expert on javascript events (:-P) I'd use
response.js in both the add and the sub functions to trigger the changes in
your total field.
This is one of the reasons that pushed me to create a new web2py.js (will
be available from 2.6.0) , but you need to be
Could you try setting the logging_level to debug?
from gluon.contrib.login_methods.ldap_auth import ldap_auth
auth.settings.login_methods.append(ldap_auth(mode='ad',
bind_dn='userName', bind_pw='passWord', manage_groups=False,
server='serverName',
base_dn='ou=OU,ou=OU,dc=DC,dc=DC',
Thank you guys, yes you have said my problem very well and the solution has to
be websockets. I'm using the one that comes with web2py and have run into some
errors with the JavaScript side. I'm sure it is something simple but I can't
tell what I do wrong
--
---
You received this message
with .load, page 2 of table opens without any layout. It does not work like
a component in that regard. I need to refresh the table every 30 seconds.
That is why, I use LOAD and reload the component in a script statement in
every 30 seconds.
Matt
On Friday, August 2, 2013 12:43:40 AM UTC-7,
I posted details here I hope you can help!
--
---
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 web2py+unsubscr...@googlegroups.com.
For more options, visit
something is wrong with your layout (and possibly with web2py.js). Any
LOADed grid has links that are trapped by default, and all links lead to
change only the fragment where the grid has been loadeddid you fiddle
with web2py.js or layout.html ?
On Friday, August 2, 2013 10:43:47 AM UTC+2,
I'm sorry I missed out the link:
https://groups.google.com/forum/m/#!topic/web2py/NwYcjtOLJJ4
--
---
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
Now that PyCharm officially supports web2py, I've playing around its
debugger. So far, so good. Note that the latest PyCharm 3.0 EAP build can
be used for free for a few more weeks.
On Friday, 2 August 2013 02:21:46 UTC+1, Mark Finkelstein wrote:
I've been trying to get winpdb to play nice
It has been reported a few times by different users. track_changes for
modules stops working after several reloads of page in browser. I can see
typical scenario ... I'm working with module and changes are detected
correctly . After 6-7 changes and reloads cycle in browser during the
coding
Hello!
I'm writing an app, which results with pdf file with some text with unicode
characters. On local GAE it works good, but after deploy it can't import
crash after add_font() (pyfpdf).
The code is:
# -*- coding: utf-8 -*-
def fun1():
from gluon.contrib.pyfpdf import FPDF, HTMLMixin
Ok I found a solution online, maybe Massimo can confirm that there is a bug
in web2py_sockets.py
https://groups.google.com/forum/#!msg/python-tornado/kgCoVCUkdeM/99yS2ZEhkVAJ
Ah, OK. Looks like a web2py bug then. web2py's websocket support contains
handlers that return true or false; these
Hey
I would like to know if web2py framework ...is a good framework for making
large scale websites...???..
--
---
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
Have been playing with Kendo UI and have an issue where a GET request to a
w2p service returns an invalid argument error.
Kendo places a callback at the end of the address in the form of:
http://127.0.0.1:8000/dogsfleas/dogs/api/dogs*
Why not? Generally speaking, what doesn't scale is your platform and
infrastructure.
With any framework you'll need to use dynamic and static caches, load
balancing protocols and make many optimizations in your code to adhere
to performance specifications.
It's more a project concern than
hello one and all,
under a view html file, what is the best way to add a SCRIPT helper to the
head of the final output. using layout.html as the template.
thanx in advance, lucas
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To
Good job! ;-)
2013/8/1 davedigerati hypr...@gmail.com
I've hired someone, thanks for the interest and I look forward to
continuing to learn this great framework;)
On Thursday, August 1, 2013 12:11:59 AM UTC-4, davedigerati wrote:
I have been learning web2py for a project and while I am
Ray,
Just to be sure... after upgrading to 2.5.1 did you restart apache?
If you did and still does not work open a ticket on googlecode.
In the meantime you can try with reading request.body that should work.
mic
2013/8/1 Ray (a.k.a. Iceberg) iceb...@qq.com
To whom it may concern:
I
hello one and all,
ok, say i have an INPUT like:
INPUT(_name=dude, _type=text, _id=dude_int)
how can i remove the name attribute from the tag?
also, say i want to add a non-standard attribute to the tag like:
form.element(_id=dude_int).update(_custom_attr1=attr1_data)
will web2py complain or
the solution (simple as a solution must be) is changing the 'cart_callback'
to update the entire (always little) table. Sorry, you haven't passed the
test :-P
thank you for your time!
Marco
On Friday, August 2, 2013 10:22:23 AM UTC+2, Niphlod wrote:
well, given that you're not an expert
ok, say i have an INPUT like:
INPUT(_name=dude, _type=text, _id=dude_int)
how can i remove the name attribute from the tag?
form.element('[name=dude]').attributes.pop('_name')
or
del form.element('[name=dude]')['_name']
The attributes of an HTML helper act like a dictionary, and they
One option is to use a block:
http://web2py.com/books/default/chapter/29/05/the-views#Blocks-in-views
Another is something like:
{{=globals().get('head_script', '')}}
Then have the controller return a 'head_script' variable, or define the
variable in the view *before* the {{extend
You mean you get an error when inserting duplicate data? Note, unique=True
is enforced by the database, not web2py, so violating it will simply result
in a database error (which results in a web2py ticket if you don't
explicitly catch the error yourself). Instead, you want to use the
Response :
INFO:web2py.auth.ldap_auth:[serverName] Initialize ldap connection
So, I guess I should search somewhere... It seems to come from a non
closing bracket leaved somewhere cause of refactoring for LDAP...
Thanks
Richard
On Fri, Aug 2, 2013 at 4:23 AM, szimszon szims...@gmail.com
On 2 Aug 2013, at 12:11 AM, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
Our policy is that request.env is just the wsgi environment, without computed
variables.
Except for fixup_missing_path_info.
Perhaps this?
if not request.env.content_type and request.env.http_content_type:
Where did you put track_changes? It is supposed to be in a model not in a
module, certainly not in the module you are trying to reload.
On Friday, 2 August 2013 05:01:42 UTC-5, David Marko wrote:
It has been reported a few times by different users. track_changes for
modules stops working
From the book:
def two_forms():
form1 = FORM(INPUT(_name='name', requires=IS_NOT_EMPTY()),
INPUT(_type='submit'))
form2 = FORM(INPUT(_name='name', requires=IS_NOT_EMPTY()),
INPUT(_type='submit'))
if form1.process(*formname='form_one'*).accepted:
hold still a few hours, I'm going to submit a patch for request that uses
lazy evaluation of vars (ala web3py): should be a good occasion to do a
general cleanup of all those bits !?
On Friday, August 2, 2013 4:12:23 PM UTC+2, Jonathan Lundell wrote:
On 2 Aug 2013, at 12:11 AM, Massimo Di
given that forms are submitted to the same page, it's the only way for the
controller to know what form was indeed submitted :D
On Friday, August 2, 2013 6:19:20 PM UTC+2, lyn2py wrote:
From the book:
def two_forms():
form1 = FORM(INPUT(_name='name', requires=IS_NOT_EMPTY()),
in recent welcome layout there's a block head just for it.
https://github.com/web2py/web2py/blob/master/applications/welcome/views/layout.html#L65
On Friday, August 2, 2013 3:46:27 PM UTC+2, Anthony wrote:
One option is to use a block:
yep, but that's not playing fair ^_^ happy that you resolved the problem
though.
On Friday, August 2, 2013 2:49:00 PM UTC+2, Marco Prosperi wrote:
the solution (simple as a solution must be) is changing the
'cart_callback' to update the entire (always little) table. Sorry, you
haven't
On 2 Aug 2013, at 9:19 AM, Niphlod niph...@gmail.com wrote:
hold still a few hours, I'm going to submit a patch for request that uses
lazy evaluation of vars (ala web3py): should be a good occasion to do a
general cleanup of all those bits !?
No reason not to hold off, but content_type can't
let me rephrase: I sent a patch for lazyness including also the
content-type fix ^_^
lets see what @massimo thinks of it, I think this is a good occasion to
refactor lots of bits and pieces added from time to time in a more general
and consistent way
On Friday, August 2, 2013 6:37:52 PM
Its in model ...
--
---
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 web2py+unsubscr...@googlegroups.com.
For more options, visit
Also, this might be a good opportunity for var laziness, depending on how
it works. For json-rpc apps like mine, parsing incoming application/json
payloads into vars is a complete waste of time.
PS: you're right. If we parse POST with application/json already
automatically, the
Checked it out, pretty nice. Are there any editors that correctly highlight
the scaffolding syntax?
On Friday, August 2, 2013 5:21:33 AM UTC-4, Neil wrote:
Now that PyCharm officially supports web2py, I've playing around its
debugger. So far, so good. Note that the latest PyCharm 3.0 EAP
Well an example would be the default page that appears in web2py (reached
by, for example, http://127.0.0.1:8000/welcome/default/index), there is a
large amount of spaces in there that needlessly inflate the file; in that
file, for example, there is this:
h3Hello World/h3
h4How did you get
Every line with a {{...}} (that doesn't start with =) results in a blank
line being written to the view output. To avoid that, you have to move all
{{...}} code onto lines that generate output so you don't get any
extraneous blank lines. For example, the code generating all the whitespace
you
yep. as a total offtopic (but related) real-world scenario, in 2013 all the
cpu power that a server provides can be (and I strongly believe it **must**
be) used to gzip the page: in such case minifying the HTML has very little
impact (if no impact at all) in the loading speed of a page.
On
I'm trying to implement the viewScope variables for web2py controller
methods. Idea behind is to mimic a behaviour of JAVA frameworks like JSF or
Spring that use the concept of viewScope variables. Such variables live
during the all posts to same controller action / to the same form. This is
Is there a reason this can't be done using the session?
Anthony
On Friday, August 2, 2013 3:10:55 PM UTC-4, David Marko wrote:
I'm trying to implement the viewScope variables for web2py controller
methods. Idea behind is to mimic a behaviour of JAVA frameworks like JSF or
Spring that use
I tried to avoid serialize these data structures from different forms to
disk (default session storage). But you are probably right, that is can be
a good solution ...
Dne pátek, 2. srpna 2013 21:19:26 UTC+2 Anthony napsal(a):
Is there a reason this can't be done using the session?
Anthony
the general problem with this machinery (using either cache or session,
although session are definitely nicer to use) is determine exactly when a
page needs to be closed, hence clearing your stored-so-far variables.
On Friday, August 2, 2013 9:30:27 PM UTC+2, David Marko wrote:
I tried to
Hi Niphlod,
Actually I did not change web2py.js or layout.html. Can you provide a very
small example of a LOADed grid? My current structure might be wrong.
Thanks,
Matt
On Friday, August 2, 2013 1:46:16 AM UTC-7, Niphlod wrote:
something is wrong with your layout (and possibly with
You might consider sessions in
memcachehttp://web2py.com/books/default/chapter/29/13/deployment-recipes#Sessions-in-memcacheor
redishttp://web2py.com/books/default/chapter/29/13/deployment-recipes#Sessions-in-Redis
.
If using the standard session, I suppose you could store items with a
did you start with an old (pre 2.6.0) app and updated web2py ? if yes, you
need to overwrite your app's web2py.js with welcome/static/web2py.js
I think that the most straightforward example is (assuming working on
localhost, hence having generic views enabled): take your welcome, put this
in
Curious to hear, what do you consider large scale?
The more detailed you are about your project the better the response the
community can provide.
Fwiw, having only worked with web2py since the beginning of the year I've
been contemplating similar questions too and essentially the answer is...
is it possible to display just one error message of a list:string input
right after the last input control, using SQLFORM.grid?
With SQLFORM,grid create/update form, when a list:string field with
validators has errors it should be possible to hide the error display on
all list inputs but the
Thanks Niphlod. But I thought that was accomplished with form1 and form2
variables already? Do we still need to use the formname variable?
On Saturday, August 3, 2013 12:20:26 AM UTC+8, Niphlod wrote:
given that forms are submitted to the same page, it's the only way for the
controller to
form1 and form2 are just variables' names - they store the same HTML helper
code. Notice that *_name='name' *is just a general example. Maybe it would
be a little bit clearer if the _name values in the book were different:
form_one, form_two. But that's basically it. You need to distinguish the
I think Niphlod has some valid points. As far as the design goes, I like
Bootstrap 2 and 3 both, they are just different. Hm... I do quite like the
looks of BS 2, perhaps even more than 3...
As I was starting some of the past web2py projects of mine, I've been
constantly saying to myself: I'll
Thanks a lot Niphlod. Actually that was the case. I started to use web2py
2.4.6 but my app was built using web2py 1.99.7. I updated web2py.js,
web2py_ajax.html and layout.html. It works now. But if I want to refresh
the component in every 30 seconds, I am having a problem. Sometimes
pagination
Hi,
I was earlier able to start the server by choosing a password. The issue is
I have forgotten the password and I keep getting the error Errno 13
Permission denied 'C:\\Program Files\\web2py\\parameters_8000.py
Please help as I am unable to proceed.
I also tried copying the folder from the
Hi,
Is there any way to filter datetime field using between in web2py?
I have not seen anything in the document or in the web. Have anyone tried
it?
The only way I see is through executesql() function is there any other way?
--
---
You received this message because you are subscribed to the
When I've forgotten I've just stopped the server, closed the app or
terminal it was running from, reopen and restart with a new password.
I'm sorry I'm not familiar with that error number but had you tried above?
On Friday, August 2, 2013 10:15:00 PM UTC-4, ndave wrote:
Hi,
I was earlier
I'm bumping up against this on a form as well, and puzzled why using a
custom/clean css sheet loaded last in the page header for precedence, with
unique divs/classes aren't working on the textareas... not for size,
background-color, text color, nothing. I can target the row, the parent
divs,
Hi,
I have a little question:
Exists a way to disable the period of a scheduler_task row?
I have to do a task in a stop_time - n_hours and stop_time, I have set the
period to n_hours (in seconds), but in the first run the next_run_time
field is set to stop_time + few seconds and this are over
66 matches
Mail list logo