[web2py] Re: extending MARKMIN

2015-08-14 Thread Massimo Di Pierro
this should be it.

MARKMIN(text, extra=dict(myFunc=lambda quoted_text: process(quoted_text))


On Friday, 14 August 2015 13:33:17 UTC-5, Karl-Thomas Schmidt wrote:
>
> Hi @ all, 
>
> i want to extend MARKMIN with a function so a ``text to surround with a 
> line 
> box and a different background color'``:myFunc is properly rendered. 
>
> I can't figure out where and how i should define this function. 
> This should work with build-in wiki. 
> The example in the web2py book chapter 5 pointed me to this, but did not 
> help 
> me. 
>
> tia 
>
> Kalle 
>

-- 
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: Start web2py with different python version

2015-08-14 Thread LoveWeb2py
When I type python web2py.py -S myapp -M the app loads up in python 2.7 
just fine, but when I type service httpd start it runs using Python2.6.6

I can't seem to find where the setting to change this is. Any help is 
really really appreciated.

On Friday, August 14, 2015 at 6:02:43 PM UTC-4, LoveWeb2py wrote:
>
> I'm currently using web2py with wsgihandler.py 
>
> When I type "python" in my regular environment it starts with python2.7, 
> but when I start apache using service httpd start web2py defaults to 2.6
>
> Is there anyway I can make web2py use 2.7 which has all my modules?
>
>

-- 
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] Start web2py with different python version

2015-08-14 Thread LoveWeb2py
I'm currently using web2py with wsgihandler.py 

When I type "python" in my regular environment it starts with python2.7, 
but when I start apache using service httpd start web2py defaults to 2.6

Is there anyway I can make web2py use 2.7 which has all my modules?

-- 
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: Ajax callback with current select value

2015-08-14 Thread Derek
That explains why I had to stuff it into a hidden variable or input... cool!

