Yes Jonathan, it's a parametric router.
For using request.uri_language = 'it' I cannot put it in the URL helper,
so I need to make a function that will take care about language switching,
ok.
Il giorno lunedì 17 marzo 2014 06:24:19 UTC+1, Jonathan Lundell ha scritto:
>
> On 16 Mar 2014, at 9:4
On 16 Mar 2014, at 9:49 PM, Anthony wrote:
> URL(f=request.function, args= request.args, vars=request.vars, language='it')
>
>
> URL does now take a "language" argument (in the current version of web2py).
> You can also try:
>
> request.uri_language = 'it'
>
> to force a different language to
>
> URL(f=request.function, args= request.args, vars=request.vars, language=
> 'it')
>
>
URL does now take a "language" argument (in the current version of web2py).
You can also try:
request.uri_language = 'it'
to force a different language to be included in the URL.
Anthony
--
Resources:
-
What kind of VM is this? What is the host platform? How many CPU cores? Is
VM using all the cores? The only thing I can think of is the GIL and the
fact that multithreaded code in python gets slower and slower the more
cores I have. On my laptop, with two cores, I do not see any slow down.
Rock
I was manually setting T.current_languages = ['en'] in db.py but am I
correct that this statement has no impact then? It doesn't seem to do
anything. Even setting to T.current_languages = ['es'] has no impact.
On Saturday, March 15, 2014 8:38:58 PM UTC-4, Massimo Di Pierro wrote:
> Yes. This
Thank you this is what was missing from my understanding, changing langcode
to en-gb, caused en-us.py translation to be picked up and en-gb.py to not
be.
On Friday, March 14, 2014 8:49:17 PM UTC-4, LightDot wrote:
>
> I'm less familiar with the translation parts of web2py that I'd like to
> be,
Using gunicorn (Thanks, Massimo), I ran the full web2py Welcome code:
Welcome: elapsed time: 0.0511929988861
Welcome: elapsed time: 0.0024790763855
Welcome: elapsed time: 0.00262713432312
Welcome: elapsed time: 0.00224614143372
Welcome: elapsed time: 0.00218415260315
Welcome: elapsed time: 0.00213
Okay, I did the calculations test in my Linux VM using command line
(fred0), Flask (hello0), and web2py (Welcome).
fred0: elapsed time: 0.00159001350403
fred0: elapsed time: 0.0015709400177
fred0: elapsed time: 0.00156021118164
fred0: elapsed time: 0.0015971660614
fred0: elapsed time: 0.00315
easy_install gunicorn
cd web2py
python anyserver.py -s gunicorn -i 127.0.0.1 -p 8000
Anyway, you need to run a test that does not include "import Package first"
Because definitively treats imports differently. That must be tested
separately.
Massimo
On Sunday, 16 March 2014 15:31:17 UTC-5, h
web2py comes with anyserver.py
you just do:
python anyserver.py -H
for help. One of the command line options is to run with gunicorn. You can
try tornado, and any other server out there.
On Sunday, 16 March 2014 17:09:40 UTC-5, horridohobbyist wrote:
>
> Failed to find application: 'gluon.main
clean doesn't work for me too on 2.9.5, only
request.user_agent()['is_mobile'] works.
On Friday, November 29, 2013 11:46:56 AM UTC+8, Tim Richardson wrote:
>
> To fix this, you need to clear sessions.
> The easiest way to do this is via the admin app.
> Find the application causing problems, and
Hi,
There is how change the default exportclasses on web2py without modify in
the code of web2py, and without expliciting it in all my grids?
I didn't found anything.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- http
Failed to find application: 'gluon.main'
2014-03-15 02:23:51 [22339] [INFO] Worker exiting (pid: 22339)
...
Traceback (most recent call last):
File "/usr/local/bin/gunicorn", line 9, in
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
...
gunicorn.errors.HaltServer:
On
In order to isolate the problem one must take it in steps. This is a good
test but you must first perform this test with the code you proposed before:
def test():
t = time.time
start = t()
x = 0.0
for i in range(1,5000):
x += (float(i+10)*(i+25)+175.0)/3.14
debug("elap
Hi all,
Please could anyone help me out, I need to pull some data from some API
(ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker
How do I do this with Web2py + JavaScript ? I am new to web2py.
Thank you.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Doc
There is
{{=(concert.concert_date.strftime(str(T("%Y-%m-%d"}}
On Sunday, 16 March 2014 04:50:42 UTC-5, Gael Princivalle wrote:
>
> Of course like that it works fine:
> {{=(concert.concert_date.strftime("%d/%m/%Y"))}}
>
> But I was thinking there was a way to do that with T().
>
>
> Il giorno
I am glad you agree but if there is consensus in implementing your original
request, I do not have a problem with it.
On Sunday, 16 March 2014 03:17:22 UTC-5, David Simmons wrote:
>
> Hi Massimo
>
> I've spent some time thinking about my own suggestion and I now believe
> that changing the delim
I have seen a number of replies been marked as "deleted" recently. All I
can say is that we never delete replies. It must be a google bug.
On Sunday, 16 March 2014 01:11:55 UTC-5, Kiran Subbaraman wrote:
>
> Am unable to reply to the discussion of this topic on web2py-developers:
> https://group
On 16 Mar 2014, at 1:31 PM, horridohobbyist wrote:
> Well, I managed to get gunicorn working in a roundabout way. Here are my
> findings for the fred.py/hello.py test:
>
> Elapsed time: 0.028
> Elapsed time: 0.068
>
> Basically, it's as fast as the command line test!
>
> I'm not sure this tell
Thanks a lot !
Il giorno domenica 16 marzo 2014 21:51:06 UTC+1, 黄祥 ha scritto:
>
> Field('country', type='string', requires=[IS_NOT_EMPTY(), IS_IN_DB(db, '
> countries.id', '%(name)s')]))
> should be:
> Field('country', type='string', requires=[IS_NOT_EMPTY(), IS_IN_DB(db, db.
> countries.id, '%(n
Field('country', type='string', requires=[IS_NOT_EMPTY(), IS_IN_DB(db, '
countries.id', '%(name)s')]))
should be:
Field('country', type='string', requires=[IS_NOT_EMPTY(), IS_IN_DB(db, db.
countries.id, '%(name)s')]))
another way around :
Field('country', type='string', requires=IS_IN_DB(db, db.co
You basically need to cd into the directory where you have unzipped
web2py. Then run gunicorn like the following:
gunicorn -w 4 gluon.main:wsgibase
There you have web2py reachable on http://localhost:8000
Which part does not work for you?
2014-03-16 21:31 GMT+01:00 horridohobbyist :
> Well, I
Well, I managed to get *gunicorn* working in a roundabout way. Here are my
findings for the fred.py/hello.py test:
Elapsed time: 0.028
Elapsed time: 0.068
Basically, it's as fast as the command line test!
I'm not sure this tells us much. Is it Apache's fault? Is it web2py's
fault? The test is
gunicorn instructions:
$ pip install gunicorn
$ cd
$ gunicorn -w 4 gluon.main:wsgibase
2014-03-16 14:47 GMT+01:00 horridohobbyist :
> I've conducted a test with Flask.
>
> fred.py is the command line program.
> hello.py is the Flask program.
> default.py is the Welcome controller.
> testdata.t
Hello all.
Is it possible to have multiple args to requires ?
I want to have a field with a dropdown menu with rows from another table,
and this field cannot be empty.
db.define_table('countries',
Field('name', type='string'))
db.define_table('concerts',
Field('ti
Is it expected that AJAX can be used within the Add form of a SQLFORM.grid?
If so, what am I doing wrong (or is it a bug)?
Thanks,
Keith
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/
Yes, both with True.
Anyway I've rebuild my app why an old version, thanks !
Il giorno domenica 16 marzo 2014 20:38:18 UTC+1, 黄祥 ha scritto:
>
> had you already try migrate = True and fake_migrate_all = True ?
>
> best regards,
> stifan
>
--
Resources:
- http://web2py.com
- http://web2py.com/boo
had you already try migrate = True and fake_migrate_all = True ?
best regards,
stifan
--
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 m
I've take a look thanks.
First I've said you that the problem was resolved but it's not, I've tried
the wrong db.
With that:
db = DAL('sqlite://storage.sqlite', pool_size=1, check_reserved=['all'],migrate
= True, fake_migrate_all = False)
Situation is the same, all changes in db.py don't have a
Yes you're right, I don't have any controller en.py or it.py. It was a way
to change the uri_language.
If I take off 'it' form the URL helper how can i force the language ?
I've read somewhere that it's possible to do it within the URL helper but I
don't know how.
Now I have:
URL(f=request.functi
URL(..., args=request.args, vars=request.get_vars) is the right way to
construct a URL that includes the args and query string variables from the
current request. However, I assume you don't actually have controllers
named en.py and it.py, so you shouldn't be passing the language codes as
the f
I've conducted a test with Flask.
fred.py is the command line program.
hello.py is the Flask program.
default.py is the Welcome controller.
testdata.txt is the test data.
shippackage.py is a required module.
fred.py:
0.024 second
0.067 second
hello.py:
0.029 second
0.073 second
default.py:
0.27
please take a look at this discussion :
https://groups.google.com/forum/#!topic/web2py/9nI1I58f6ag
niphlod explain detail about migrate. it seems there is in another
discussion with example, but sorry, i can't found it.
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com
Hi Dmitry,
reCaptcha was not included in the package. I will use your code in the next
version of the package.
Thank you.
Il giorno domenica 16 marzo 2014 03:12:43 UTC+1, Dmitry Rodetsky ha scritto:
>
> Ok it seems I got this thing fixed up. The problem was in the
> bootstrap3.py module. I am
Yes Stifan, with "migrate = True, fake_migrate_all = False" changes have
effect.
Thanks a lot.
Can you explain me why ?
Regards.
Il giorno domenica 16 marzo 2014 11:47:02 UTC+1, 黄祥 ha scritto:
>
> it's hard to found the root cause, because you don't show any code of your
> db.py
> i guess it r
it's hard to found the root cause, because you don't show any code of your
db.py
i guess it related with the migrate settings.
e.g.
migrate = True, fake_migrate_all = False
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py
Well a bad journey.
When I do changes in my db.py like adding fields, changes don't apply. All
applications changes (views/controllers...) works but not in db.py.
In the db administrative interface new fields are not displayed.
I've reset Apache, clear the cache, and I'm in anonymous mode with Ch
Of course like that it works fine:
{{=(concert.concert_date.strftime("%d/%m/%Y"))}}
But I was thinking there was a way to do that with T().
Il giorno domenica 16 marzo 2014 10:09:20 UTC+1, Gael Princivalle ha
scritto:
>
> Hi all.
>
> So, I save my date like that in my table:
> db.define_table('
Hi all.
So, I save my date like that in my table:
db.define_table('concerts',
Field('concert_date', type='date', requires = IS_DATE(format
='%Y-%m-%d'))...
My controller for displaying one record:
def concert():
id_concert = request.vars['id']
concert = db.concerts(id_conc
Apache on linux can run WSGI in multi process mode as well as multithreaded
mode according to the docs. This would eliminate the GIL as a factor.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p
Hello all.
How can I add to my URL helper all current args and vars ?
I would like to do something like that for language switching :
My current URL is:
mydomain.com/en/concert?id=2
With that:
URL('it', f=request.function, args=request.args, vars=request.vars)
I would like to go to:
mydomain.com
Hi Massimo
I've spent some time thinking about my own suggestion and I now believe
that changing the delimiter in either Web2py or Angular is actually a
better idea than mine. I'm happy to either withdraw my proposal or submit
if you think it should be discussed further.
cheers
Dave
--
Reso
42 matches
Mail list logo