hello, i have a controller function
if i call it just by http://app.xx.pt/default/myfunc
if shows the resulting array from myfunc
but if i call it like
http://app.xx.pt/default/myfunc.json
i get the error
utf8' codec can't decode byte 0xc3
I think its because the text "contruções" in the resu
Il 18/03/14 11:07, António Ramos ha scritto:
> hello, i have a controller function
>
> if i call it just by http://app.xx.pt/default/myfunc
>
> if shows the resulting array from myfunc
>
> but if i call it like
> http://app.xx.pt/default/myfunc.json
> i get the error
> utf8' codec can't decode byt
>
> - How can I verify when the html was actually retrieved from the cache? I
> tried coding a "print request.now" in the view, but that sentence is
> executed everytime I hit the site's homepage, so I deduce that the code
> that generates the html is executed everytime I hit the home instead
Olá António,
Is your controller .py file saved in utf-8 (make sure the text editor is
doing it, use "the save with encoding" option if you have it) and has this
as the first line?
# -*- coding: utf-8 -*-
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://githu
Hello, i moved my app from windows to linux
my websockets only stays up for a minute or less.
What could be the problem?
In windows it was working perfectly.
I´m using port inside a virtualenv, because i´m no root at
action.ioand had to use virtualenv to install tornado.
(In case this coul
yes i have it in my controller.py file
# -*- coding: utf-8 -*-
2014-03-18 14:48 GMT+00:00 Leonel Câmara :
> Olá António,
>
> Is your controller .py file saved in utf-8 (make sure the text editor is
> doing it, use "the save with encoding" option if you have it) and has this
> as the first line
El martes, 18 de marzo de 2014 09:30:34 UTC-3, Anthony escribió:
>
> - How can I verify when the html was actually retrieved from the cache? I
>> tried coding a "print request.now" in the view, but that sentence is
>> executed everytime I hit the site's homepage, so I deduce that the code
>> th
hello , can i use redis pub/sub functionality instead of tornado ?
any examples?
--
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
>
> - A "layout.html" containing user's navbar and site's header and footer.
> - An "index.html" that extends layout.html
> - An "content.html" that **doesn't** extends layout.html
> - An index() controller function that **doesn't** use @cache.action
> decorator. Instead, the function uses r
El martes, 18 de marzo de 2014 12:16:45 UTC-3, Anthony escribió:
>
> - A "layout.html" containing user's navbar and site's header and footer.
>> - An "index.html" that extends layout.html
>> - An "content.html" that **doesn't** extends layout.html
>> - An index() controller function that **do
Thas the code i'm using, is the main view /default/index.html
{{extend 'layout.html'}}
{{=A(IMG(_src=URL('static/images','config2.jpeg'),
_alt="Empresa, usuarios y parametros", _width="80", _height="80",
_class="none"),
callback=URL('default','config'
>
> Seems like a reasonable approach. If you don't want to cache within the
>> index function, you could instead use the @cache() decorator (rather than
>> @cache.action).
>>
>
> I will give it a try. I haven't tried that because the book suggested
> using @cache.action, but I will give it a tr
Update
I've created this app with web2py 2.3.2 But i'd like to use latest version
2.9.5
Thanks
--
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 rece
Ok people
The problem is the difference on versions from 2.3.2 to 2.9.5, now
Can somebody tell me how to fix it ! How to make it run ?
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/w
I want to change the default 'working...' message presented in an ajax link
while it is waiting for the callback to return. I couldn't find anything
about this in the web2py manual, but looking in web2py.js it looks like the
message can be overridden by setting the data-disable-with value on the
I found the problem after hours of testing different things. It was my
mistake. I was using *writeable* when it should have been *writable*.
Works perfect now.
Thanks for your help
On 03/17/2014 06:39 PM, 黄祥 wrote:
had you already try to simplify or minimalist your app first?
e.g.
def client
Although I'm replying late, I just want to say a huge "thanks" for tackling
this. It's something I've wanted to get to for a few months, and it's great
to see that I don't have to start from scratch. If there was an initial
lack of response I suspect it's just that many people like me happened t
I am trying to create a model with an encrypted key so it's harder for
someone to maliciously screw over my customers.
I have the following snippet.
Field('public_gram', 'boolean', default=False),
Field('tag_name', 'list:string'),
Field('deletion_key', 'password')
)
You can see the
How did you insert "test" into database?
If you use db.tablename.insert(..., deletion_key='test') it will store it
plain text because you are bypassing validators.
You should:
1. use .validate_and_insert(...) instead
or
2. use .insert(deletion_key=db.tablename.deletion_key.validate('test'))
If
Ok People i solved !
I just copied web2py.js and (as i have a newer version of jquery 1.8.3)
jquery.js to app/static folder
End of the story !
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/
To record versiong works, you should set
db._common_fields.append(auth.signature)
after you db.define_tables() but
before defining any other table
and
db.enable_record_versioning(db)
after you define all tables
Em segunda-feira, 30 de setembro de 2013 17h28min12s UTC-3, JaapP escreveu:
Hi Mariano and thanks for the help.
I did what you said.
I downloaded the httplib2 and the pysimplesoap 1.10
I wrote the following code:
from pysimplesoap.client import SoapClient
location_wsdl = "http://docway.demo.3di.it/3diws/services";
wsdl = "http://docway.demo.3di.it/3diws/services/eXtraWay?
I took the shipping code that I ran in Flask (without Apache) and adapted
it to run under Apache as a Flask app. That way, I'm comparing apples to
apples. I'm comparing the performance of the shipping code between Flask
and web2py.
Below, I've included the 'default' file from Apache2/sites-avai
> WSGIDaemonProcess hello user=www-data group=www-data threads=5
with web2py try the following instead:
WSGIDaemonProcess hello user=www-data group=www-data processes= threads=(0 or 1)
If it's faster, then the GIL must be the cause. flask by default has
much less features active (session for ins
@Antonio,
please create a simple example action that causes the error in your
setup and post it here.
something like
# -*- coding: utf-8 -*-
def myfunc():
return dict(mykey='contruções')
2014-03-18 15:57 GMT+01:00 António Ramos :
> yes i have it in my controller.py file
>
> # -*- coding:
@cache.action(public=False)
will cache the content server-side and send along "in the past" cache
headers, marking also the content as private, so browsers are forced to
reissue the request for that page.
On Tuesday, March 18, 2014 5:16:24 PM UTC+1, Anthony wrote:
>
> Seems like a reasonabl
Well i made it with pysimplesoad 1.12
Thanks!
Il giorno martedì 18 marzo 2014 20:44:54 UTC+1, piero crisci ha scritto:
>
> Hi Mariano and thanks for the help.
> I did what you said.
> I downloaded the httplib2 and the pysimplesoap 1.10
> In the pysimplesoad 1.10 the params "username" and "password
apache isn't fine for static files either.
The "move" to evented-like webservers of practically all tech-savvy peoples
in the need is a good estimate on how much the uber-standard apache lacks
in easy-to-debug scenario (I won't even start with the know-how of the
syntax to make it work as you'd
BTW: apache still suffers the SLOWLORIS attack if not carefully configured.
ATM only workarounds to mitigate the issue are there, but not a definitive
solution.
On Tuesday, March 18, 2014 9:46:38 PM UTC+1, Niphlod wrote:
>
> apache isn't fine for static files either.
> The "move" to evented-lik
Hello,
I want to call 2 functions that return a file to be upload/download into
client computer... I have been able to make the first call page to upload
file correctly, but I can't figure out how to make upload both files, I
thought I could solve the issue with ajax call, no lock.
# controlle
content-disposition on ajax requests is not allowed, therefore browser
refuse to show the usual "download as file" dialog, plain and simple :D
You need to come up with an alternative plan (such as, opening a new window
pointing to the url, open a hidden iframe, using 3rd party libraries that
do
i have this error on linux with sqlite as my database sometimes when i save
a record
504 Gateway Time-out
--
nginx
Did anyone had this error before?
Thank you
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/we
:(
I already have a workaround where I show buttons for starting download for
each files that are appended on submit, but I hate that from user
experience point of view... I thought about an other solution, where I
could get vars values from javascritp once form is submit trought
session.var but I
Done. With processes=3, the 10x discrepancy is eliminated! (And this is in
a Linux VM configured for 1 CPU.)
On Tuesday, 18 March 2014 16:26:24 UTC-4, Michele Comitini wrote:
>
> > WSGIDaemonProcess hello user=www-data group=www-data threads=5
>
> with web2py try the following instead:
> WSGID
Thank you for all your tests. You should write a summary of your results
with recommendations for Apache users.
On Tuesday, 18 March 2014 19:44:29 UTC-5, horridohobbyist wrote:
>
> Done. With processes=3, the 10x discrepancy is eliminated! (And this is in
> a Linux VM configured for 1 CPU.)
>
>
Hi,
I don’t see any “bug/issue report” on web2pyslices. Is there one?
I’ve posted a recipe comment but I don’t see (also) the comment anywhere or any
flash message saying it will be checked for approval or so.
my 2 cents,
Cheers,
--
Frank
--
Resources:
- http://web2py.com
- http://web2py.c
Hello I am implementing some pretty basic micro data information (For
Google Searches) and I am having a problem displaying an image uploaded to
SQLITE in the Structured Data Testing tool.
Here is a screenshot what the information contains
http://imagehost.suck-o.com/images/2014/03/19/image.pn
I shall do that. Thanks.
With the knowledge about "processes=", I've tuned my actual Linux server to
eliminate the 10x slowdown. As it turns out, for my 2.4GHz quad-core Xeon
with 4GB RAM, "processes=2" works best. I found that any other value (3, 4,
5) gave very inconsistent results–sometimes
"threads=0" is no good–Apache restart upchucks on this.
BTW, I haven't experimented with the threads value. Might this also improve
performance (with respect to GIL)?
Also, I was wondering. Is the "processes=" solution related to whether you
are using the "prefork" MPM or the "worker" MPM? I kn
I am happily using the web2py FORM and custom validator's for form
validation using JSON messaging.
The problem I have is a customer wants verbose messages for webpages, but
succinct messages for everything else.
For eg,
On the webpage "You must enter an email address", "A password is required",
You can use attachments=False in your response.download call on your
download controller function if you don't want it to download
automatically.
Although I don't think that's what's causing the google trouble.
You can also try adding:
response.headers['Content-Type'] = 'image/png'
Ag
I am just learning Web2py
I have an understanding of dict but now I find it used with two asterisks
before it and I can't seem to find an explanation!!
Can it be used with anything other than a form? ((**dict(form.vars))?
Can I use the two asterisks on other bits of code to server a common
pur
You might want to look at
http://johnculviner.com/jquery-file-download-plugin-for-ajax-like-feature-rich-file-downloads/
The only fiddly bit is to make sure you set the cookies correctly (see the
documentation for details).
For example:
{{view}}
response.files.append(URL('static','js/jque
Hi!
just stumbled across wikipedia article about web2py
https://en.wikipedia.org/wiki/Web2py and besides it's a bit outdated, I've
found that there is no russian version of web2py on wikipedia, so I've
created new article and already translated about 70% of original english
article.
If there
Posted to soon. To clarify, the cookies need to be set in your download
function:
{{view}}
response.files.append(URL('static','jquery.fileDownload/jquery.fileDownload.js'))
{{controller}}
response.js =
'$.fileDownload("http://127.0.0.1:8000/sgddms/label/download_func1?var1=2676&v
hi!
Don't worry it's pretty common question for newcomers :)
This is called Function Argument Packaging and Function Argument
Unpackaging.
arguments could be packaged into list or dictionary:
* - position based arguments
** - name based arguments
>>> def f(*a, **b):
return a, b
>>> x, y = f(3,
Wow!! this is a bit mind bending - it will take some processing time!!
Really appreciate your VERY useful and quick response.
On 19 March 2014 16:27, wrote:
> hi!
> Don't worry it's pretty common question for newcomers :)
>
> This is called Function Argument Packaging and Function Argument
>
Dear Sirs,
I understand it's possible to use databases without DAL.
For example function in controller:
def values():
client = pymongo.MongoClient('localhost', 27017)
db = client.mybase
mytable = db["mytable"]
res = mytable.find()
.
return dict()
And of course i
48 matches
Mail list logo