Re: Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-10 Thread rif
I am checking it right now, be back soon.

-rif

vineri, 10 ianuarie 2014, 01:28:37 UTC+2, Manuele a scris:

 Il 10/09/12 15:49, rif ha scritto: 
  I started the development of a new django-like admin interface. 
  
  You can find it here: https://github.com/rif/web2admin 
  
  It is very basic but still usable because it uses SQLFORM.smartgrid. 
  
  I am announcing it early because I need your feedback and feature 
  requests so that I can find out if grid will be able to support all 
  the desired features. 
  
  For quick start you can create a w2a_root group and add your user to 
  that group. 
  
  -rif 
  -- 



 Dear rif, 
 many compliments for the project! 
 I found a problem with virtual fields... but I don't know if it's 
 related to your plugin or directly to web2py. 
 I added a very simple virtual field like this one: 

 db.testtable.testfield = Field.Virtual(lambda row: 'foo') 

 and I obtain this error: 

 Traceback (most recent call last): 
   File /home/manuele/portali/web2py.git/gluon/restricted.py, line 217, 
 in restricted 
 exec ccode in environment 
   File 
 /home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
  

 line 116, in module 
   File /home/manuele/portali/web2py.git/gluon/globals.py, line 372, in 
 lambda 
 self._caller = lambda f: f() 
   File /home/manuele/portali/web2py.git/gluon/tools.py, line 3239, in f 
 return action(*a, **b) 
   File 
 /home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
  

 line 34, in view_table 
 showbuttontext = plugins.web2admin.showbuttontext, 
   File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2770, 
 in smartgrid 
 user_signature=user_signature, **kwargs) 
   File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2452, 
 in grid 
 value = row[str(field)] 
   File /home/manuele/portali/web2py.git/gluon/dal.py, line 7362, in 
 __getitem__ 
 raise ae 
 AttributeError: 'Row' object has no attribute 'unknown' 

 any idea? 

 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/groups/opt_out.


Re: Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-10 Thread rif
Unfortunately it seems to be a web2py grid/smartgrid bug. I opened a ticket 
here: http://code.google.com/p/web2py/issues/detail?id=1851

Meanwhile please note that defining an old style virtual field does not 
break the smartgrid:
class MyVirtualFields(object):
def testfield(self):
return 'foo'
db.testtable.virtualfields.append(MyVirtualFields())

I'll make a few updates to web2py with this occasion :)

Thanks,
-rif

vineri, 10 ianuarie 2014, 01:28:37 UTC+2, Manuele a scris:

 Il 10/09/12 15:49, rif ha scritto: 
  I started the development of a new django-like admin interface. 
  
  You can find it here: https://github.com/rif/web2admin 
  
  It is very basic but still usable because it uses SQLFORM.smartgrid. 
  
  I am announcing it early because I need your feedback and feature 
  requests so that I can find out if grid will be able to support all 
  the desired features. 
  
  For quick start you can create a w2a_root group and add your user to 
  that group. 
  
  -rif 
  -- 



 Dear rif, 
 many compliments for the project! 
 I found a problem with virtual fields... but I don't know if it's 
 related to your plugin or directly to web2py. 
 I added a very simple virtual field like this one: 

 db.testtable.testfield = Field.Virtual(lambda row: 'foo') 

 and I obtain this error: 

 Traceback (most recent call last): 
   File /home/manuele/portali/web2py.git/gluon/restricted.py, line 217, 
 in restricted 
 exec ccode in environment 
   File 
 /home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
  

 line 116, in module 
   File /home/manuele/portali/web2py.git/gluon/globals.py, line 372, in 
 lambda 
 self._caller = lambda f: f() 
   File /home/manuele/portali/web2py.git/gluon/tools.py, line 3239, in f 
 return action(*a, **b) 
   File 
 /home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
  

 line 34, in view_table 
 showbuttontext = plugins.web2admin.showbuttontext, 
   File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2770, 
 in smartgrid 
 user_signature=user_signature, **kwargs) 
   File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2452, 
 in grid 
 value = row[str(field)] 
   File /home/manuele/portali/web2py.git/gluon/dal.py, line 7362, in 
 __getitem__ 
 raise ae 
 AttributeError: 'Row' object has no attribute 'unknown' 

 any idea? 

 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/groups/opt_out.


Re: Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-10 Thread rif
I meant a few updates to web2admin :)

