[web2py] routes.py + route_in for Parameter-based system

2014-08-17 Thread Copper Lark
How made "Streaming virtual files" in Parameter-based system
in routes.py

route_in=(
 ('.*.(php|PHP|asp|ASP|jsp|JSP)','jammer/default/jam'),
)

I try:

routers = dict(

# base router
BASE=dict(
default_application='ipay',
domains = {
  'www.ipo-polza.ru' : 'polza',
},
),
route_in = dict(
#   ('*.php|PHP|asp|ASP|jsp|JSP)','ipay/default/jam'),
#php = 'ipay/default/jam',
)
)

here is 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 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 https://groups.google.com/d/optout.


Re: [web2py] Re: web2py shell vs terminal shell

2014-08-17 Thread Massimo Di Pierro
After truncate the table did you db.commit()?

On Sunday, 17 August 2014 23:17:29 UTC-5, Giacomo Dorigo wrote:
>
> I don't know,
> for some reason it does not leave me submit the ticket:
>
> Windows 8
> web2py :
> 2.9.5-stable+timestamp.2014.03.16.02.35.39
> (Running on Rocket 1.2.6, Python 2.7.7)
>
>  What steps will reproduce the problem?
> 1. run web2py from source code from a .bat file python 
> path_to_web2py/web2py.py
> 2. at same time run an other instance of web2py from terminal so: 
> path_to_web2py/web2py.py -S myapp -M
> 3. start to interact with the db api from the online shell (not from the 
> command line)
> 4. insert some records
> 5. truncate the table
> 6. insert new records
>
> =>> check the table, the old inserts had been repeated again
>
> What is the expected output?
> only the new inserts should have been inserted
>
>
> On Sun, Aug 17, 2014 at 6:18 AM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> https://code.google.com/p/web2py/issues/entry
>>
>>
>> On Saturday, 16 August 2014 23:08:36 UTC-5, Giacomo Dorigo wrote:
>>>
>>> OK, how do I open a ticket?
>>>
>>>
>>> On Wed, Aug 13, 2014 at 8:04 PM, Massimo Di Pierro <
>>> massimo.dipie...@gmail.com> wrote:
>>>
 Please open a ticket about this. This is a major issue. Perhaps we 
 should remove the web based shell.


 On Wednesday, 13 August 2014 02:41:17 UTC-5, Giacomo Dorigo wrote:
>
> Today I discovered an other problem with the admin shell.
> If I execute command 1
> and then command 2, at this point it will re-execute command 1 too.
> If then I execute command 3, it will execute again also 1 and 2.
>
> This is while running web2py from source code on Windows with simple 
> python web2py.py 
>
>
>
> On Saturday, April 6, 2013 6:09:40 AM UTC+2, Massimo Di Pierro wrote:
>>
>> The admin shell has problems maintaining state. I do not consider it 
>> reliable. The terminal shell is rock solid. It is a normal pyhton shell.
>>
>> On Friday, 5 April 2013 16:48:50 UTC-5, Michael Herman wrote:
>>>
>>> yes. so when working with DAL directly from the shell it's better to 
>>> work from the web2py shell in the terminal rather than the admin app 
>>> shell? any idea why? 
>>>
>>> On Fri, Apr 5, 2013 at 2:43 PM, Anthony  wrote: 
>>> > 
>>> > By "built-in" shell, do you mean the one in the admin app? I think 
>>> there are sometimes problems with that (particularly with database 
>>> operations), so I tend to use the web2py shell in the terminal, which 
>>> you 
>>> can start as follows from the web2py directory: 
>>> > 
>>> > python web2py.py -S yourapp/[optional controller] -M 
>>> > 
>>> > But you may fine the admin shell works just fine for you, in which 
>>> case, use it. 
>>> > 
>>> > Anthony 
>>> > 
>>> > 
>>> > On Friday, April 5, 2013 4:57:49 PM UTC-4, Michael Herman wrote: 
>>> >> 
>>> >> i remember reading somewhere that it's better to use the built-in 
>>> shell in web2py, but i can't find the article/post. anyone know (1) if 
>>> it 
>>> is "better", and, (2)  if so, why? 
>>> > 
>>> > -- 
>>> > 
>>> > --- 
>>> > You received this message because you are subscribed to a topic in 
>>> the Google Groups "web2py-users" group. 
>>> > To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/web2py/XWMt1Pb_2wk/unsubscribe?hl=en. 
>>> > To unsubscribe from this group and all its topics, send an email 
>>> to web2py+un...@googlegroups.com. 
>>> > For more options, visit https://groups.google.com/groups/opt_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 a topic in the 
 Google Groups "web2py-users" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/
 topic/web2py/XWMt1Pb_2wk/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/XWMt1Pb_2wk/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com

