It seems PA doesnt support low-level-IP-blocking
https://www.pythonanywhere.com/forums/topic/8212/
So you have to use db.py as Chris mentioned (or something like
*_block_list.py* in models dir - file name should be top most alphabetical)
Also you can modify PA-starting script to catch bad-IP before
Yes, peewee is cool but too verbose, almost like pure SQL.
--
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 subsc
Hi, Annet!
1. You can write your own MENU helper based on gluon.html.MENU - it's easy
2. about reorder classes - its because web2py uses unordered set in
add_class/remove_class - it could be fixed - open an issue, please
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
db.auth_user is just a table like any other
1)
db(~db.auth_user.id.belongs([1,2])).select(...)
or
db(~db.auth_user.username.belongs(['user0', 'user1'])).select(...)
note that `~` inverts `belongs` i.e. it is equal sql -`NOT IN`
2)
db.auth_user.insert(username = 'John', ...)
- nothing new e
Try to use SQLCustomType instead of filter_in/out
--
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
But why do you think that it should be 304?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304
--
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)
---
Oh, sorry, it is about server side cache
--
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 Googl
https://py4web.com/_documentation/static/index.html#chapter-04
See at the end
--
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 b
Hi, DaneW!
- yes, it is bug - I made the PR
https://github.com/web2py/web2py/pull/2323
On Tuesday, May 12, 2020 at 1:35:39 AM UTC+3, DaneW wrote:
>
> I am running web2py on PythonAnywhere under Python 2.17.12. I run a copy
> of sessions2trash as a scheduled task via "python /home/web2py/web2py.
Thanks for your replies, guys! I just want to highlight the problem. I believe
that Massimo is a very creative person, and like any creative person, he does
not really like routine work ... especially if no one asks to do it;)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Docume
BTW:
if anyone is interested about WITH RECURSIVE here is my implementation:
https://github.com/web2py/pydal/issues/627
On Monday, May 11, 2020 at 11:27:14 PM UTC+3, Val K wrote:
>
>
> There are 131 issues on pyDAL-GitHub, but the problem is not in the amount
> but in that more
There are 131 issues on pyDAL-GitHub, but the problem is not in the amount
but in that more than half of them without any response. Look at peewee
that has 7.5k stars and only 2 open issues!... yes, this is impolite
comparision - sorry.
I've just need to implement CTE + WITH RECURSIVE (like thi
Yes, see pydal implementation
https://github.com/web2py/pydal/blob/master/pydal/connection.py
It is just 176 lines
--
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 Iss
Ups, sorry current is thread local and renew per request, use regular mudule
--
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 bec
You can save any object in the module or current, but if you use more than one
worker you will have independent instance of that object per worker
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/
Yes, no binaries - no problems!
--
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
t; File "", line 6, in
>>>> File "__main__.py", line 128, in
>>>> File "__main__web2py__.py", line 33, in
>>>> TypeError: start() takes no arguments (1 given)
>>>>
>>>>
>>>> David Swarbric
Try run web2py.exe from cmd/shell to see an error
--
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
query &= ...
Just use & and | instead of 'and' and 'or'
--
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 subscri
Also you can pass raw sql string like db.field.on(raw_sql_string)
--
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 ar
re.sub() is invoked at python level not at db level. You should use
db.field.regexp(pattern)
--
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 receive
Hello!
I'd like to discuss my PR https://github.com/web2py/py4web/pull/123
The reason:
Currently, if you make an ajax request and expect json-response, in case of
any error on the server, py4web returns a response that is an html page
with response.status = 200. My PR changes this behavior to t
It is strange because opera is chromium based. Keep in mind that 'disable
cache' takes effect if only console is opened. Are there any errors in console
during page reloading?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source co
Try open console ctrl-shift-j then network the disable cache and reload
--
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
oh yeah, it is definitely due to you press compile in appadmin, it is intended
for production. Dont compile app while you develop. I use modules without any
issues with tracking as i mentoined above
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/w
To track module changes try this
from gluon.custom_import import track_changes; track_changes(True)
Also, your problem looks like you have more then one web2py server running
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source co
There is import db from common, but later there is db = DAL(...) in the same
file!
--
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 mess
get_user(), not get.user()
--
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
"web
for server side you can
@action("foo")
@action.uses("foo.html")
def foo():
return dict(...)
@action("bar")
@action.uses("bar.html")
def bar():
return dict(foo_content = foo())
# bar.html
[[=XML(foo_content)]]
for the client side, I suppose, you have to do it by yourself using pure js
o
Yes, there is no keyword argument `args`, you can just:
args = [...]
URL('foo_controller', *args, vars = dict(...) )
On Sunday, February 23, 2020 at 11:37:08 PM UTC+3, RHC wrote:
>
> HI,
>
> Looking at the py4web documentation at
> http://py4web.com/_documentation/static/index.html#chapter-08
p4web `request` is bottle request, see
https://bottlepy.org/docs/dev/api.html#bottle.Request
On Monday, February 24, 2020 at 12:30:29 AM UTC+3, Maurice Waka wrote:
>
> New issue with py4web.
>
> Whats the new code for request.vars??
>
> I get this error:
>
>
> Traceback (most recent call last):
.user_id).select(db.posts.id,
> db.posts.author, orderby=~db.posts.id, limitby=(0,1)).first()
> if user.author if user else None == auth.user_id:
> pass
> else:
> db.posts.insert(message="Welcome "+auth_user.first_name+'.'+'
> Thank
Show your code, please
--
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
"web2py-
th py4web asap once I have something
> working.
>
> Will probaly be on the. Weekend.
>
>
>
>
>
>
> On Thu, 20 Feb 2020, 10:42 Val K, > wrote:
>
>> check request.content_type - is that 'application/json' ?
>>
>> On Thursday, February 20,
t;
>
> Em qui., 20 de fev. de 2020 às 18:03, Val K > escreveu:
>
>> It seems it depends on request.content_type
>>
>> https://github.com/web2py/py4web/blob/e6b3d5e10e15976af153c4a4e6b349a02fe6c2a9/py4web/utils/auth.py#L35
>>
>> --
>> Resou
It seems it depends on request.content_type
https://github.com/web2py/py4web/blob/e6b3d5e10e15976af153c4a4e6b349a02fe6c2a9/py4web/utils/auth.py#L35
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com
+1 autoredirect should be an option
--
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
You can press "reload apps" in the dashboard
--
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 G
See my issue:
https://github.com/web2py/py4web/issues/108
did anyone have the same issue?
--
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 t
It seems that your pydal is out of date, try to update it
--
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 subscr
Try method=... instead of methodS
--
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 Group
Finally, the session is saved on disk or in db or in cookies between requests,
web2py uses pickle to do that, so all that you store in the session must be
pickable. In your case it is enough to trasform your class object into dict,
you don't need to convert it into json
--
Resources:
- http://
You want to keep python object in memory between requests? - it is bad idea.
You should transform it to something that can be saved on disk or in db and
recreate it in each request
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (So
As you can see, this is a Set, not just an attribute. When you select from a
table that has FK, Pydal forms Sets for related tables, Set is the type that db
(...) returns
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Hi !, you can pass sql expressions to select() :
.select(db.tbl.field, 'SUM(sometbl.somefield) OVER(PARTITION BY
sometbl.anotherfield) AS mysum )')
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.co
Use os.path.join() to build path
--
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
Because null (none) has special meaning in sql and can't be compared, so you
should use explicit comparison with null (none)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (
10 should be added to
> the sub_total variable.
> If another user clicks on Not Available 5 should be added to the sub_total
> and so on.
> Summarily, the checkbox labels are to be directly connected to the score
> and both will be defined during survey creation.
> Regards
&
Or you can just set 'allow-origin' to server_1
--
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
You don't need 'requests' on server_2, you can set 'allow-origin' to * + basic
auth (I didn't test this variant, but I suppose it should work ), or you can
perform GET some dummy request to server_2 to get origin and establish ssl (as
option) and then post to login and then post file
--
Resou
If you want to create/edit survey using one page you have to use JavaScript
(I don't see another non-horrible way).
If you want only web2py/python implementation you have to organize your
application to edit one entity per page/request, i.e. you can do something
as follows:
/surveys - returns g
# db_0.py
# shortcut for `not null` field creation
def req_field(*args, **kwargs):
kwargs['notnull'] = True
kwargs['required'] = True
return Field(*args, **kwargs)
# shortcut for reference field creation, `notnull` by default
def FK(ref_table, **kwargs):
if 'notnull' not in kwargs:
Now, vue2pyj works on both pythons + access through admin only
On Monday, September 30, 2019 at 9:41:07 PM UTC+3, Val K wrote:
>
> Thanks for your feedback, I just haven't tried web2py on PY3. I will fix it
>
> On Monday, September 30, 2019 at 2:17:39 PM UTC+3, Alex
web2py™ Version 2.18.5-stable+timestamp.2019.04.07.21.13.59
Python Python 3.7.0:Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Traceback (most recent call last):
File " /web2py/gluon/main.py", line 442, in wsgibase
serve_controller(request, response, session)
File "
Thanks for your feedback, I just haven't tried web2py on PY3. I will fix it
On Monday, September 30, 2019 at 2:17:39 PM UTC+3, Alex Beskopilny wrote:
>
>
>
> суббота, 11 мая 2019 г., 5:12:26 UTC+3 пользователь Val K написал:
>>
>> As result of experimenting with Rap
(*args, **kwargs)
> File "apps/vue3pyj/__init__.py", line 56, in get_fs
> app_rex = re.compile('^[a-z_][a-z_0-9]*$', flags = re.I)
> NameError: name 're' is not defined
>
> Em sex, 27 de set de 2019 às 02:24, Val K >
> escreveu:
>
&
Vue3pyj now uses the _dashboard password and can be used along it.
Also I ported shopping cart example from vue
--
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)
why do you have to override ids? You can just create users with the required
ids.
--
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 messa
Yeah, I had the same issue, because there is no apps/__init__.py in the repo -
just create it!
--
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 receiv
It is no need to use different code for win/linux, since it is Python!
There is os.path.normpath(your_path) that does all stuff with slashes, I
have app that works on both platforms just fine (without platform checking
at all)
My way - always use '/' in path, and at the end of all manipulations
There is no 'select' in your code. Is that a typo?
--
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
I am not sure, but I think that the problem has the same root as in the case of
streaming: when lambda is invoked db is already wasted/rotten. So you can try
to make a module with function that will fetch the rows from current.db and
returns they. Then you can import this module in the controlle
https://github.com/web2py/pydal/issues/388
--
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 Goo
I saw in some post that implicit query like db() with no args is not supported
now
--
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 mess
100 images per page? What do your images look like? Are these icons? What size?
To prevent db scratching there is Cache-Control
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/lis
= [row.id])))
return dict(img_list = img_list)
On Sunday, August 11, 2019 at 7:47:41 PM UTC+3, Константин Комков wrote:
>
> *Val K*, that case is work!)
> def index():
> image = XML(' class="card-img-top" alt="..."/>')
> return di
OK, it seems that something is crashing while streaming (db connection or
something else). I met the similar problem when I tried to yield records from
db using iterselect. Try just 'return row.IMAGE.read()' instead of
response.stream(...)
--
Resources:
- http://web2py.com
- http://web2py.com/
Under inspect error I mean the following:
go to http://127.0.0.1:8000/admin/default/errors/Recipes/old
You will see all errors that were - the first is the latest - click on it
to see what is going on the server when trying to stream images
On Sunday, August 11, 2019 at 2:12:26 AM UTC+3, Кон
Also you can inspect server error using appadmin
--
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 t
I mean revert model to the state when you can retrieve images using base64,
i.e. instead of encoding image you can stream it. If row.IMAGE.read() will
work, stream will work as well
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (So
Remove 'blob' from IMAGE field definition, if it causes an error.
--
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 ar
I believe that any object that has
read(chunk) and close() methods can be streamed. Open the browser console,
refresh the page and check for errors
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.co
Try this:
#default.py
def img():
row = db().select(db.recipes.IMAGES).
first()
if row:
return response.stream(row.IMAGE)
Usage: =URL( 'default', 'img', args=..., vars=...)
On Saturday, August 10, 2019 at 12:43:49 AM UTC+3, Константин Комков wrote:
>
> Ok, I will register issue
to make it works, files should be loaded using web2py interface (SQLFORM or
programmatically - see the book). As far as I can see you have legacy database
with already srored images in it, no? If so you can try to use 'uploadfield'
option, i.e. you should have 2 fields in your model (upload and
Set field type to 'upload' as Ramos suggests and
in your first example it should be row.IMAGE instead of row.file
--
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 Issue
Try db(db.test1).select(sum)
--
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
"w
and of course, if you convert result to json or list/dict you have to use
'_extra'
--
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 mess
I just want to say that you can't retrieve sum from row using the string-key
'sum', you should use the object as in the book example. And it would be better
if dal supports syntax like db.table.field.sum().as('mysum')
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
It is not a bug, as you probably know dal does not support fields aliases and
'_extra' is workaround. When do you get an error?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/lis
Should be stored in the session too, did you try to logout/login?
--
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 ar
Try db.auth_user(auth.user_id).language
--
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
Just place your function in the module and import it in the view
--
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
Hi Zoltan!
I just wrote my own
https://github.com/valq7711/vue2pyj
--
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 a
I suppose it is also needed to add IS_IN_DB validator to the field that is
reference
--
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 me
Show your code, please
--
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
"web2py-
Try db.table._format=...
--
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
"web2
It seems that defining db=DAL(...) at module level is not a good idea
http://www.web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules
On Thursday, July 4, 2019 at 10:23:43 PM UTC+3, 黄祥 wrote:
>
> is there any difference to set variable on models or modules ?
>
Just in case: os.path.join does not check that path exists, so what kind of
error are you trying to catch?
--
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)
---
As you can see url callback is generated at server, so to do what you want you
have to use js (jquery or ...)
--
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)
user press 'button pill' - web2py.js does ajax request with URL =
('cart_callback', ...) and writes response to html element with id =
target = 'items%s'%p.id
On Tuesday, July 2, 2019 at 3:35:03 PM UTC+3, mostwanted wrote:
>
> Can anyone please explain to me in lay-man terms how the code belo
I'm not a pro in nginx but if you set proxy_set_header Host 192.168.7.2; how
does web2py know about www.domain1.net? Maybe it should be proxy_set_header
Host $host?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https
How do you convert dict to json? I believe that json.dumps or response.json
produces json strings without L suffix
--
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 Iss
1. & - is bitwise operator (just in case)
2. why not just return ('My message', oper and abit)
On Thursday, June 20, 2019 at 8:30:30 PM UTC+3, Константин Комков wrote:
>
> I need add more information. Can error may be caused if my function don't
> have one condition:
> def send_application(msg,e
;t know what they may enter, it could be
> anything.
> I just need to feed back whatever they entered in the middle of some js
> action.
> the objective is that whatever they enter - any characters - should simply
> be taken as a string by the browser
>
>
> On Thu, Jun
I think there is no universal way because js is just a string in python
context,
you have to escape quotes with backslash (replace " with \") where it is
required to prevent crumbling strings in js-code
What is the second char? dot?
On Thursday, June 20, 2019 at 8:32:08 PM UTC+3, Vlad wro
;)
def foo():
...
On Thursday, June 20, 2019 at 8:39:45 PM UTC+3, Val K wrote:
>
> I mean the following logic:
> def foo():
> ...
> ret = dict(...)
> if email_required:
> html = response.render(ret)
> ... # send html by email
>
ut how this woks, so just rendered it again. Not a big
> deal - just a matter of convenience. The email requests come occasionally,
> so this extra render doesn't cause trouble.
>
> Thank you, Val!
>
> On Thursday, June 20, 2019 at 6:23:55 AM UTC-4, Val K wrote:
>>
>&
define_table('company')
define_table('client', Field('id', 'reference company'), primarykey=['id'])
define_table('supplier', Field('id', 'reference company'),
primarykey=['id'])
On Thursday, June 20, 2019 at 7:02:31 PM UTC+3, Paul Arsenio Blanco Reyes
wrote:
>
> It turns out that I have a compan
Also you can hack wsgihandler.py to catch rendered response
--
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 sub
You should pass object to JSON.stringify not string, I mean fill the object
with required data and then convert it to string by JSON.stringify, don't
build json strings by your hand
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (S
1 - 100 of 392 matches
Mail list logo