Re: [web2py] Re: Some trouble with the oracle driver

2014-12-22 Thread Paolo Valleri
I don't have an oracle instance to run tests. do you mind to check if 
with_alias works in a simple query?

Paolo
Il giorno domenica 21 dicembre 2014 11:52:06 UTC+1, Manuele ha scritto:

 Il 21/12/14 08:00, Paolo Valleri ha scritto: 
  My guest is the alias name 'group', have you already tried with a 
  different name? 
 uhm no... but I solved adding later on the needed values :) with 
 something like: 

 for row in mres: 
 row['table'] = 'municipio' 
 row['group'] = 'Municipio' 

 removing the expressions from the select. 

 thank you 

 Manuele 
  
  Paolo 



-- 
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] pass query from client to sever

2014-12-22 Thread Manuele Pesenti
Il 22/12/14 07:07, Massimo Di Pierro ha scritto:
 We do not have a way to serialize queries in a server independent way but we 
 should. 
I'm using this recipe with success:
http://www.web2pyslices.com/slice/show/1593/class-for-building-db-queries-from-python-dictionaries

essentially I serialize query using:

query = db.table.id0
serialized = query.as_json()

and I rebuild them just with:

rebuilded = qparser.parse(json_loads(request.vars._query))

and it's working just fine at the moment.

M.

-- 
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: Australian Users

2014-12-22 Thread Simon Ashley
 That's a negative but went to school both ends of Johnston St. Family's in 
Vic for the holidays while I slave away on the GC on EOY system changes. 
 :) 
 
 

-- 
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: One AutoComplete overrides another

2014-12-22 Thread tim . nyborg
Found my mistake; hopefully it will save someone time in the future.

Multiple autocompletes referring to the same field need keyword arguments, 
otherwise they all end up as the 
default '_autocomplete_%(tablename)s_%(fieldname)s' 
(_autocomplete_module_code in my case).  Once I gave them distinct names, 
everything worked.

-- 
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] wiki page contents

2014-12-22 Thread Manuele Pesenti
Hi *,
I'm trying the auth.wiki for the first time and I cannot find where the
pages contens is saved.
on the db? somewhere on the fs?

Thank you

Manuele

-- 
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] Lazy options widget

2014-12-22 Thread Gael Princivalle
Hello all.

I'm still trying to use this lazy option widget:
http://dev.s-cubism.com/plugin_lazy_options_widget

Also in a new application, when I load the db page or the index page I have 
this error:
type 'exceptions.TypeError' unsupported type for timedelta seconds 
component: NoneType

1278.
1279.
1280.

1281.
1282.


# if we have auth info
#if not expired it, used it
#if expired, clear the session
# else, only clear auth info in the session
if auth:
delta = datetime.timedelta(days=0, seconds=auth.expiration)

I don't understand why, and when I cancel all the plugins and all codes in 
db.py and the controler, the problem still the same, also if I restart 
Apache.

Someone knows why ?

Thanks, regards.

-- 
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: wiki page contents

2014-12-22 Thread Niphlod
the db (wiki_* tables)

On Monday, December 22, 2014 11:29:16 AM UTC+1, Manuele wrote:

 Hi *, 
 I'm trying the auth.wiki for the first time and I cannot find where the 
 pages contens is saved. 
 on the db? somewhere on the fs? 

 Thank you 

 Manuele 


-- 
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: wiki page contents

2014-12-22 Thread Manuele Pesenti
Il 22/12/14 14:26, Niphlod ha scritto:
 the db (wiki_* tables)
so why I cannot see them from the admin page? :)
was exactly what I was expacting... and I looked for

M.

-- 
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: bootstrap 3 - if you care help test trunk now