On Wednesday, August 12, 2015 at 10:35:47 AM UTC-7, Val K wrote:
>
> Yes! Of course! Because there is a small  bug in  web2py.js  in ajax() (or 
> in the manual)  :
> If  middle arg ( '[   ]' ) is string, it's treated as JQuery selector 
> without any processing!
> So ajax() call must be like: 
>  ajax('{{=URL('default','get_options_for_dropdown2')}}', '[name="name_1"], 
> [name="name_2"]', 'dropdown2')
>
> Here is example (just paste in any controller-file and call  '
> sender_receiver' ):
>
> def listener():
> ans=UL(
> LI('sel_1=%s'%request.vars.sel_1), 
> LI('sel_2=%s'%request.vars.sel_2)
> )
> return ans #  - it can be a dict(ans=ans) if used  
> ajax('listener.load' ...) instead ajax('listener' ...)
>
> def sender_receiver():
> onchng="""ajax('listener' , '[name="sel_1"], [name="sel_2"]', 
> 'answer');   """
> sel1=SELECT('opt1', 'opt2', 'opt3', _name='sel_1', _onchange=onchng)
> sel2=SELECT('opt1', 'opt2', 'opt3', _name='sel_2', _onchange=onchng)
> ans=DIV(_id='answer')
> 
> return dict(sel1=sel1, sel2=sel2, ans=ans)
>
>
>
>
>
> On Wednesday, August 12, 2015 at 10:46:08 AM UTC+3, Gael Princivalle wrote:
>>
>> Thanks a lot Val that's certainly the solution, however in the controller 
>> the var is always empty.
>> This is the original select code:
>> 
>>
>> If I set manually the var in get_options_for_overrides the ajax call 
>> works.
>> For debug, if I modify get_options_for_overrides for 
>> returning get_options_for_overrides.vars.ceo_scheme the target select 
>> 'override' is empty.
>>
>> My original controller:
>> def get_options_for_overrides():
>> ceo_scheme_id = get_options_for_overrides.vars.ceo_scheme
>> overrides = db(db.ceo_schemes_and_overrides.ceo_scheme == 
>> ceo_scheme_id).select(db.ceo_schemes_and_overrides.ALL)
>> html = ''
>> for override in overrides:
>> html += '' + 
>> override.override.name + '' + '\r\n'
>> return html
>>
>> My controller for debug:
>> def get_options_for_overrides():
>> ceo_scheme_id = get_options_for_overrides.vars.ceo_scheme
>> return ceo_scheme_id
>>
>> Do you know why?
>>
>> Regards.
>>
>> Il giorno martedì 11 agosto 2015 22:32:06 UTC+2, Val K ha scritto:
>>>
>>> Hello.
>>> Keep in mind that ajax() - is a simple web2py function  which is based 
>>> on Jquery (see web2py.js , its  code  is very short and clear)
>>> It can pass to controller  the values of the input elements only, see 
>>> http://api.jquery.com/serialize/. 
>>> So your select controls must have a  name   
>>> - >>
>>> To pass its  values just include its names in ['  '] -  ajax('{{=URL('
>>> default','get_options_for_dropdown2')}}', ['any_name_1,  any_name_2, ...
>>> '], 'dropdown2');">
>>> To get it in the controller: 
>>> get_options_for_dropdown2.vars.any_name_1
>>>
>>>
>>>
>>> On Tuesday, August 11, 2015 at 6:43:59 PM UTC+3, Gael Princivalle wrote:

 Hello.

 I'm still making a form like in this post:

 https://groups.google.com/forum/#!searchin/web2py/jquery$20db/web2py/tvfncYsLrQs/MRHG5MWOMlAJ

 
 
 >>> 
 
 
 
 >>> 

 How is it possible to pass like a var the current select option value 
 to the ajax call?

 With something like that?
 data: {value: $('#select option:selected').val()}

 How it will be possible to retrieve this in the controller?

 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 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: web2py exe

2015-08-14 Thread Derek
start it from the command line, what do you see?

On Friday, August 14, 2015 at 11:37:11 AM UTC-7, web2py newbie wrote:
>
> Hi
>
> I recently started coding a python app and decided to explore web2py. 
> however, when I download the windows exe and run it, I see neither the 
> admin console nor the webpage when I connect to 127.0.0.1:8000
>
> I even tried web2py.exe -S welcome, and still nothing.
>
> Regards
> Raji
>

-- 
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: 2 New NoSQL database adapters

2015-08-14 Thread Massimo Di Pierro
Adatepers are registers in ADAPTERS (you can grep from it)
They are all classes that extend another adatpter or base adapter and 
override those functions that are different.
So pick one that is similar to the one you need, extend it, try use it, 
then add functions to change behavior as needed.
Look into base.py for what the base adapter does.

On Friday, 14 August 2015 10:00:00 UTC-5, Mark Graves wrote:
>
> Hey everyone,
>
> I have two new databases that I've been toying with that I'd like to 
> implement as database adapters.
>
> I have written nothing yet web2py / pydal specific...all just python.
>
> I was looking around for info on constructing and contributing new 
> adapters.
>
> Is there a best practices guide that I missed?
>
> Thanks,
>
> Mark
>

-- 
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] AutocompleteWidget - Search inside text, not only at the begining

2015-08-14 Thread Fernando Pacheco
I used several times AutocompletWidget (works great). 

When I want to run the search across the entire string and not just at the 
beginning, I must copy the code to a module and modify it, adding "%" at 
the beginning: field.like ('%' + self.request.vars [self.keyword] + '%' ... 
There 
is another way to do it and I missed ?.

The suggestion is if you can add that option (something like at_beginning = 
True) to the class to include this functionality in web2py code. 

I understand that no one has asked, I think it requires very little change and 
in my case worth. Thank you. Best regards. Fernando.

-- 
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] web2py exe

2015-08-14 Thread web2py newbie
Hi

I recently started coding a python app and decided to explore web2py. 
however, when I download the windows exe and run it, I see neither the 
admin console nor the webpage when I connect to 127.0.0.1:8000

I even tried web2py.exe -S welcome, and still nothing.

Regards
Raji

-- 
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: IMPORTANT - WEB2PY CONSULTING

2015-08-14 Thread Fernando Pacheco
Please add me: 

Name : Ingesur SRL
Country : Uruguay
Website : http://www.ingesur.com.uy

Thanks and Best Regards, Fernando.


El domingo, 15 de febrero de 2015, 20:21:36 (UTC-2), Massimo Di Pierro 
escribió:
>
> We need to update the list of companies that provide web2py consulting.
> This list is obsolete:
>
> http://web2py.com/init/default/support
>
> Some links are broke. Most pages do not even mention web2py. Some of them 
> have a design that is simply not acceptable for a web development company.
>
> That list will be eliminated. IF YOU WANT TO BE LISTED please update your 
> page to have a decent design and MENTION WEB2PY on the main site. Then 
> respond to this thread by providing an updated link and the country were 
> you incorporated. If you have a self-employed individual list your country 
> of residence.
>
>

-- 
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] Application Seperation

2015-08-14 Thread Jon
Hey guys,

I have a quick question about the separation of functionality provided by 
web2py. Right now I'm working on creating an application for processing 
data that then sends back a graph to users for data analysis. 

My question stems from my desire to add additional functionality in the 
form of a wiki to store the results that individual researchers have come 
up with so they can collaborate together on various problems. Because of 
the potential complexity of both systems, I was wondering if it would be 
better to separate the wiki from the data analysis and create two different 
apps.

Thanks in advance!

-- 
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] extending MARKMIN

2015-08-14 Thread 'Karl Thomas Schmidt' via web2py-users
Hi @ all,

i want to extend MARKMIN with a function so a ``text to surround with a line 
box and a different background color'``:myFunc is properly rendered.

I can't figure out where and how i should define this function.
This should work with build-in wiki.
The example in the web2py book chapter 5 pointed me to this, but did not help 
me.

tia

Kalle

-- 
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] Form misalignment with bootstrap3_inline

2015-08-14 Thread Bob St John
Using web2py 2.12.2 with formstyle = bootstrap3_inline

Problem:
When displaying a SQLFORM with readonly=True the field labels and values do 
not line up horizontally. I have a screen image, but the following gives 
you an idea of what it looks like... 

Bob
First Name  # without fix (Note that the misalignment 
is exaggerated here..)

I added 2 lines of code (see "#bob's fix" below) to 
'formstyle_bootstrap3_inline_factory' in gluon/sqlhtml.py which solved this 
misalignment.

First Name  Bob # with fix


def formstyle_bootstrap3_inline_factory(col_label_size=3):
""" bootstrap 3 horizontal form layout

Note:
Experimental!
"""
def _inner(form, fields):
form.add_class('form-horizontal')
label_col_class = "col-sm-%d" % col_label_size
col_class = "col-sm-%d" % (12 - col_label_size)
offset_class = "col-sm-offset-%d" % col_label_size
parent = CAT()
for id, label, controls, help in fields:
# wrappers
_help = SPAN(help, _class='help-block')
# embed _help into _controls
_controls = DIV(controls, _help, _class=col_class)
if isinstance(controls, INPUT):
if controls['_type'] == 'submit':
controls.add_class('btn btn-primary')
_controls = DIV(controls, _class="%s %s" % (col_class, 
offset_class))
if controls['_type'] == 'button':
controls.add_class('btn btn-default')
elif controls['_type'] == 'file':
controls.add_class('input-file')
elif controls['_type'] in ('text', 'password'):
controls.add_class('form-control')
elif controls['_type'] == 'checkbox':
label['_for'] = None
label.insert(0, controls)
_controls = DIV(DIV(label, _help, _class="checkbox"),
_class="%s %s" % (offset_class, 
col_class))
label = ''
elif isinstance(controls, (SELECT, TEXTAREA)):
controls.add_class('form-control')