[web2py] Re: Confused on how to deploy to GAE

2014-08-17 Thread Massimo Di Pierro
You are running the OSX binary. You cannot deploy from there. You need to 
run the source version of web2py.
Your with with:
   
 python web2py.py -G configure

It will ask you some questions and make the app.yaml for you.
You make the GoogleAppLauncher point to the web2py folder, run it once, try 
run it locally (try every page so it will create indices), then press 
[deploy]. Et voila'.

Massimo



On Sunday, 17 August 2014 23:06:30 UTC-5, Jeffrey Wong wrote:
>
> Hello,
>
> I have been using the web UI interface to write a small application.  I'm 
> developing on a Mac and my application works well locally, but I cannot for 
> the life of me figure out how to deploy it to GAE.  I have a Google cloud 
> account ready, and the python SDK installed.  I downloaded web2py to my 
> ~/Downloads directory and app.yaml is contained in
>
> web2py/web2py.app/Contents/Resources/app.yaml
>
> I know by default this app.yaml file will deploy the 'welcome' app, so I 
> did a find and replace for 'myapp'.  When I start dev_appserver.py from the 
> Python SDK I get a blank screen.  How should I proceed to debug this?
>

-- 
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-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 https://groups.google.com/d/optout.


[web2py] How to show just entered value in the same form after self-submitting?

2014-08-17 Thread Кирилл Шаталаев
Why not recreate form again? 
if form.vars.field1==None
dictionary == db.().select 
form=
return dict(form=form)

?

-- 
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-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 https://groups.google.com/d/optout.


[web2py] Confused on how to deploy to GAE

2014-08-17 Thread Jeffrey Wong
Hello,

I have been using the web UI interface to write a small application.  I'm 
developing on a Mac and my application works well locally, but I cannot for 
the life of me figure out how to deploy it to GAE.  I have a Google cloud 
account ready, and the python SDK installed.  I downloaded web2py to my 
~/Downloads directory and app.yaml is contained in

web2py/web2py.app/Contents/Resources/app.yaml

I know by default this app.yaml file will deploy the 'welcome' app, so I 
did a find and replace for 'myapp'.  When I start dev_appserver.py from the 
Python SDK I get a blank screen.  How should I proceed to debug this?

-- 
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-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 https://groups.google.com/d/optout.


[web2py] using FORM with new line layout

2014-08-17 Thread sid datta

HI - I wanted to customize the layout and use FORM.

So a simple example - where I would like to have 2 input boxes and a 3 rd 
submit button each on its own line. I wanted to do this in the controller - 
so

form = FORM(INPUT(_name='fname'),INPUT(_name='lname'),INPUT(_type='Submit'))

this puts all the 3 on the same line - how do i split this into different 
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 Issues)
--- 
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 https://groups.google.com/d/optout.


[web2py] Re: scheduler timeouts on successful tasks

2014-08-17 Thread Brad Miller
As a follow up question.  Is it safe for me to mark the task as COMPLETED 
manually by updating the schedular_task or schedular_run table?  Its not 
clear to me which one.  I thought about using stop_task() but that did not 
appear to work, plus it seems silly to have the task marked as failed when 
it clearly did not fail.

Thanks,

Brad