2014-12-22 Thread Dmitry Ermolaev
how I can  include Layout Themes in admin/wizard/step1# ??
There is only Default ((
Plugins - also is empty (


воскресенье, 10 августа 2014 г., 6:30:06 UTC+4 пользователь Massimo Di 
Pierro написал:

 https://github.com/web2py/web2py/archive/master.zip

 note, you have to use formstyle. For auth forms this is now set by default 
 in db.py.

 form = SQLFORM(..., formstyle = SQLFORM.formstyles.bootstrap3)
 grid = SQLFORM.grid(..., formstyle = SQLFORM.formstyles.bootstrap3)
 grid = SQLFORM.smartgrid(..., formstyle = SQLFORM.formstyles.bootstrap3)



 On Saturday, 9 August 2014 03:41:15 UTC-5, eric cuver wrote:

 where i can find the web2py version with bootstrap

 Le samedi 9 août 2014 09:17:28 UTC+2, Massimo Di Pierro a écrit :

 also help us test the grid in trunk.

 On Saturday, 9 August 2014 02:13:38 UTC-5, Massimo Di Pierro wrote:

 Bootstrap 3 is in trunk now. Please help us test it.
 Also help us test that existing apps are not broken.

 Massimo



-- 
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: wiki page contents

2014-12-22 Thread Paolo Valleri
because I guess you have instantiated the wiki in a controller. To see 
table definitions in admin you have to instantiate it in a model file

Paolo

On Monday, December 22, 2014 2:46:03 PM UTC+1, Manuele wrote:

 Il 22/12/14 14:26, Niphlod ha scritto: 
  the db (wiki_* tables) 
 so why I cannot see them from the admin page? :) 
 was exactly what I was expacting... and I looked for 

 M. 


-- 
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: wiki page contents

2014-12-22 Thread Niphlod
it's because they're defined at run-time by default (i.e. when you call 
wiki from the controller) 
if you want to be able to see tables, you need to call auth.wiki
(resolve=False)



as documented (largely and explicitely) 
on 
http://web2py.com/books/default/chapter/29/03/overview?search=wiki#The-built-in-web2py-wiki

On Monday, December 22, 2014 2:46:03 PM UTC+1, Manuele wrote:

 Il 22/12/14 14:26, Niphlod ha scritto: 
  the db (wiki_* tables) 
 so why I cannot see them from the admin page? :) 
 was exactly what I was expacting... and I looked for 

 M. 


-- 
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: Not in touch with web2py community for a while. anything new interesting?

2014-12-22 Thread Kenneth
I think PyNuke is the latest CMS based on Web2py.

On Tuesday, December 2, 2014 1:07:48 PM UTC-5, Phyo Arkar wrote:

 Being busy and i lost touch with w2p community for a while.

 What are the new features of web2py?

 What are the most actively maintainted web2py community projects ? 
 (Plug-ins?, CMS ? , Blogs?)

 We are planning to build a community platform , with some blog features 
 and comment system.

 So , is there any plugin for that now? or we need to develop from scratch?

 Past 2 years I've been building SIngle page , Desktop APPs using web2py + 
 qooxdoo. So my team is missing a bit on normal Web things.

 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.


Re: [web2py] Re: SocketTimeout: Socket timed out before request

2014-12-22 Thread Richard Vézina
Antonio, Lennon suggest to delete his email because it was a mistake... And
your issue that seems more interresting seems unrelated to this thread... I
suggest you to create a thread about it!!

Richard

On Mon, Dec 15, 2014 at 7:50 PM, Antonio Salazar asalaza...@gmail.com
wrote:

 I know this is an old thread, but it's still the top Google result for
 this error message.

 It's also thrown with nested double braces, even inside a long comment,
 like:

 {{'''
 {{if true:}}
 {{pass}}
 '''}}

 Deleting the nested braces fixed the error.

 I was trying to comment code to convert a view to a component and found
 this error for the first time. It looks much more worse that it really is.

  --
 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] Datetime Grid Filtering ignores localized format and timezone

2014-12-22 Thread mcamel
Hi all,

I use frequently spanish localization, so dates are formated like 
day/month/year.

Everything works fine if this is located at languages/es.py: '%Y-%m-%d 
%H:%M:%S': '%d/%m/%Y %H:%M:%S'. Represents, validators and widgets, follow 
this rule.

But if you try to filter a grid by datetime with spanish format, it doesn't 
work. You have to especify the query with Iso format, which is annoying.
Even more, if you use 'w2p_timezone_plugin' to use local time zone, 
datetime filter also ignores it, so you have to specify UTC timezone.

So, datetime filters at grids only works with ISO format and UTC timezone.

Anyone knows a trick to make this work?.

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] tips requested for tracing errors

2014-12-22 Thread Alex Glaros
any suggestions for figuring out what line of code is causing the error?

field displayName is used in many places and hard to analyze

thanks

Alex Glaros

Error ticket for ES1
Ticket ID

127.0.0.1.2014-12-22.15-46-50.434cb922-6ec2-438c-a158-c2a710eafc0c