vineri, 10 ianuarie 2014, 13:46:24 UTC+2, rif a scris:

 Unfortunately it seems to be a web2py grid/smartgrid bug. I opened a 
 ticket here: http://code.google.com/p/web2py/issues/detail?id=1851

 Meanwhile please note that defining an old style virtual field does not 
 break the smartgrid:
 class MyVirtualFields(object):
 def testfield(self):
 return 'foo'
 db.testtable.virtualfields.append(MyVirtualFields())

 I'll make a few updates to web2py with this occasion :)

 Thanks,
 -rif

 vineri, 10 ianuarie 2014, 01:28:37 UTC+2, Manuele a scris:

 Il 10/09/12 15:49, rif ha scritto: 
  I started the development of a new django-like admin interface. 
  
  You can find it here: https://github.com/rif/web2admin 
  
  It is very basic but still usable because it uses SQLFORM.smartgrid. 
  
  I am announcing it early because I need your feedback and feature 
  requests so that I can find out if grid will be able to support all 
  the desired features. 
  
  For quick start you can create a w2a_root group and add your user to 
  that group. 
  
  -rif 
  -- 



 Dear rif, 
 many compliments for the project! 
 I found a problem with virtual fields... but I don't know if it's 
 related to your plugin or directly to web2py. 
 I added a very simple virtual field like this one: 

 db.testtable.testfield = Field.Virtual(lambda row: 'foo') 

 and I obtain this error: 

 Traceback (most recent call last): 
   File /home/manuele/portali/web2py.git/gluon/restricted.py, line 217, 
 in restricted 
 exec ccode in environment 
   File 
 /home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
  

 line 116, in module 
   File /home/manuele/portali/web2py.git/gluon/globals.py, line 372, in 
 lambda 
 self._caller = lambda f: f() 
   File /home/manuele/portali/web2py.git/gluon/tools.py, line 3239, in f 
 return action(*a, **b) 
   File 
 /home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
  

 line 34, in view_table 
 showbuttontext = plugins.web2admin.showbuttontext, 
   File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2770, 
 in smartgrid 
 user_signature=user_signature, **kwargs) 
   File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2452, 
 in grid 
 value = row[str(field)] 
   File /home/manuele/portali/web2py.git/gluon/dal.py, line 7362, in 
 __getitem__ 
 raise ae 
 AttributeError: 'Row' object has no attribute 'unknown' 

 any idea? 

 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/groups/opt_out.


Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-09 Thread Manuele Pesenti
Il 10/09/12 15:49, rif ha scritto:
 I started the development of a new django-like admin interface.

 You can find it here: https://github.com/rif/web2admin 

 It is very basic but still usable because it uses SQLFORM.smartgrid.

 I am announcing it early because I need your feedback and feature
 requests so that I can find out if grid will be able to support all
 the desired features.

 For quick start you can create a w2a_root group and add your user to
 that group.

 -rif
 -- 
  
  
  
Dear rif,
many compliments for the project!
I found a problem with virtual fields... but I don't know if it's
related to your plugin or directly to web2py.
I added a very simple virtual field like this one:

db.testtable.testfield = Field.Virtual(lambda row: 'foo')

and I obtain this error:

Traceback (most recent call last):
  File /home/manuele/portali/web2py.git/gluon/restricted.py, line 217,
in restricted
exec ccode in environment
  File
/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
line 116, in module
  File /home/manuele/portali/web2py.git/gluon/globals.py, line 372, in
lambda
self._caller = lambda f: f()
  File /home/manuele/portali/web2py.git/gluon/tools.py, line 3239, in f
return action(*a, **b)
  File
/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py,
line 34, in view_table
showbuttontext = plugins.web2admin.showbuttontext,
  File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2770,
in smartgrid
user_signature=user_signature, **kwargs)
  File /home/manuele/portali/web2py.git/gluon/sqlhtml.py, line 2452,
in grid
value = row[str(field)]
  File /home/manuele/portali/web2py.git/gluon/dal.py, line 7362, in
__getitem__
raise ae
AttributeError: 'Row' object has no attribute 'unknown'

any idea?

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/groups/opt_out.


Re: [web2py] [ANN] Started development on web2admin

2012-09-14 Thread rif
Hi rochacbruno, thank you for the kind words.

Yes select2 should be an improvement over chosen, I found about it here: 
https://github.com/h5bp/lazyweb-requests/issues/92 (they are planning to 
upgrade standard select). A widget would be great.

The url trick is very welcome I will get it in the release today, thank you.