elif isinstance(controls, SPAN):
_controls = P(controls.components,
  _class="form-control-static %s" % col_class)
elif isinstance(controls, UL):
for e in controls.elements("input"):
e.add_class('form-control')
# bob's fix
elif controls is None or isinstance(controls, basestring):
_controls = P(controls, _class="form-control-static %s" % 
col_class)
# end bob's fix
if isinstance(label, LABEL):
label['_class'] = 'control-label %s' % label_col_class

parent.append(DIV(label, _controls, _class='form-group', 
_id=id))
return parent
return _inner

-- 
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] error importing module

2015-08-14 Thread Matheus Suffi
good Morning,

I am importing a module called python- iptables, However When I run a 
Function In this module Returns mean  error saying I must be root to 
perform this function.

already changed permission Execution and changed the owner Archive  However 
www-data STILL NOT Works

I wonder if there is a way to call imports OS Passing parameters of sudo OR 
IF There Some plug-in that similar MAKE THIS SERVICE Listing / Register IPs 
in Chains 

Error details:


...
S'Traceback (most recent call last):\n  File 
"/var/www/web2py/gluon/restricted.py", line 212, in restricted\nexec 
ccode in environment\n  File 
"/var/www/web2py/applications/admanager/controllers/funcional.py", line 
1072, in \n  File "/var/www/web2py/gluon/globals.py", line 194, in 
\nself._caller = lambda f: f()\n  File 
"/var/www/web2py/gluon/tools.py", line 3022, in f\nreturn action(*a, 
**b)\n  File 
"/var/www/web2py/applications/admanager/controllers/funcional.py", line 
1026, in show_iptables\ntable = iptc.Table(iptc.Table.FILTER)\n  File 
"/usr/local/lib/python2.7/dist-packages/iptc/ip4tc.py", line 1530, in 
__new__\nobj._init(name, autocommit)\n  File 
"/usr/local/lib/python2.7/dist-packages/iptc/ip4tc.py", line 1546, in 
_init\nself.refresh()\n  File 
"/usr/local/lib/python2.7/dist-packages/iptc/ip4tc.py", line 1583, in 
refresh\nself.strerror()))\nIPTCError: can\'t initialize filter: 
Permission denied (you must be root)\n'
p242

-- 
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: Error in GAE TypeError: ConjunctionNode()

2015-08-14 Thread Jacinto Parga
I surrender width *IS_IN_DB* and GAE

I finally solved it width a workaround using *IS_IN_SET:*

First I get rid off IS_IN_DB in my models requirements