type 'exceptions.AttributeError' 'Table' object has no attribute 
'displayName'
Version  

web2py™Version 2.9.11-stable+timestamp.2014.09.15.23.35.11PythonPython 2.7.6
: C:\alex\web2py\web2py\web2py\web2py.exe (prefix: C:\Python27)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.

Traceback (most recent call last):
  File gluon/restricted.py, line 224, in restricted
  File C:/alex/web2py/web2py/web2py/applications/ES1/controllers/appadmin.py 
http://127.0.0.1:8000/admin/default/edit/ES1/controllers/appadmin.py, line 
464, in module
  File gluon/globals.py, line 392, in lambda
  File C:/alex/web2py/web2py/web2py/applications/ES1/controllers/appadmin.py 
http://127.0.0.1:8000/admin/default/edit/ES1/controllers/appadmin.py, line 
297, in update
f='download', args=request.args[:1]))
  File gluon/sqlhtml.py, line 1222, in __init__
  File gluon/sqlhtml.py, line 285, in widget
  File gluon/validators.py, line 579, in options
  File gluon/validators.py, line 555, in build_set
  File gluon/dal.py, line 9110, in __getitem__
AttributeError: 'Table' object has no attribute 'displayName'


Error snapshot

[image: help]

http://127.0.0.1:8000/admin/default/ticket/ES1/127.0.0.1.2014-12-22.15-46-50.434cb922-6ec2-438c-a158-c2a710eafc0c#

type 'exceptions.AttributeError'('Table' object has no attribute 
'displayName')
  


inspect attributes
Frames

   -   
   
 *File C:\alex\web2py\web2py\web2py\gluon\restricted.py in 
   restricted at line 224*
 code
 arguments
 variables   
   
   - 
 
   
 *File 
   C:\alex\web2py\web2py\web2py\applications\ES1\controllers\appadmin.py in 
   module at line 464*
 code
 arguments
 variables
  
  
   - 
 
   
 *File C:\alex\web2py\web2py\web2py\gluon\globals.py in lambda at 
   line 392*
 code
 arguments
 variables
   
  Code listing   
   - 
 
   
   
 *File 
   C:\alex\web2py\web2py\web2py\applications\ES1\controllers\appadmin.py in 
   update at line 297*
 code
 arguments
 variables
   
 Code listing
 
 
   
   292.
   293.
   294.
   295.
   296.
   297.
   
   298.
   299.
   300.
   301.
   
   form = SQLFORM(
   db[table], record, deletable=True, delete_label=T('Check to delete'),
   ignore_rw=ignore_rw and not keyed,
   linkto=URL('select',
  args=request.args[:1]), upload=URL(r=request,
 f='download', 
args=request.args[:1]))
   
   
   if form.accepts(request.vars, session):
   session.flash = T('done!')
   qry = query_by_table_type(table, db)
   
   


-- 
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: tips requested for tracing errors

2014-12-22 Thread Alex Glaros
found the error in a requires statement

but solved error through random luck.  Any suggestions for methodically 
identifying coding mistake would be greatly appreciated

-- 
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: tips requested for tracing errors

2014-12-22 Thread Alex Glaros
I searched the error ticket for traces of table name, line number, but 
couldn't see any connection to anything regarding the real error (which I 
knew)

-- 
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] ck_editor plugin updated

2014-12-22 Thread Tim Richardson
I've updated the ck_editor plugin. Improvements from dmvieira are merged. 
Also, ck_editor code is now the current release (4.4.6 Nov 25 2014)
Web2py slices: http://www.web2pyslices.com/slice/show/1952/ck-editor4-plugin

-- 
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: Australian Users

2014-12-22 Thread Tim Richardson
Three would be a user group! 
My office is in Johnston St so if you're ever around ... also there is a 
PUG first Mondays in Richmond, FYI (via Meetup).


On Monday, 22 December 2014 20:16:17 UTC+11, Simon Ashley wrote:

  That's a negative but went to school both ends of Johnston St. Family's 
 in Vic for the holidays while I slave away on the GC on EOY system changes. 
  :) 
  
  


-- 
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 using IOS Safari

2014-12-22 Thread Ira Fuchs
Can anyone please tell me why IOS Safari (on iPad) cannot display the 
Web2py admin page correctly? In particular the window on the right side of 
the page is not rendered. Atomic Web (another IOS browser) works but I 
would like to be able to use Safari. Is there a workaround?