On Friday, August 15, 2014 9:27:55 AM UTC-5, Brad Miller wrote:
>
> Hi,
>
> I've been using the scheduler quite successfully for a while now.  But 
> lately I've been getting TIMEOUTS on tasks that are successfully running to 
> completion.  I know this because:
>
> 1.  I've added my own file mechanism to show that I made until the end, 
> plus I can see that the results of the scheduled task are correct.
> 2.  I've turned on logging and I can see:
>
> 2014-08-15 09:14:06,617 - web2py.scheduler.zebra.local#34260 - DEBUG - 
> recording heartbeat (RUNNING)
> 2014-08-15 09:14:09,172 - web2py.scheduler.zebra.local#34231 - DEBUG - 
> defining tables (migrate=True)
> 2014-08-15 09:14:09,631 - web2py.scheduler.zebra.local#34260 - DEBUG - 
> recording heartbeat (RUNNING)
> 2014-08-15 09:14:12,151 - web2py.scheduler.zebra.local#34231 - DEBUG - 
> defining tables (migrate=True)
> 2014-08-15 09:14:12,635 - web2py.scheduler.zebra.local#34260 - DEBUG - 
> recording heartbeat (RUNNING)
> 2014-08-15 09:14:14,757 - web2py.scheduler.zebra.local#34260 - DEBUG - 
> new task report: COMPLETED
>
> However as I monitor the database tables the task staying in RUNNING mode 
> for the full five minutes until it then goes into TIMEOUT.
>
> This is driving me crazy.  Is there some way I can debug this?  I've tried 
> various (stable) versions of web2py and am getting the same result.
>
> Thanks,
>
> Brad
>
>
>

-- 
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-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 https://groups.google.com/d/optout.


Re: [web2py] Re: web2py shell vs terminal shell

2014-08-17 Thread Giacomo Dorigo
I don't know,
for some reason it does not leave me submit the ticket:

Windows 8
web2py :
2.9.5-stable+timestamp.2014.03.16.02.35.39
(Running on Rocket 1.2.6, Python 2.7.7)

What steps will reproduce the problem?
1. run web2py from source code from a .bat file python
path_to_web2py/web2py.py
2. at same time run an other instance of web2py from terminal so:
path_to_web2py/web2py.py -S myapp -M
3. start to interact with the db api from the online shell (not from the
command line)
4. insert some records
5. truncate the table
6. insert new records

=>> check the table, the old inserts had been repeated again

What is the expected output?
only the new inserts should have been inserted


On Sun, Aug 17, 2014 at 6:18 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> https://code.google.com/p/web2py/issues/entry
>
>
> On Saturday, 16 August 2014 23:08:36 UTC-5, Giacomo Dorigo wrote:
>>
>> OK, how do I open a ticket?
>>
>>
>> On Wed, Aug 13, 2014 at 8:04 PM, Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> Please open a ticket about this. This is a major issue. Perhaps we
>>> should remove the web based shell.
>>>
>>>
>>> On Wednesday, 13 August 2014 02:41:17 UTC-5, Giacomo Dorigo wrote:

 Today I discovered an other problem with the admin shell.
 If I execute command 1
 and then command 2, at this point it will re-execute command 1 too.
 If then I execute command 3, it will execute again also 1 and 2.

 This is while running web2py from source code on Windows with simple
 python web2py.py



 On Saturday, April 6, 2013 6:09:40 AM UTC+2, Massimo Di Pierro wrote:
>
> The admin shell has problems maintaining state. I do not consider it
> reliable. The terminal shell is rock solid. It is a normal pyhton shell.
>
> On Friday, 5 April 2013 16:48:50 UTC-5, Michael Herman wrote:
>>
>> yes. so when working with DAL directly from the shell it's better to
>> work from the web2py shell in the terminal rather than the admin app
>> shell? any idea why?
>>
>> On Fri, Apr 5, 2013 at 2:43 PM, Anthony  wrote:
>> >
>> > By "built-in" shell, do you mean the one in the admin app? I think
>> there are sometimes problems with that (particularly with database
>> operations), so I tend to use the web2py shell in the terminal, which you
>> can start as follows from the web2py directory:
>> >
>> > python web2py.py -S yourapp/[optional controller] -M
>> >
>> > But you may fine the admin shell works just fine for you, in which
>> case, use it.
>> >
>> > Anthony
>> >
>> >
>> > On Friday, April 5, 2013 4:57:49 PM UTC-4, Michael Herman wrote:
>> >>
>> >> i remember reading somewhere that it's better to use the built-in
>> shell in web2py, but i can't find the article/post. anyone know (1) if it
>> is "better", and, (2)  if so, why?
>> >
>> > --
>> >
>> > ---
>> > You received this message because you are subscribed to a topic in
>> the Google Groups "web2py-users" group.
>> > To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/web2py/XWMt1Pb_2wk/unsubscribe?hl=en.
>> > To unsubscribe from this group and all its topics, send an email to
>> web2py+un...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_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 a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/web2py/XWMt1Pb_2wk/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/XWMt1Pb_2wk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users" group.
To unsubscribe from this group 