The fields feature is ready and today I will work on action history (to 
keep a log of actions in the admin) and filters.

-rif

vineri, 14 septembrie 2012, 00:45:57 UTC+3, rochacbruno a scris:

 Nice work!

 the select2.js is the same as choosen? I really like it! should have a 
 web2py widget for this.

 SUGGESTION:

 it is very annoying to request host/app/plugin_web2admin the url does 
 not looks good. To change this, the hard option is tricking on routes. But 
 there is an easy way:

 NOTE: it is a tricky, maybe it can change in the future, for now it works 
 nice.

 On top of  MODELS/PLUGIN_WEB2ADMIN.PY add

 if request.controller == 'web2admin':
 request.controller = 'plugin_web2admin'
 response.view = response.view.replace('web2admin', 'plugin_web2admin')



 now you can calll localhost:8000/app/web2admin/ 

 I will start to use this, great work!

 ** is there a license?



-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-13 Thread rif
New features:

   - Admin logo configuration
   - Actions (execute functions on multiple rows)
   - w2a_export permission for restricting export feature
   - Screenshots in readme :)
   - Tweaks and bug fixes 
   
More to come:

   - Table fields exclusion
   - Filters (easy restrict range of displayed rows)
   - Inline tables (related tables on a single row)
   - Your suggestion here

-rif 

miercuri, 12 septembrie 2012, 19:07:10 UTC+3, rif a scris:

 There was a problem with the installation from master tip tar gz. Created 
 plugin archive for download 
 herehttps://github.com/downloads/rif/web2admin/web2py.plugin.web2admin.w2p
 .

 miercuri, 12 septembrie 2012, 18:50:20 UTC+3, rif a scris:

 Added plugin configuration options (inspired by sramana's instant-admin):

- items per page
- extra links in sidebar

 Every day when I get some free time I am adding some new features. If you 
 have requests or bug reports please don't hesitate :)

 Thanks,
 -rif



-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-13 Thread Bruno Rocha
Nice work!

the select2.js is the same as choosen? I really like it! should have a
web2py widget for this.

SUGGESTION:

it is very annoying to request host/app/plugin_web2admin the url does not
looks good. To change this, the hard option is tricking on routes. But
there is an easy way:

NOTE: it is a tricky, maybe it can change in the future, for now it works
nice.

On top of  MODELS/PLUGIN_WEB2ADMIN.PY add

if request.controller == 'web2admin':
 request.controller = 'plugin_web2admin'
 response.view = response.view.replace('web2admin', 'plugin_web2admin')



now you can calll localhost:8000/app/web2admin/

I will start to use this, great work!

** is there a license?

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-12 Thread rif
Added plugin configuration options (inspired by sramana's instant-admin):

   - items per page
   - extra links in sidebar

Every day when I get some free time I am adding some new features. If you 
have requests or bug reports please don't hesitate :)

Thanks,
-rif

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-12 Thread rif
There was a problem with the installation from master tip tar gz. Created 
plugin archive for download 
herehttps://github.com/downloads/rif/web2admin/web2py.plugin.web2admin.w2p
.

miercuri, 12 septembrie 2012, 18:50:20 UTC+3, rif a scris:

 Added plugin configuration options (inspired by sramana's instant-admin):

- items per page
- extra links in sidebar

 Every day when I get some free time I am adding some new features. If you 
 have requests or bug reports please don't hesitate :)

 Thanks,
 -rif


-- 





[web2py] [ANN] Started development on web2admin

2012-09-10 Thread rif
I started the development of a new django-like admin interface.

You can find it here: https://github.com/rif/web2admin 

It is very basic but still usable because it uses SQLFORM.smartgrid.

I am announcing it early because I need your feedback and feature requests 
so that I can find out if grid will be able to support all the desired 
features.

For quick start you can create a w2a_root group and add your user to that 
group.

-rif

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-10 Thread Marin Pranjić
Github is having some database problem right now.
But thanks for sharing this - I will try it later.

On Mon, Sep 10, 2012 at 3:49 PM, rif feric...@gmail.com wrote:

 I started the development of a new django-like admin interface.

 You can find it here: https://github.com/rif/web2admin

 It is very basic but still usable because it uses SQLFORM.smartgrid.

 I am announcing it early because I need your feedback and feature requests
 so that I can find out if grid will be able to support all the desired
 features.

 For quick start you can create a w2a_root group and add your user to that
 group.

 -rif

 --





--