-- 
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: One AutoComplete overrides another

2014-12-22 Thread Tim Nyborg
I haven't found a solution to this, but have found more detail about the 
problem:

The first defined autocomplete widget on a particular field overrides ALL 
others defined after.

idb.define_table(
'fee',
   ...
Field('module_code', 'string', writable=False, label='Module code', 
  requires=IS_IN_DB(idb, idb.module.code, 
error_message='Required'), 
  widget=SQLFORM.widgets.autocomplete(request, idb.module.code, 
min_length=1),
  )
)

idb.define_table(
'tutor_module',
...
Field('module_code', 'string', writable=False, label='Module code', 
  requires=IS_IN_DB(idb, idb.module.code, 
error_message='Required'), 
  widget=SQLFORM.widgets.autocomplete(request, idb.module.code, 
id_field=idb.module.id,
  orderby=idb.module.code, 
min_length=2, 
  help_fields=[idb.module.code, 
idb.module.title],
  help_string='%(code)s - 
%(title)s'),   
  )
)



In this case, the second table's autocomplete widget always renders the way 
the first should (including the missing id_field).

-- 
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] PYODBC and IIS App Pool Memory Leak?

2014-12-22 Thread Pbop
We have deployed a web2py app to a client site with the client now doing 
some testing. On an initial load into the app by the first browser and on 
stress load of concurrent users, this error is being thrown. 

class 'gluon.contrib.pypyodbc.Error' (u'HY090', u'[HY090] 
[Microsoft][ODBC Driver Manager] Invalid 

A refresh of the browser can get past it in most cases until at some point 
even a refresh will not work. 

Installation is using the ISAPI Option. Recycling the application pool 
clears the error and then it happens if you wait a while. Under load the 
app is very slow. 

I am thinking the error is a trojan caused when the App Pool runs out of 
memory or there is some problem in running under ISAPI. The app itself is 
using the DAL in a conventional way. HY090 is a low level error which was a 
problem reported at one point in pyodbc. It seems to be replicated mostly 
on an initial load. 

Any tips? 

-- 
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] SQL Whitelist Beta

2014-12-22 Thread abhishek dusane
Hello all,

I want to add this tool in plesk, I have searched many forums and sites for 
solutions but didn't get any solutions. Please anyone tell me how do I do 
that.

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] Using android for development

2014-12-22 Thread Rodrigo Cesar
Hi everybody, i have everyday some free time and want to use it to develop 
a program i'll use, but
the only machine i have on hands is a android tablet, i've read it's 
possible to run web2py on android,
my question is: is it possible to use android to develop? I don't realy 
need a very good platform, and
will be very happy to develop something on android that run on other 
platforms.

-- 
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 with Mobile Safari

2014-12-22 Thread Ira Fuchs
Safari on the iPad apparently sends a mobile useragent string which web2py 
uses to tailor the UI. As a result I do not see a way to get, for example, 
the form on the admin screen (the one that you can use to start a new app). 
Is there a way to get to this form on the mobile UI? Better yet, is there a 
way to force web2py to talk to the iPad as a desktop browser regardless of 
the useragent string that mobile Safari sends?

-- 
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 on iPad using Pythonista

2014-12-22 Thread Ira Fuchs
I am trying to get web2py working on an iPad running Pythonista. It works 
fine although there is no Tk library so everything must be done in the 
console or the web interface. The problem with using the web interface is 
that if you leave Pythonista and thereby make it a background process in 
order to open a browser, the IOS background timer will stop Pythonista 
after a few minutes. If I use webbrowser.open within Pythonista then I will 
get a browser tab that uses webkit and runs as part of the Pythonista task 
which means it will not be stopped by IOS. The problem is that this browser 
is sending a useragent string that web2py interprets as a mobile interface 
whcih seems to result in problems in the admin page (i.e., no right hand 
frame). The same problem occurs if I go to the web2py server using Safari, 
unless I modify the useragent string; or I use Atomic Web and tell it to 
look like a desktop browser.  My question is, how can I get web2py to 
respond to the useragent string that webkit is sending as if it was the 
string appropriate to a desktop?

-- 
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: Unable to connect to MSSQL via web2py - SSL Security Error

2014-12-22 Thread Dallas Baird