[web2py] Re: client browser small screen detect

2014-08-17 Thread Massimo Di Pierro
 

You can check the screen size with 

jQuery(window).width() # js

and send it to the server via ajax:

jQuery.post('{{=URL('')}}', {'width':jQuery(window).width()});

You can also check device with this logic:

http://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-handheld-device-in-jquery


On Sunday, 17 August 2014 23:01:07 UTC-5, lucas wrote:
>
> hello one and all,
>
> how can web2py detect a small screen on the client side?  i already read 
> the post https://groups.google.com/forum/#!topic/web2py/cnfpKwNFB4Q and 
> am using massimo's code to detect a mobile interface.  
>
> but i really need to distinguish like a really small screen like in an 
> iPod or iPhone versus the larger screens of like a iPad.  the small screens 
> really squish crap together and i would like to adjust for that better.
>
> thanx in advance, lucas
>

-- 
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-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 https://groups.google.com/d/optout.


[web2py] client browser small screen detect

2014-08-17 Thread lucas
hello one and all,

how can web2py detect a small screen on the client side?  i already read 
the post https://groups.google.com/forum/#!topic/web2py/cnfpKwNFB4Q and am 
using massimo's code to detect a mobile interface.  

but i really need to distinguish like a really small screen like in an iPod 
or iPhone versus the larger screens of like a iPad.  the small screens 
really squish crap together and i would like to adjust for that better.

thanx in advance, lucas

-- 
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-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 https://groups.google.com/d/optout.


[web2py] Re: why doesn't my custom registration form work?

2014-08-17 Thread Robin Manoli
Hey thanks a lot Massimo, that worked perfectly!

I really do put a lot of focus on how I write my code, in order to make the 
site easily maintainable.

Thanks for a great job, and I love web2py!

Den söndagen den 17:e augusti 2014 kl. 01:05:16 UTC+2 skrev Robin Manoli:
>
> Hi,
> I know there are many questions like this but I still couldn't find any 
> solution to this. If there are any errors in the form they are reported 
> correctly. However, when I do enter everything correctly the user is not 
> added and there is no error message. I just return to the same page with 
> the fields filled in again, as if something went wrong.
>
> This is a separate function from the normal default/user, and the normal 
> default/user/register still works flawlessly.
>
> I have all the code in the view, and it looks like this:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *{{form=auth.register()}}{{=form.custom.begin}} {{
> form.custom.widget.email.update(_placeholder="y...@domain.com 
> ")input = DIV( form.custom.widget.email, 
> _class="item-input" )=input
> form.custom.widget.password.update(_placeholder="password")
> input = DIV( form.custom.widget.password, _class="item-input" )
> =input
> form.custom.widget.password_two.update(_placeholder="password")
> input = DIV( form.custom.widget.password_two, _class="item-input" )
> =inputform.custom.submit.update(_class="button")
> input = DIV( form.custom.submit, _class="item-input" )=input
> }}{{=form.custom.end}}*
> Thanks for your time and patience!
>

-- 
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-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 https://groups.google.com/d/optout.


[web2py] Re: email not sent

2014-08-17 Thread Alex Glaros
okay, I assured Google it was really me, now password reset seems to work

thanks folks!

Alex

-- 
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-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 https://groups.google.com/d/optout.