titulares = db(db.auth_user.tipo_usuario=='Titular')
db.t_familiares.f_titular.requires= 
(IS_IN_DB(titulares,'auth_user.id','%(last_name)s'+', '+ '%(first_name)s'+' 
- '+ '%(f_numero_socio)s',sort=True))

Then I build a IS_IN_SET equivalent in the controllers

titulares 
=db(db.auth_user.tipo_usuario=='Titular').select(orderby=db.auth_user.last_name)
titu = []
for titulares in titulares:
titu.append((titulares.id,titulares.last_name + ' ' + 
titulares.first_name + '- ' +titulares.f_numero_socio))
db.t_familiares.f_titular.requires= IS_IN_SET(titu)
form = SQLFORM(db.t_familiares)

So *titulares.id* is the value I get and *titulares.last_name + '  ' 
+titulares.first_name + '-  ' +titulares.f_numero_socio *is the dropdown 
value

It seems to work fine.

May be someone has a better solution

El jueves, 13 de agosto de 2015, 13:48:35 (UTC+2), Jacinto Parga escribió:
>
> I have an aplication deployed in GAE tha has been running for months with 
> no problem, but in the last deployment in GAE, it has raised a new error:
>
> TypeError: ConjunctionNode() expects Node instances as arguments; received 
> a non-Node instance None
>
> The error has to do with *IS_IN_DB* validator, and is has appeared in the 
> last deployment (today). It worked fine until now.
>
> This is the code: 
>
> def index_gestor():
> titulares = db(db.auth_user.tipo_usuario=='Titular')
> form = SQLFORM.factory(
> Field('socio', db.auth_user, requires = IS_IN_DB(titulares,'
> auth_user.id','%(last_name)s'+', '+ '%(first_name)s'+' - '+ 
> '%(f_numero_socio)s',sort=True)), 
> Field('consulta', type='string', requires = 
> IS_IN_SET(['Familiares', 'Movimientos','Pedidos']),default='Familiares'),
> buttons=[TAG.button('CONSULTAR',_type="submit", _class="btn 
> btn-warning btn-large")],
> table_name='seleccion_socios')
> if form.process().accepted:
> if form.vars.consulta == 'Familiares':
>   
>  
> redirect(URL("gestor","familiares_socio_manage.html",args=[form.vars.socio],user_signature=True))
> elif form.vars.consulta == 'Movimientos':
>   
>  
> redirect(URL("gestor","cuenta_socio_manage.html",args=[form.vars.socio],user_signature=True))
> elif form.vars.consulta == 'Pedidos':
>   
>  
> redirect(URL("gestor_productos","pedidos_por_socio",args=[form.vars.socio],user_signature=True))
> 
> return locals()
>
> The problem is with the line  Field('socio', db.auth_user, requires = 
> IS_IN_DB(titulares,'auth_user.id','%(last_name)s'+', '+ 
> '%(first_name)s'+' - '+ '%(f_numero_socio)s',sort=True)), 
>
> This is the ticket: 
>
> Traceback (most recent call last): File 
> "/base/data/home/apps/s~clubatletismosada/2.386403586504283664/gluon/restricted.py",
>  
> line 227 
> ,
>  
> in restricted exec ccode in environment File 
> "/base/data/home/apps/s~clubatletismosada/2.386403586504283664/applications/CAS/controllers/gestor.py",
>  
> line 400 
> ,
>  
> in  File 
> "/base/data/home/apps/s~clubatletismosada/2.386403586504283664/gluon/globals.py",
>  
> line 412 
> ,
>  
> in  self._caller = lambda f: f() File 
> "/base/data/home/apps/s~clubatletismosada/2.386403586504283664/gluon/tools.py",
>  
> line 3769 
> ,
>  
> in f return action(*a, **b) File 
> "/base/data/home/apps/s~clubatletismosada/2.386403586504283664/applications/CAS/controllers/gestor.py",
>  
> line 12 
> ,
>  
> in index_gestor table_name='seleccion_s

[web2py] Re: Is there any alternative to Pythonanywhere hosting?

2015-08-14 Thread Annet
Hi Joe

Thanks Annet, did you ever work out that issue with Webfaction?
>

Not really, setting the pool-size from 1 to 0 just solved the issue,
I didn't take the time to figure out why.

I have no experience with pythonanywhere. So far all issues I had with
deploying my applications have been solved by Webfaction's support
people.


Kind regards,

Annet

-- 
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] 2 New NoSQL database adapters

2015-08-14 Thread Mark Graves
Hey everyone,

I have two new databases that I've been toying with that I'd like to 
implement as database adapters.

I have written nothing yet web2py / pydal specific...all just python.

I was looking around for info on constructing and contributing new adapters.

Is there a best practices guide that I missed?

Thanks,

Mark

-- 
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: Keep values with a list:string field?

2015-08-14 Thread Ian W. Scott
Thanks Richard. I will if I have time. I find these small fixes have a way 
of becoming bigger projects than I expect :)

Ian

On Friday, August 14, 2015 at 10:27:53 AM UTC-4, Richard wrote:
>
> Ian, you may also just write your own widget for list:string that way it 
> should behave correctly...
>
>
> http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=widget#Widgets
>
> def my_string_widget(field, value):
> return INPUT(_name=field.name,
>  _id="%s_%s" % (field._tablename, field.name),
>  _class=field.type,
>  _value=value,
>  requires=field.requires)
>
> Field('comment', 'string', widget=my_string_widget)
>
>
> On Fri, Aug 14, 2015 at 9:50 AM, Ian W. Scott  > wrote:
>
>> I agree with Richard that the issue (or my issue at least) has to do with 
>> the widget, not with the internals of the field type or its validators.
>>
>> There are, I think, valid use cases in which you want to use a 
>> list-string field but can't know ahead-of-time what the possible values 
>> will be. In one of my forms I'm (using SQLFORM.factory) using a list:string 
>> field to enter a series of word sets that will be used to build a 
>> subsequent collection of quiz questions automatically. I don't want to have 
>> to define ahead of time all the word-sets I might choose! But I'm also not 
>> concerned about duplication because the entered word-sets are just being 
>> used temporarily for the quiz-question generation. This may seem like an 
>> edge case, but I've got several forms with similar legitimate uses of 
>> list:string without a pre-defined set of values.
>>
>> In fact, the widget I'm having trouble with (text input with links to add 
>> more inputs below) only appears with list:string fields that *don't* have 
>> IS_IN_SET or IS_IN_DB. So this kind of use -- entry of and arbitrary number 
>> of arbitrary strings -- seems to be exactly what the web2py widget was 
>> designed to handle.
>>
>> As such, I think this *is* a shortcoming of the widget that should be 
>> fixed. The widget is being used for its intended purpose, but it's not 
>> following the "keepvalues" behaviour set for the SQLFORM. I'll submit a 
>> ticket on github.
>>
>> Val K's suggestion isn't complete, partly because it's now bypassing the 
>> SQLFORM's own keepvalues setting entirely. But thanks for the suggestion 
>> and I'll think more about it.
>>
>> Ian
>>
>> On Friday, August 14, 2015 at 9:24:29 AM UTC-4, Richard wrote:
>>>
>>> You need to use form.vars at first... At the begining your form is 
>>> emptyl, so you need to get the inputed value from the form not from 
>>> request.vars... You take them form request.vars for field default but when 
>>> you redirect you need to pass the form.vars to url...
>>>
>>> But even then, I am not sure it will works... The problem seems more 
>>> about the list:string type field which doesn't know how to handel available 
>>> values except if you use IS_IN_SET()...
>>>
>>> Richard
>>>
>>> On Thu, Aug 13, 2015 at 4:53 PM, Val K  wrote:
>>>
 Hello!
 Looks some terrible, but does what you want!
 Just paste in any controller and go to   .../list_fld_keep_values_tst
 or you can preset list-values by URL('your_controller', '
 list_fld_keep_values_tst', vars=dict(defs=['val_1','val_2','val_3']))

 def list_fld_keep_values_tst():
 
 frm=SQLFORM.factory(  Field('fld_lst', 'list:srting', default = 
 request.vars.defs)  )
 if frm.process().accepted:
 
 #place your code here,  before redirect!
 
 session.flash='Well are you happy now? Let me know in any 
 case!'
 redirect(URL('list_fld_keep_values_tst', vars=dict(defs=request
 .vars.fld_lst) ))
 elif  frm.errors:
 #do any 
 response.flash='there are errors!' 
 return dict(frm=frm)




 On Wednesday, June 25, 2014 at 6:33:26 PM UTC+3, Ian W. Scott wrote:
>
> I've got a SQLFORM.factory form set to keep values after processing 
> with process(keepvalues=True). But it doesn't work on a list:string 
> field. 
> The (otherwise very nice) widget loses all but the first value when the 
> form is submitted (i.e., all but the first text inputs for the field 
> disappear). Is there any way to carry those other text inputs and their 
> values over?
>
>
> -- 
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>

Re: [web2py] Re: Keep values with a list:string field?

2015-08-14 Thread Richard Vézina
Ian, you may also just write your own widget for list:string that way it
should behave correctly...

http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=widget#Widgets

def my_string_widget(field, value):
return INPUT(_name=field.name,
 _id="%s_%s" % (field._tablename, field.name),
 _class=field.type,
 _value=value,
 requires=field.requires)

Field('comment', 'string', widget=my_string_widget)


On Fri, Aug 14, 2015 at 9:50 AM, Ian W. Scott  wrote:

> I agree with Richard that the issue (or my issue at least) has to do with
> the widget, not with the internals of the field type or its validators.
>
> There are, I think, valid use cases in which you want to use a list-string
> field but can't know ahead-of-time what the possible values will be. In one
> of my forms I'm (using SQLFORM.factory) using a list:string field to enter
> a series of word sets that will be used to build a subsequent collection of
> quiz questions automatically. I don't want to have to define ahead of time
> all the word-sets I might choose! But I'm also not concerned about
> duplication because the entered word-sets are just being used temporarily
> for the quiz-question generation. This may seem like an edge case, but I've
> got several forms with similar legitimate uses of list:string without a
> pre-defined set of values.
>
> In fact, the widget I'm having trouble with (text input with links to add
> more inputs below) only appears with list:string fields that *don't* have
> IS_IN_SET or IS_IN_DB. So this kind of use -- entry of and arbitrary number
> of arbitrary strings -- seems to be exactly what the web2py widget was
> designed to handle.
>
> As such, I think this *is* a shortcoming of the widget that should be
> fixed. The widget is being used for its intended purpose, but it's not
> following the "keepvalues" behaviour set for the SQLFORM. I'll submit a
> ticket on github.
>
> Val K's suggestion isn't complete, partly because it's now bypassing the
> SQLFORM's own keepvalues setting entirely. But thanks for the suggestion
> and I'll think more about it.
>
> Ian
>
> On Friday, August 14, 2015 at 9:24:29 AM UTC-4, Richard wrote:
>>
>> You need to use form.vars at first... At the begining your form is
>> emptyl, so you need to get the inputed value from the form not from
>> request.vars... You take them form request.vars for field default but when
>> you redirect you need to pass the form.vars to url...
>>
>> But even then, I am not sure it will works... The problem seems more
>> about the list:string type field which doesn't know how to handel available
>> values except if you use IS_IN_SET()...
>>
>> Richard
>>
>> On Thu, Aug 13, 2015 at 4:53 PM, Val K  wrote:
>>
>>> Hello!
>>> Looks some terrible, but does what you want!
>>> Just paste in any controller and go to   .../list_fld_keep_values_tst
>>> or you can preset list-values by URL('your_controller', '
>>> list_fld_keep_values_tst', vars=dict(defs=['val_1','val_2','val_3']))
>>>
>>> def list_fld_keep_values_tst():
>>>
>>> frm=SQLFORM.factory(  Field('fld_lst', 'list:srting', default =
>>> request.vars.defs)  )
>>> if frm.process().accepted:
>>>
>>> #place your code here,  before redirect!
>>>
>>> session.flash='Well are you happy now? Let me know in any case!'
>>> redirect(URL('list_fld_keep_values_tst', vars=dict(defs=request.
>>> vars.fld_lst) ))
>>> elif  frm.errors:
>>> #do any
>>> response.flash='there are errors!'
>>> return dict(frm=frm)
>>>
>>>
>>>
>>>
>>> On Wednesday, June 25, 2014 at 6:33:26 PM UTC+3, Ian W. Scott wrote:

 I've got a SQLFORM.factory form set to keep values after processing
 with process(keepvalues=True). But it doesn't work on a list:string field.
 The (otherwise very nice) widget loses all but the first value when the
 form is submitted (i.e., all but the first text inputs for the field
 disappear). Is there any way to carry those other text inputs and their
 values over?


 --
>>> 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+un...@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 and stop receiving emails from it, send an
> email to w

Re: [web2py] Re: Keep values with a list:string field?

2015-08-14 Thread Ian W. Scott
I agree with Richard that the issue (or my issue at least) has to do with 
the widget, not with the internals of the field type or its validators.

There are, I think, valid use cases in which you want to use a list-string 
field but can't know ahead-of-time what the possible values will be. In one 
of my forms I'm (using SQLFORM.factory) using a list:string field to enter 
a series of word sets that will be used to build a subsequent collection of 
quiz questions automatically. I don't want to have to define ahead of time 
all the word-sets I might choose! But I'm also not concerned about 
duplication because the entered word-sets are just being used temporarily 
for the quiz-question generation. This may seem like an edge case, but I've 
got several forms with similar legitimate uses of list:string without a 
pre-defined set of values.

In fact, the widget I'm having trouble with (text input with links to add 
more inputs below) only appears with list:string fields that *don't* have 
IS_IN_SET or IS_IN_DB. So this kind of use -- entry of and arbitrary number 
of arbitrary strings -- seems to be exactly what the web2py widget was 
designed to handle.

As such, I think this *is* a shortcoming of the widget that should be 
fixed. The widget is being used for its intended purpose, but it's not 
following the "keepvalues" behaviour set for the SQLFORM. I'll submit a 
ticket on github.

Val K's suggestion isn't complete, partly because it's now bypassing the 
SQLFORM's own keepvalues setting entirely. But thanks for the suggestion 
and I'll think more about it.

Ian

On Friday, August 14, 2015 at 9:24:29 AM UTC-4, Richard wrote:
>
> You need to use form.vars at first... At the begining your form is emptyl, 
> so you need to get the inputed value from the form not from request.vars... 
> You take them form request.vars for field default but when you redirect you 
> need to pass the form.vars to url...
>
> But even then, I am not sure it will works... The problem seems more about 
> the list:string type field which doesn't know how to handel available 
> values except if you use IS_IN_SET()...
>
> Richard
>
> On Thu, Aug 13, 2015 at 4:53 PM, Val K > 
> wrote:
>
>> Hello!
>> Looks some terrible, but does what you want!
>> Just paste in any controller and go to   .../list_fld_keep_values_tst
>> or you can preset list-values by URL('your_controller', '
>> list_fld_keep_values_tst', vars=dict(defs=['val_1','val_2','val_3']))
>>
>> def list_fld_keep_values_tst():
>> 
>> frm=SQLFORM.factory(  Field('fld_lst', 'list:srting', default = 
>> request.vars.defs)  )
>> if frm.process().accepted:
>> 
>> #place your code here,  before redirect!
>> 
>> session.flash='Well are you happy now? Let me know in any case!'
>> redirect(URL('list_fld_keep_values_tst', vars=dict(defs=request.
>> vars.fld_lst) ))
>> elif  frm.errors:
>> #do any 
>> response.flash='there are errors!' 
>> return dict(frm=frm)
>>
>>
>>
>>
>> On Wednesday, June 25, 2014 at 6:33:26 PM UTC+3, Ian W. Scott wrote:
>>>
>>> I've got a SQLFORM.factory form set to keep values after processing with 
>>> process(keepvalues=True). But it doesn't work on a list:string field. The 
>>> (otherwise very nice) widget loses all but the first value when the form is 
>>> submitted (i.e., all but the first text inputs for the field disappear). Is 
>>> there any way to carry those other text inputs and their values over?
>>>
>>>
>>> -- 
>> 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+un...@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 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: Keep values with a list:string field?

2015-08-14 Thread Richard Vézina
You need to use form.vars at first... At the begining your form is emptyl,
so you need to get the inputed value from the form not from request.vars...
You take them form request.vars for field default but when you redirect you
need to pass the form.vars to url...

But even then, I am not sure it will works... The problem seems more about
the list:string type field which doesn't know how to handel available
values except if you use IS_IN_SET()...

Richard

On Thu, Aug 13, 2015 at 4:53 PM, Val K  wrote:

> Hello!
> Looks some terrible, but does what you want!
> Just paste in any controller and go to   .../list_fld_keep_values_tst
> or you can preset list-values by URL('your_controller', '
> list_fld_keep_values_tst', vars=dict(defs=['val_1','val_2','val_3']))
>
> def list_fld_keep_values_tst():
>
> frm=SQLFORM.factory(  Field('fld_lst', 'list:srting', default =
> request.vars.defs)  )
> if frm.process().accepted:
>
> #place your code here,  before redirect!
>
> session.flash='Well are you happy now? Let me know in any case!'
> redirect(URL('list_fld_keep_values_tst', vars=dict(defs=request.
> vars.fld_lst) ))
> elif  frm.errors:
> #do any
> response.flash='there are errors!'
> return dict(frm=frm)
>
>
>
>
> On Wednesday, June 25, 2014 at 6:33:26 PM UTC+3, Ian W. Scott wrote:
>>
>> I've got a SQLFORM.factory form set to keep values after processing with
>> process(keepvalues=True). But it doesn't work on a list:string field. The
>> (otherwise very nice) widget loses all but the first value when the form is
>> submitted (i.e., all but the first text inputs for the field disappear). Is
>> there any way to carry those other text inputs and their values over?
>>
>>
>> --
> 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.
>

-- 
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: auth.settings.extra_fields problem

2015-08-14 Thread 黄祥
if you put define table separtely (into more than 1 file), models file is 
load base on file name ordered.
so let say you have 
db_wizard_1.py that define table department (generate first)
db_wizard_2.py that define table auth_tables

in case you put all the define tables into 1 file such as db.py
so the define table is order by top down base (the top line 1, is define 
first).

best regards,
stifan

On Friday, August 14, 2015 at 5:23:52 PM UTC+7, Paolo Amboni wrote:
>
> It's true!!!
> The table is in another model file.
> I moved before the declaration and all works!!!
> Which is the order web2py use to load models file?
>
>
> Il giorno venerdì 14 agosto 2015 12:12:04 UTC+2, 黄祥 ha scritto:
>>
>> not sure without seeing the full code, but i guess you are not define 
>> table department before define auth tables.
>>
>> best regards,
>> stifan
>>
>> On Friday, August 14, 2015 at 4:46:45 PM UTC+7, Paolo Amboni wrote:
>>>
>>> This don't work:
>>> auth.settings.extra_fields['auth_user']= [ Field('id_dep','reference 
>>> departement'),]  :
>>> Cannot resolve reference departement in auth_user definition
>>> This work:
>>> auth.settings.extra_fields['auth_user']= [ Field('id_dep','integer'),]
>>>
>>> Why?
>>>
>>> Is there a way to make it work?
>>>
>>

-- 
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: Change in application request.vars when switching from Rocket to Lighttpd+FastCGI

2015-08-14 Thread Niphlod
it's the same level of bummer, if not a higher order of magnitude, to patch 
core web2py to address a bugged webserver.

On Friday, August 14, 2015 at 11:31:15 AM UTC+2, Encompass solutions wrote:
>
> Is there any progress with this issue?
> I have lighttpd setup and it seems to still have the issue.  Take a look 
> at this screenshot to see.
> It's a real bummer as the NGINX has proven hard to install on centos 6.6. 
> At least for us. :)
>
>
>
>
> On Sunday, March 1, 2015 at 10:38:37 AM UTC+2, Niphlod wrote:
>>
>> yep, but we do it "for the users" in all the "important" places, like 
>> this, we use request.env.get('THE_PROPER_KEY')
>>
>> On Saturday, February 28, 2015 at 9:27:20 PM UTC+1, Massimo Di Pierro 
>> wrote:
>>>
>>> They are upper case in wsgi but we are supposed to make them all lower 
>>> case here:
>>>
>>> https://github.com/web2py/web2py/blob/master/gluon/rewrite.py#L1073
>>>
>>> On Saturday, 28 February 2015 10:44:35 UTC-6, Niphlod wrote:



 On Saturday, February 28, 2015 at 5:08:38 PM UTC+1, Massimo Di Pierro 
 wrote:
>
> it is supposed to be request.env.query_string 
> or request.env.get('query_string'). It is supposed to be lower case and 
> not 
> upper case. If nginx has it upper case than there is a bug.
>
> In retrospect it was a mistake to convert all the env vars to lower 
> case and replace the dashed with underscore but that is what web2py does 
> anyway.
>
>>
>>
 uhm. the problem was on lighttpd. 
 Anyway, I think env vars are all uppercase: we just normalize them to 
 have an underscore and be lowercase, but it's certainly not the issue at 
 hand...web2py's code picks it up from the right place.

>>>

-- 
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: auth.settings.extra_fields problem

2015-08-14 Thread Paolo Amboni
It's true!!!
The table is in another model file.
I moved before the declaration and all works!!!
Which is the order web2py use to load models file?


Il giorno venerdì 14 agosto 2015 12:12:04 UTC+2, 黄祥 ha scritto:
>
> not sure without seeing the full code, but i guess you are not define 
> table department before define auth tables.
>
> best regards,
> stifan
>
> On Friday, August 14, 2015 at 4:46:45 PM UTC+7, Paolo Amboni wrote:
>>
>> This don't work:
>> auth.settings.extra_fields['auth_user']= [ Field('id_dep','reference 
>> departement'),]  :
>> Cannot resolve reference departement in auth_user definition
>> This work:
>> auth.settings.extra_fields['auth_user']= [ Field('id_dep','integer'),]
>>
>> Why?
>>
>> Is there a way to make it work?
>>
>

-- 
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: auth.settings.extra_fields problem

2015-08-14 Thread 黄祥
not sure without seeing the full code, but i guess you are not define table 
department before define auth tables.

best regards,
stifan

On Friday, August 14, 2015 at 4:46:45 PM UTC+7, Paolo Amboni wrote:
>
> This don't work:
> auth.settings.extra_fields['auth_user']= [ Field('id_dep','reference 
> departement'),]  :
> Cannot resolve reference departement in auth_user definition
> This work:
> auth.settings.extra_fields['auth_user']= [ Field('id_dep','integer'),]
>
> Why?
>
> Is there a way to make it work?
>

-- 
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] auth.settings.extra_fields problem

2015-08-14 Thread Paolo Amboni
This don't work:
auth.settings.extra_fields['auth_user']= [ Field('id_dep','reference 
departement'),]  :
Cannot resolve reference departement in auth_user definition
This work:
auth.settings.extra_fields['auth_user']= [ Field('id_dep','integer'),]

Why?

Is there a way to make it work?

-- 
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: Change in application request.vars when switching from Rocket to Lighttpd+FastCGI

2015-08-14 Thread Encompass solutions
Is there any progress with this issue?
I have lighttpd setup and it seems to still have the issue.  Take a look at 
this screenshot to see.
It's a real bummer as the NGINX has proven hard to install on centos 6.6. 
At least for us. :)




On Sunday, March 1, 2015 at 10:38:37 AM UTC+2, Niphlod wrote:
>
> yep, but we do it "for the users" in all the "important" places, like 
> this, we use request.env.get('THE_PROPER_KEY')
>
> On Saturday, February 28, 2015 at 9:27:20 PM UTC+1, Massimo Di Pierro 
> wrote:
>>
>> They are upper case in wsgi but we are supposed to make them all lower 
>> case here:
>>
>> https://github.com/web2py/web2py/blob/master/gluon/rewrite.py#L1073
>>
>> On Saturday, 28 February 2015 10:44:35 UTC-6, Niphlod wrote:
>>>
>>>
>>>
>>> On Saturday, February 28, 2015 at 5:08:38 PM UTC+1, Massimo Di Pierro 
>>> wrote:

 it is supposed to be request.env.query_string 
 or request.env.get('query_string'). It is supposed to be lower case and 
 not 
 upper case. If nginx has it upper case than there is a bug.

 In retrospect it was a mistake to convert all the env vars to lower 
 case and replace the dashed with underscore but that is what web2py does 
 anyway.

>
>
>>> uhm. the problem was on lighttpd. 
>>> Anyway, I think env vars are all uppercase: we just normalize them to 
>>> have an underscore and be lowercase, but it's certainly not the issue at 
>>> hand...web2py's code picks it up from the right place.
>>>
>>

-- 
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: Is there any alternative to Pythonanywhere hosting?

2015-08-14 Thread Joe
Yes, I know, so what I did was, I uploaded my app folder to pythonanywhere 
using sftp and that works. I can run the app but only if I  use sqlite db, 
I can't connect to the mysql. That's my problem.

On Friday, August 14, 2015 at 5:05:16 PM UTC+8, Oli wrote:
>
>
> Am Freitag, 14. August 2015 09:28:03 UTC+2 schrieb Joe:
>>
>> Is that because you had an issue with your bigger apps on pythonanywhere? 
>> If so, how did you realize that the app size was the problem? I am still 
>> trying figure out what the problem is with my app.
>> On Friday, August 14, 2015 at 3:09:01 PM UTC+8, Oli wrote:
>>>
>>>
>>> Am Freitag, 14. August 2015 05:38:24 UTC+2 schrieb Joe:

 I am using Pythonanywhwere and having some problems. Can anyone 
 recommend an other hosting for web2py apps where the support understands 
 the web2py framework and they can actually fix problems when needed?

>>>  
>>> I put my big apps in an Cloudstore and use wget to load the apps on 
>>> pythonanywhere.
>>>
>>  
> the Upload with the "web2py admin Interface" is limited. This is not a 
> Limit from web2py
>  
>

-- 
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: Is there any alternative to Pythonanywhere hosting?

2015-08-14 Thread Oli

Am Freitag, 14. August 2015 09:28:03 UTC+2 schrieb Joe:
>
> Is that because you had an issue with your bigger apps on pythonanywhere? 
> If so, how did you realize that the app size was the problem? I am still 
> trying figure out what the problem is with my app.
> On Friday, August 14, 2015 at 3:09:01 PM UTC+8, Oli wrote:
>>
>>
>> Am Freitag, 14. August 2015 05:38:24 UTC+2 schrieb Joe:
>>>
>>> I am using Pythonanywhwere and having some problems. Can anyone 
>>> recommend an other hosting for web2py apps where the support understands 
>>> the web2py framework and they can actually fix problems when needed?
>>>
>>  
>> I put my big apps in an Cloudstore and use wget to load the apps on 
>> pythonanywhere.
>>
>  
the Upload with the "web2py admin Interface" is limited. This is not a 
Limit from web2py
 

-- 
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: Error in GAE TypeError: ConjunctionNode()

2015-08-14 Thread Jacinto Parga
It also happens width some SQLFORM.grid:

form = SQLFORM.grid(db.t_familiares, fields=fields,create=False)

The Traceback:

Traceback (most recent call last):
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/restricted.py"
, line 227 

, in restricted
exec ccode in environment
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/applications/CAS/controllers/gestor.py"
, line 404 

, in 
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/globals.py"
, line 412 

, in 
self._caller = lambda f: f()
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/tools.py"
, line 3769 

, in f
return action(*a, **b)
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/applications/CAS/controllers/gestor.py"
, line 31 

, in familia_manage
form = SQLFORM.grid(db.t_familiares, fields=fields,create=False)
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/sqlhtml.py"
, line 2456 

, in grid
search_menu = SQLFORM.search_menu(sfields, prefix=prefix)
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/sqlhtml.py"
, line 1882 

, in search_menu
_class='form-control',
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/validators.py"
, line 586 

, in options
self.build_set()
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/validators.py"
, line 572 

, in build_set
records = self.dbset(table).select(*fields, **dd)
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/packages/dal/pydal/objects.py"
, line 2026 

, in select
return adapter.select(self.query,fields,attributes)
  File 
"/base/data/home/apps/s~clubatletismosada/2.386424209805371251/gluon/packages/dal/pydal/adapters/google_adapters.py"
, line 484 

, in select
(items, tablename, field

[web2py] Re: Is there any alternative to Pythonanywhere hosting?

2015-08-14 Thread Joe
Thanks Annet, did you ever work out that issue with Webfaction?

On Friday, August 14, 2015 at 1:06:50 PM UTC+8, Annet wrote:
>
> Hi Joe,
>
> I host my appliaction at Webfaction and had a similar issue, support 
> advised me to set pool_size = 0
> pool_size = 1 conflicted with a setting outside web2py.
>
>
> Kind regads,
>
> Annet
>

-- 
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: Is there any alternative to Pythonanywhere hosting?

2015-08-14 Thread Joe
Is that because you had an issue with your bigger apps on pythonanywhere? 
If so, how did you realize that the app size was the problem? I am still 
trying figure out what the problem is with my app.
On Friday, August 14, 2015 at 3:09:01 PM UTC+8, Oli wrote:
>
>
> Am Freitag, 14. August 2015 05:38:24 UTC+2 schrieb Joe:
>>
>> I am using Pythonanywhwere and having some problems. Can anyone recommend 
>> an other hosting for web2py apps where the support understands the web2py 
>> framework and they can actually fix problems when needed?
>>
>  
> I put my big apps in an Cloudstore and use wget to load the apps on 
> pythonanywhere.
>  
>

-- 
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: Is there any alternative to Pythonanywhere hosting?

2015-08-14 Thread Oli

Am Freitag, 14. August 2015 05:38:24 UTC+2 schrieb Joe:
>
> I am using Pythonanywhwere and having some problems. Can anyone recommend 
> an other hosting for web2py apps where the support understands the web2py 
> framework and they can actually fix problems when needed?
>
 
I put my big apps in an Cloudstore and use wget to load the apps on 
pythonanywhere.
 

-- 
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.