On Thursday, 25 September 2014 17:49:44 UTC+10, Alen Cerovic wrote:

 Can t believe it, it did the trick :) yes I am using binaries on windows 
 7 64bit. Can you explain me what is going on, thnx



FWIW: I didn't have this problem last week, but I do this week. Yesterday I 
installed Sql server integration services, client libraries, dts backwards 
compatability etc.. from the sql server 2008 r2 dvd. Perhaps this has 
introduced a new dll version?

Dallas 

-- 
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] Migrate sessions from files to DB

2014-12-22 Thread harsha tanguturi
The sessions are being stored in the files but I would like to migrate them 
to DB without disturbing the existing sessions. 

-- 
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: Unable to connect to MSSQL via web2py - SSL Security Error

2014-12-22 Thread Dallas Baird
Hi all,

I was not having this problem last week, all of a sudden I am.

Today I had installed many SQL SERVER 2008 r2 libraries (integration 
services, ssms, dts backwards compatability etc).

Perhaps the new installation has introduced a versioning problem with a dll?


Dallas

On Saturday, 27 September 2014 01:27:01 UTC+10, Niphlod wrote:

 I believe it's a problem in bbfreeze. But I must do additional tests for 
 it.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are 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: Searching for multiple words in SQLFORM.grid

2014-12-22 Thread Ariya Owam-aram
Thank you for your sharing. It working excellent.


On Friday, March 1, 2013 3:19:22 PM UTC+7, Mandar Vaze wrote:

 Hi,

 As you all know, SQLFORM.grid search does not support searching for 
 multiple words - it throws an error Invalid Query
 Searching for multiple words may be a common requirement.
 I looked thru various older posting on this group, but none worked for me 
 AS IS (Possiblly because they were old - it worked with whatever was 
 current version of web2py at the time of original post) This one came the 
 closest : https://groups.google.com/forum/?fromgroups=#!topic/web2py
 /9_1ECdKHKUo

 Here is the version that worked for me: (web2py Version 2.3.2 (2012-12-17 
 15:03:30) stable)

 #Referred to the web2py implementation of search (gluon/sqlhtml.py:def 
 grid())
 #Modified to support multiple words
 def search_query(fields, keywords):
 if isinstance(keywords, (tuple, list)):
 keywords = keywords[0]
 request.vars.keywords = keywords
 key = keywords.strip()
 if key and not '' in key and not ' in key:
 SEARCHABLE_TYPES = ('string', 'text', 'list:string')
 words = key.split(' ') if key else []
 filters = []
 for field in fields:
 if field.type in SEARCHABLE_TYPES:
 all_words_filters = []
 for word in words:
 all_words_filters.append(field.contains(word))
 filters.append(reduce(lambda a, b: (a  b), 
 all_words_filters))
 parts = filters
 else:
 parts = None
 if parts:
 return reduce(lambda a, b: a | b, parts)
 else:
 return None

 Why  in the first reduce ? Because if I use | then search results are 
 too wide. e.g. if I typed web2py is great - then using | would return 
 all the matches containing the word is even if web2py and great are 
 missing. 
 Off course using  isn't fool proof either since it will match a record 
 having text web2py is not great as well (since all three words are 
 present) 

 One big change from what previous posts having been saying is that I did 
 NOT override the search widget. Search widgets works well as is.
 Only difference is that I assigned the above function to searchable 
 parameter when calling the SQLFORM.grid like

 grid = SQLFORM.grid(query,create=True, searchable=search_query) #Use 
 other params as required

 I came to realize this after I looked at web2py code (gluon/sqlhtml.py) 
 where if searchable is callable - then it is called. I somehow used to 
 think that it is a boolean (True/False)

 I hope this helps someone

 -Mandar


-- 
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] Select rows

2014-12-22 Thread Oliver
I'm getting None printed in the webpage. I'm trying to print all 
first_name in the users table database.  I'm trying to follow the select 
section 
in 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Query--Set--Rows

I'm using MySQL for database and have few test records inserted in the 
users table.  Please let me know what am I missing in the controller.  I 
appreciate your help.  Thanks


*My Model: *

db.define_table('users',
Field('first_name', 'text'),
Field('last_name', 'text'))

*My Controller:*

def printall():
for row in db(db.users.id  0).select(db.users.ALL):
print row.first_name

or

def printall():
for row in db().select(db.users.ALL):
print row.first_name

-- 
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] Doubt in controllers (urgent)

2014-12-22 Thread sai7 Harsh
Sir,
Could you please explain how to give a condition such that below that it 
need to display error like marks above 60 only can apply but some person 
enter 50 so it need to display error 
and one more thing how to keep any field in the form is optional no need to 
fill it 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are 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] no suitable image found in web2py

2014-12-22 Thread Chandra G

Hi Friends

Find below my exceptional error. 
I am running mac OS x Yosemite...It would be great if you solve below the 
error.

Traceback (most recent call last):
  File /Users/chandramouli/Dropbox (TIS Group)/testing/Builds/Apollo/Code 
Src/web2py/gluon/restricted.py, line 224, in restricted
exec ccode in environment
  File /Users/chandramouli/Dropbox (TIS Group)/testing/Builds/Apollo/Code 
Src/web2py/applications/ApolloFinal/controllers/performance.py 
http://127.0.0.1:8000/admin/default/edit/ApolloFinal/controllers/performance.py,
 line 3, in module
from attribution import *
  File /Users/chandramouli/Dropbox (TIS Group)/testing/Builds/Apollo/Code 
Src/web2py/gluon/custom_import.py, line 92, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File applications/ApolloFinal/modules/attribution.py, line 5, in module
from pandas.tseries.offsets import *
  File /Users/chandramouli/Dropbox (TIS Group)/testing/Builds/Apollo/Code 
Src/web2py/gluon/custom_import.py, line 92, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File applications/ApolloFinal/modules/pandas/__init__.py, line 6, in 
module
from . import hashtable, tslib, lib
  File /Users/chandramouli/Dropbox (TIS Group)/testing/Builds/Apollo/Code 
Src/web2py/gluon/custom_import.py, line 105, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: dlopen(applications/ApolloFinal/modules/pandas/hashtable.so, 2): 
no suitable image found.  Did find:
 applications/ApolloFinal/modules/pandas/hashtable.so: unknown file type, first 
eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00


type 
'exceptions.ImportError'(dlopen(applications/ApolloFinal/modules/pandas/hashtable.so,
 2): no suitable image found. Did find: 
applications/ApolloFinal/modules/pandas/hashtable.so: unknown file type, first 
eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00)

-- 
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: interget or string to date

2014-12-22 Thread Sébastien Loix
An old post to solve a 2014 problem. Thanks for sharing! :)


El miércoles, 2 de noviembre de 2011 16:27:23 UTC+1, Vineet escribió:

 Recently, I wrote this function for my purpose. 
 See if this helps you. 
 Assuming that argument 'dte' input format is --  03-11-2011 

 [CODE] 
 import datetime, string 

 def str_to_dt(dte): 
 dte = str(dte) 
 dte = string.strip(dte) 
 if len(dte) == 10: 
 y = int(dte[6:]) 
 m = int(dte[3:5]) 
 d = int(dte[:2]) 
 return datetime.date(y, m, d) 
 [/CODE] 

 This returns output in python datetime.date format. 

 --Vineet 

 On Nov 2, 8:19 pm, Omi Chiba ochib...@gmail.com wrote: 
  This is more like python question but 
  
  jj.J2NSD is integer and has value = 2030 (MMDD) 
  
  I want to set the value as default value of FFNSD which is 'date' 
  type. 
  
  Field('FFNSD', 'date'), 
  
  I think I need to import datetime and convert from integer or stiring. 
  Is anyone know easy way to do it ? 
  
  This doesn't work because it set string to date... 
  
  db.FEDEXFORM.FFNSD.default = str(jj.J2NSD)[0:4]+-+str(jj.J2NSD) 
  [4:6]+-+str(jj.J2NSD)[6:8]

-- 
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 Users Session

2014-12-22 Thread Oliver
Hi All,

I really enjoy discovering the beauty of web2py.  Just got a newbie 
question :)

If I create multiple apps and use one db or sharing one db to all apps, can 
the login session be shared between apps?  Thanks.

For example from the default, we have the admin(which is lock), welcome and 
example apps.  Can welcome and example apps share the same auth_users 
session to members only pages?  I know the db can be shared but not sure if 
the session can be shared thru different apps.

Thanks all.

-- 
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: pass query from client to sever

2014-12-22 Thread Massimo Di Pierro
something like that should be included in web2py.

On Monday, 22 December 2014 00:07:18 UTC-6, Massimo Di Pierro wrote:

 We do not have a way to serialize queries in a server independent way but 
 we should. 

-- 
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: Doubt in controllers (urgent)

2014-12-22 Thread Dave S


On Tuesday, December 16, 2014 8:48:29 AM UTC-8, sai7 Harsh wrote:

 Sir,
 Could you please explain how to give a condition such that below that it 
 need to display error like marks above 60 only can apply but some person 
 enter 50 so it need to display error 
 and one more thing how to keep any field in the form is optional no need 
 to fill it 


You should take at look at the chapter of the Web2Py book that discusses 
validators.
URL:http://web2py.com/books/default/chapter/29/07/forms-and-validators
 

In particular, take a look at IS_EMPTY_OR() and IS_DECIMAL_IN_RANGE().
URL:http://web2py.com/books/default/chapter/29/07/forms-and-validators#Range--set-and-equality-validators

Are you planning on using SQLFORM, or doing HTML input fields?

/dps

-- 
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: Select rows

2014-12-22 Thread Dave S


On Wednesday, December 17, 2014 12:17:53 PM UTC-8, Oliver wrote:

 I'm getting None printed in the webpage. I'm trying to print all 
 first_name in the users table database.  I'm trying to follow the select 
 section in 
 http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Query--Set--Rows

 I'm using MySQL for database and have few test records inserted in the 
 users table.  Please let me know what am I missing in the controller.  I 
 appreciate your help.  Thanks


 *My Model: *

 db.define_table('users',
 Field('first_name', 'text'),
 Field('last_name', 'text'))

 *My Controller:*

 def printall():
 for row in db(db.users.id  0).select(db.users.ALL):
 print row.first_name

 or

 def printall():
 for row in db().select(db.users.ALL):
 print row.first_name



You are trying to print to the console for development purposes?

If you are showing a None as your result, then it appears your query 
isn't selecting any rows.  If you use the command line interface to your DB 
(sqlite3?) can you form a SQL SELECT command that retrieves the records you 
want?  If so, can you paste that command here?

/dps

-- 
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: Using android for development

2014-12-22 Thread Dave S


On Wednesday, December 17, 2014 4:58:24 PM UTC-8, Rodrigo Cesar wrote:

 Hi everybody, i have everyday some free time and want to use it to develop 
 a program i'll use, but
 the only machine i have on hands is a android tablet, i've read it's 
 possible to run web2py on android,
 my question is: is it possible to use android to develop? I don't realy 
 need a very good platform, and
 will be very happy to develop something on android that run on other 
 platforms.



The answer depends in part on how painful it is to enter lines of code on 
your tablet.  You should be able to use the built-IDE that Web2Py provides, 
but you may find not having a mouse and a physical keyboard to be 
cumbersome.  If you had another machine you could use to enter your code 
on, you could transfer it to the tablet for testing, but then you could 
probably run Web2Py on that machine (in local mode, at least).

/dps
 

-- 
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: pass query from client to sever

2014-12-22 Thread Niphlod
it is. it's just experimental.

On Tuesday, December 23, 2014 5:45:11 AM UTC+1, Massimo Di Pierro wrote:

 something like that should be included in web2py.

 On Monday, 22 December 2014 00:07:18 UTC-6, Massimo Di Pierro wrote:

 We do not have a way to serialize queries in a server independent way but 
 we should. 



-- 
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: Datetime Grid Filtering ignores localized format and timezone

2014-12-22 Thread Paolo Valleri
Hi,
the issue is 
here https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L1830
can you try to replace that line with the following:
iso_format = {'_data-w2p_datetime_format' : T('%Y-%m-%d %H:%M:%S')}

Paolo

On Monday, December 22, 2014 11:02:00 PM UTC+1, mcamel wrote:

 Hi all,

 I use frequently spanish localization, so dates are formated like 
 day/month/year.

 Everything works fine if this is located at languages/es.py: '%Y-%m-%d 
 %H:%M:%S': '%d/%m/%Y %H:%M:%S'. Represents, validators and widgets, follow 
 this rule.

 But if you try to filter a grid by datetime with spanish format, it 
 doesn't work. You have to especify the query with Iso format, which is 
 annoying.
 Even more, if you use 'w2p_timezone_plugin' to use local time zone, 
 datetime filter also ignores it, so you have to specify UTC timezone.

 So, datetime filters at grids only works with ISO format and UTC timezone.

 Anyone knows a trick to make this work?.

 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.