Re: [web2py] Re: Center things in MARKMIN

2019-02-15 Thread rif
It worked! 

I had to use "title" as "centered" seems to be used but something else, but 
in the end it worked just great :)

Thank you a lot, you saved my day!
-rif

joi, 14 februarie 2019, 23:28:02 UTC+2, Val K a scris:
>
> Yes, just pass it:  
> auth.wiki(extra = dict(centred = lambda text: DIV(text, _style = 
> 'text-align:center;')))
>
> but it seems, that page should be edited/updated to get effect 
>
>
> On Friday, February 15, 2019 at 12:03:28 AM UTC+3, rif wrote:
>>
>> Can I do this with auth.wiki?
>>
>> În joi, 14 feb. 2019, 22:58 Val K >
>>> # you can extend MARKMIN using ``...``: 
>>>
>>> MARKMIN("blah blah  *``*Title``:centred blah blah",  extra = dict(centred 
>>> = lambda text: DIV(text, _style = 'text-align:center;')))
>>>
>>>
>>> On Thursday, February 14, 2019 at 3:47:22 PM UTC+3, rif wrote:
>>>>
>>>> hey guys,
>>>>
>>>> I am using auth.wiki and I would like to center things (e.g. titles, 
>>>> images) horizontaly on the page. 
>>>> I didn't find any documentation on this, does anybody have any hints 
>>>> for me?
>>>>
>>>> thanks,
>>>> -rif
>>>>
>>> -- 
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> --- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/web2py/KZ4YjTlzzRM/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/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] Center things in MARKMIN

2019-02-14 Thread rif
hey guys,

I am using auth.wiki and I would like to center things (e.g. titles, 
images) horizontaly on the page. 
I didn't find any documentation on this, does anybody have any hints for me?

thanks,
-rif

-- 
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: class for required fields

2017-02-23 Thread rif
Thank you, Leonel. I will try to do that.

I am just thinking that maybe a class should be added by the default 
formstyles and left to the users whether to use it or not.

joi, 23 februarie 2017, 18:31:55 UTC+2, Leonel Câmara a scris:
>
> Just make your own formstyle which adds the required class to inputs from 
> fields which requires is not None.
>

-- 
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] class for required fields

2017-02-23 Thread rif
Hi guys,

Was there any conclusion for this thread: 
https://groups.google.com/d/topic/web2py/lwKcjC-j__A/discussion ?

Is there a standard/recommended way to add a class to the required form 
fields?

Thanks,
-rif

-- 
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: GAE problems

2016-03-29 Thread rif
Oh, you mean the db query... Here is the whole controller that's generating 
the error:

def index():
page = int(request.vars['page']) if request.vars['page'] else 0
items_per_page = 10
limitby = (page*items_per_page,(page+1)*items_per_page+1)
form = crud.update(Facturi, a0, next=URL('index'))
facturi = db(Facturi).select(orderby=~Facturi.numar, limitby=limitby)
today = date.today()
return locals()

and the most important model involved looks like this:
Facturi = db.define_table('factura',
Field('numar', notnull=True),
Field('firma', db.firma, 
requires=IS_IN_DB(db(db.firma.request_tenant==auth.user_id), db.firma.id, 
'%(nume)s')),
Field('cont', 'reference cont', 
requires=IS_EMPTY_OR(IS_IN_DB(db((db.cont.request_tenant==auth.user_id) & 
(db.cont.is_active==True)), db.cont.id, '%(iban)s(%(moneda)s)'))),
Field('client', db.client, 
requires=IS_IN_DB(db(db.client.request_tenant==auth.user_id), db.client.id, 
'%(nume)s')),
Field('platita', 'boolean', default=False),
Field('termen_de_plata', 'date', 
default=datetime.date.today() + datetime.timedelta(15)),
Field('moneda', requires=IS_IN_SET(('RON','EUR','USD')), 
default='RON'),
Field('curs_schimb', 'double', default=1, 
requires=IS_FLOAT_IN_RANGE(0, 99)),
Field('TVA', 'integer', requires = IS_IN_SET([0,24], 
error_message=T('trebuie sa fie un TVA valid'), zero=None), default=0),
Field('reprezentant', db.reprezentant, 
requires=IS_EMPTY_OR(IS_IN_DB(db(db.reprezentant.request_tenant==auth.user_id), 
db.reprezentant.id, '%(nume)s'))),
Field('uuid', length=64, default=lambda:str(uuid.uuid4()), 
readable=False, writable=False),
Field('tva_activ', 'boolean'),
auth.signature,
format='%(numar)s')


miercuri, 30 martie 2016, 00:25:58 UTC+3, Massimo Di Pierro a scris:
>
> I cannot tell what the query is.
>
> On Tuesday, 29 March 2016 02:06:43 UTC-5, rif wrote:
>>
>> The gae query is this:  http://11.firmoasa.appspot.com/facturi
>>
>> I have this route:
>> routers = dict(
>>
>> # base router
>> BASE=dict(
>> default_application='firmoasa',
>> ),
>> )
>>
>> And the full log is this:
>>
>> /facturi 500 952ms 0kb Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 
>> (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36 module=default 
>> version=11
>> 78.96.81.220 - - [29/Mar/2016:00:02:55 -0700] "GET /facturi HTTP/1.1" 500 
>> 378 "http://11.firmoasa.appspot.com/; "Mozilla/5.0 (X11; Linux x86_64) 
>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36" "
>> 11.firmoasa.appspot.com" ms=952 cpu_ms=555 cpm_usd=0.42 
>> app_engine_release=1.9.35 instance=00c61b117c1212e7c568f7bfc458f105facfec28
>> D 2016-03-29 10:02:54.330
>> select application=firmoasa
>> D 2016-03-29 10:02:54.330
>> route: controller=facturi
>> D 2016-03-29 10:02:54.330
>> route: function.ext=index.html
>> E 2016-03-29 10:02:55.228
>>  Unable to store in FILE: 
>> /base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/controllers/facturi.py
>>
>> Traceback (most recent call last):
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/restricted.py", 
>> line 227, in restricted
>> exec ccode in environment
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/controllers/facturi.py",
>>  
>> line 128, in 
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/globals.py", 
>> line 417, in 
>> self._caller = lambda f: f()
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/tools.py", 
>> line 4250, in f
>> return action(*a, **b)
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/controllers/facturi.py",
>>  
>> line 9, in index
>> form = crud.update(Facturi, a0, next=URL('index'))
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/tools.py", 
>> line 4899, in update
>> **attributes  # contains hidden
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/sqlhtml.py", 
>> line 1295, in __init__
>> inp = self.widgets.options.widget(field, default)
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/sqlhtml.py", 
>> line 313, in widget
>> opt

[web2py] GAE problems

2016-03-29 Thread rif
The gae query is this:  http://11.firmoasa.appspot.com/facturi

I have this route:
routers = dict(

# base router
BASE=dict(
default_application='firmoasa',
),
)

And the full log is this:

/facturi 500 952ms 0kb Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36 module=default 
version=11
78.96.81.220 - - [29/Mar/2016:00:02:55 -0700] "GET /facturi HTTP/1.1" 500 
378 "http://11.firmoasa.appspot.com/; "Mozilla/5.0 (X11; Linux x86_64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36" 
"11.firmoasa.appspot.com" ms=952 cpu_ms=555 cpm_usd=0.42 
app_engine_release=1.9.35 instance=00c61b117c1212e7c568f7bfc458f105facfec28
D 2016-03-29 10:02:54.330
select application=firmoasa
D 2016-03-29 10:02:54.330
route: controller=facturi
D 2016-03-29 10:02:54.330
route: function.ext=index.html
E 2016-03-29 10:02:55.228
 Unable to store in FILE: 
/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/controllers/facturi.py

Traceback (most recent call last):
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/restricted.py", 
line 227, in restricted
exec ccode in environment
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/controllers/facturi.py",
 
line 128, in 
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/globals.py", 
line 417, in 
self._caller = lambda f: f()
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/tools.py", 
line 4250, in f
return action(*a, **b)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/controllers/facturi.py",
 
line 9, in index
form = crud.update(Facturi, a0, next=URL('index'))
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/tools.py", 
line 4899, in update
**attributes  # contains hidden
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/sqlhtml.py", 
line 1295, in __init__
inp = self.widgets.options.widget(field, default)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/sqlhtml.py", 
line 313, in widget
options = requires[0].options()
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/validators.py", 
line 600, in options
self.build_set()
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/validators.py", 
line 586, in build_set
records = self.dbset(table).select(*fields, **dd)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/objects.py",
 
line 2020, in select
return adapter.select(self.query, fields, attributes)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 500, in select
(items, tablename, fields) = self.select_raw(query,fields,attributes)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 390, in select_raw
filters = self.expand(query)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 246, in expand
return expression.op(expression.first, expression.second)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 262, in AND
first = self.expand(first)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 246, in expand
return expression.op(expression.first, expression.second)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 266, in AND
return ndb.AND(first, second)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/query.py",
 
line 574, in __new__
' received a non-Node instance %r' % node)
TypeError: ConjunctionNode() expects Node instances as arguments; received 
a non-Node instance None

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

2016-03-28 Thread rif
Unfortunately __init__ is present in my case. Moreover when I start the app 
using local development server I get another stacktrace (pasted below).

  File "/home/rif/Documents/webframeworks/firmoasa/gluon/restricted.py", 
line 227, in restricted
exec ccode in environment
  File 
"/home/rif/Documents/webframeworks/firmoasa/applications/firmoasa/controllers/default.py",
 
line 87, in 
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/globals.py", line 
417, in 
self._caller = lambda f: f()
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/tools.py", line 
4250, in f
    return action(*a, **b)
  File 
"/home/rif/Documents/webframeworks/firmoasa/applications/firmoasa/controllers/default.py",
 
line 8, in firme
form = crud.update(db.firma, a0, next=URL('firme'))
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/tools.py", line 
4899, in update
**attributes  # contains hidden
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/sqlhtml.py", line 
1295, in __init__
    inp = self.widgets.options.widget(field, default)
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/sqlhtml.py", line 
313, in widget
options = requires[0].options()
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/validators.py", 
line 2645, in _options
options = self.other.options(*args, **kwargs)
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/validators.py", 
line 600, in options
self.build_set()
  File "/home/rif/Documents/webframeworks/firmoasa/gluon/validators.py", 
line 586, in build_set
records = self.dbset(table).select(*fields, **dd)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/objects.py",
 
line 2020, in select
return adapter.select(self.query, fields, attributes)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 500, in select
(items, tablename, fields) = self.select_raw(query,fields,attributes)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 390, in select_raw
filters = self.expand(query)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 246, in expand
return expression.op(expression.first, expression.second)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 262, in AND
first = self.expand(first)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 246, in expand
return expression.op(expression.first, expression.second)
  File 
"/home/rif/Documents/webframeworks/firmoasa/gluon/packages/dal/pydal/adapters/google_adapters.py",
 
line 266, in AND
return ndb.AND(first, second)
  File "/opt/google_appengine/google/appengine/ext/ndb/query.py", line 574, 
in __new__
' received a non-Node instance %r' % node)
TypeError: ConjunctionNode() expects Node instances as arguments; received 
a non-Node instance None


luni, 28 martie 2016, 21:28:52 UTC+3, Dave S a scris:
>
>
>
> On Monday, March 28, 2016 at 2:52:02 AM UTC-7, rif wrote:
>>
>> After a long while of not updating one app running on gae I tried 2.14.3 
>> and I have the error below. Can anyone suggest a fix?
>>
>> Thanks,
>> -rif
>>
>>  Unable to store in FILE: 
>> /base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/models/db.py
>>
>> Traceback (most recent call last):
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/restricted.py", 
>> line 227, in restricted
>> exec ccode in environment
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/models/db.py",
>>  line 15, in 
>> session.connect(request, response, db = db)
>>   File 
>> "/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/globals.py", 
>> line 935, in connect
>> session_data = pickle.loads(row.session_data)
>>   File 
>> "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", 
>> line 1382, in loads
>> return Unpickler(file).load()
>>   File 
>> "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", 
>> line 858, in load
>> dispatch[key](self)
>>   File 
>> "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", 
>> line 1090, in load_global
>> klass = self.find_class(module, name)
>>   File 
>> "/base/data/

[web2py] Re: web2py 2.14.2

2016-03-28 Thread rif
After a long while of not updating one app running on gae I tried 2.14.3 
and I have the error below. Can anyone suggest a fix?

Thanks,
-rif

 Unable to store in FILE: 
/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/models/db.py

Traceback (most recent call last):
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/restricted.py", 
line 227, in restricted
exec ccode in environment
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/applications/firmoasa/models/db.py",
 line 15, in 
session.connect(request, response, db = db)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/globals.py", line 
935, in connect
session_data = pickle.loads(row.session_data)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 
1382, in loads
return Unpickler(file).load()
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 
858, in load
dispatch[key](self)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 
1090, in load_global
klass = self.find_class(module, name)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/pickle.py", line 
1124, in find_class
__import__(module)
  File 
"/base/data/home/apps/s~firmoasa/11.391689743844727003/gluon/custom_import.py", 
line 108, in custom_importer
return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: No module named objects

-- 
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 2.10.1 error: define_table argument is not a Field or Table

2015-04-01 Thread rif
well, what you can try is to get the latest web2py version, unzip it and 
then copy your apps in your new web2py instance.

It might be something wrong with the update process.

miercuri, 1 aprilie 2015, 15:25:58 UTC+3, Najtsirk a scris:

 It's not working for me.

 On Wednesday, 1 April 2015 13:28:38 UTC+2, rif wrote:

 I fixed this by deleting the welcome app and replacing it with the one 
 from the latest version.

 miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris:

 Hi,

 i get this error with Web2py 2.10.1 on all applications:

 syntaxError: define_table argument is not a Field or Table: no table.
 is_active

 Don't know how to fix it.

 Best,
 kristjan



-- 
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 2.10.1 is OUT

2015-04-01 Thread rif
It looks there is something else that does not get updated properly. Moving 
the apps in a freshly unzipped web2py instance fixes this issue. 

miercuri, 1 aprilie 2015, 14:30:19 UTC+3, rif a scris:

 If you performed an update make sure you have the latest welcome app code.

 miercuri, 1 aprilie 2015, 12:22:37 UTC+3, Najtsirk a scris:

 *When I create new simple application, i get this error:*

 SyntaxError: define_table argument is not a Field or Table: no 
 table.is_active


 On Wednesday, 1 April 2015 00:26:18 UTC+2, Massimo Di Pierro wrote:

 - welcome app defaults to Bootstrap 3
 - DAL - pyDAL (thanks Giovanni, Niphlod, Paolo)
   - new modular dal
   - fixed problems with GAE support
   - moved to full NDB support
   - improved connection pooling logic
 - optional cache.ram.max_ram_utilization = 90 (experimental)
 - improved cache.disk logic (thanks Niphlod and Leonel)
 - lots of pep8 improvements, thanks Richard
 - added support for email attchments when auth.settings.server='gae'
 - fixed app.yaml.example for GAE
 - fixed many small issues
 - many many more tests (thanks Giovanni, Niphlod, Paolo)
 - upgrading static libraries (bootstrap, codemirror, jquery, etc)



-- 
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 2.10.1 is OUT

2015-04-01 Thread rif
If you performed an update make sure you have the latest welcome app code.

miercuri, 1 aprilie 2015, 12:22:37 UTC+3, Najtsirk a scris:

 *When I create new simple application, i get this error:*

 SyntaxError: define_table argument is not a Field or Table: no 
 table.is_active


 On Wednesday, 1 April 2015 00:26:18 UTC+2, Massimo Di Pierro wrote:

 - welcome app defaults to Bootstrap 3
 - DAL - pyDAL (thanks Giovanni, Niphlod, Paolo)
   - new modular dal
   - fixed problems with GAE support
   - moved to full NDB support
   - improved connection pooling logic
 - optional cache.ram.max_ram_utilization = 90 (experimental)
 - improved cache.disk logic (thanks Niphlod and Leonel)
 - lots of pep8 improvements, thanks Richard
 - added support for email attchments when auth.settings.server='gae'
 - fixed app.yaml.example for GAE
 - fixed many small issues
 - many many more tests (thanks Giovanni, Niphlod, Paolo)
 - upgrading static libraries (bootstrap, codemirror, jquery, etc)



-- 
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 2.10.1 error: define_table argument is not a Field or Table

2015-04-01 Thread rif
I fixed this by deleting the welcome app and replacing it with the one from 
the latest version.

miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris:

 Hi,

 i get this error with Web2py 2.10.1 on all applications:

 syntaxError: define_table argument is not a Field or Table: no table.
 is_active

 Don't know how to fix it.

 Best,
 kristjan


-- 
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 2.10.1 is OUT

2015-04-01 Thread rif
It was exactly the previous one.

miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris:

 What version were you upgrading from?

-- 
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 2.10.1 is OUT

2015-04-01 Thread rif
The releases from here https://github.com/web2py/web2py/releases look 
different from what we have, a little confusing.

miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris:

 What version were you upgrading from?

-- 
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 2.10.1 is OUT

2015-04-01 Thread rif
I can't reproduce the issue using zipped releases from github.

miercuri, 1 aprilie 2015, 17:00:59 UTC+3, rif a scris:

 The releases from here https://github.com/web2py/web2py/releases look 
 different from what we have, a little confusing.

 miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris:

 What version were you upgrading from?



-- 
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 2.10.1 is OUT

2015-04-01 Thread rif
I reproduced the issue and opened a ticket on github.

miercuri, 1 aprilie 2015, 17:44:39 UTC+3, Niphlod a scris:

 beware of the dog: since now pydal is a subrepo, releases on github don't 
 carry the subrepo in it.

 On Wednesday, April 1, 2015 at 4:07:17 PM UTC+2, rif wrote:

 I can't reproduce the issue using zipped releases from github.

 miercuri, 1 aprilie 2015, 17:00:59 UTC+3, rif a scris:

 The releases from here https://github.com/web2py/web2py/releases look 
 different from what we have, a little confusing.

 miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris:

 What version were you upgrading from?



-- 
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] web2admin just got a lot easyer to install

2014-12-08 Thread rif
Just want to let you guys know that web2admin 
(https://github.com/rif/web2admin), the django like admin interface for 
web2py just got a lot easier to install.

I was watching this video http://vimeo.com/113800965 and found out about 
this new way to put the first logged in user that uses the plugin into 
w2a_root group.

So now you only have to install the plugin and if you are logged in in your 
app you can start using /yourapp/web2admin without any other install steps.

enjoy,
-rif

-- 
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: docker

2014-12-08 Thread rif
Did you check the Container port redirection section from mac installation 
guide (https://docs.docker.com/installation/mac/)?

If you run a container with an exposed port,

$ docker run --rm -i -t -p 80:80 nginx

then you should be able to access that Nginx server using the IP address 
reported by:

$ boot2docker ip

Typically, it is 192.168.59.103:2375, but VirtualBox's DHCP implementation 
might change this address in the future.

marți, 9 decembrie 2014, 04:29:53 UTC+2, Massimo Di Pierro a scris:

 Could be a firewall. I am using a mac.

 On Sunday, 7 December 2014 10:02:22 UTC-6, rif wrote:

   I tested that before I wrote. Are you sure it's not some firewall or 
 something? What OS did you use?

 duminică, 7 decembrie 2014, 17:59:43 UTC+2, Massimo Di Pierro a scris:

 Done that but no response. :-(

 On Saturday, 6 December 2014 11:37:04 UTC-6, rif wrote:

 As far as I can tell the only thing you have to do is to run the 
 container like this:

 docker run -p 8080:80 web2py

 and you will be able to connect at http://localhost:8080

 Of course you can change the 8080 to any other port.

 -rif

 vineri, 5 decembrie 2014, 05:11:22 UTC+2, Massimo Di Pierro a scris:

 Has anybody here used docker with web2py? I have built a container 
 (docker + web2py + nginx + uwsgi + supervisor) and everything seems to be 
 fine (no errors) except that I cannot connect. I attached the docker 
 folder 
 in case you can help debug.

 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.


[web2py] Re: docker

2014-12-07 Thread rif
  I tested that before I wrote. Are you sure it's not some firewall or 
something? What OS did you use?

duminică, 7 decembrie 2014, 17:59:43 UTC+2, Massimo Di Pierro a scris:

 Done that but no response. :-(

 On Saturday, 6 December 2014 11:37:04 UTC-6, rif wrote:

 As far as I can tell the only thing you have to do is to run the 
 container like this:

 docker run -p 8080:80 web2py

 and you will be able to connect at http://localhost:8080

 Of course you can change the 8080 to any other port.

 -rif

 vineri, 5 decembrie 2014, 05:11:22 UTC+2, Massimo Di Pierro a scris:

 Has anybody here used docker with web2py? I have built a container 
 (docker + web2py + nginx + uwsgi + supervisor) and everything seems to be 
 fine (no errors) except that I cannot connect. I attached the docker folder 
 in case you can help debug.

 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.


[web2py] Re: docker

2014-12-06 Thread rif
As far as I can tell the only thing you have to do is to run the container 
like this:

docker run -p 8080:80 web2py

and you will be able to connect at http://localhost:8080

Of course you can change the 8080 to any other port.

-rif

vineri, 5 decembrie 2014, 05:11:22 UTC+2, Massimo Di Pierro a scris:

 Has anybody here used docker with web2py? I have built a container (docker 
 + web2py + nginx + uwsgi + supervisor) and everything seems to be fine (no 
 errors) except that I cannot connect. I attached the docker folder in case 
 you can help debug.

 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: Free opensource Janrain alternative - Python Social auth

2014-02-21 Thread rif
Thank you a lot, Quint. Will be testing/using this!!!

-rif

vineri, 21 februarie 2014, 00:51:55 UTC+2, Quint a scris:

 https://code.google.com/p/w2p-social-auth/


 On Tuesday, February 18, 2014 7:19:15 AM UTC+1, Quint wrote:

 I'm working on a plugin. I expect to have an initial version somewhere 
 this week..

 Quint



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


[web2py] recovering from crash

2014-02-10 Thread rif
Hi guys,

If I lost the content of datatbases directory can I restore a web2py 
application having only the pg_dump of the application datatbase?

-rif

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


[web2py] Re: recovering from crash

2014-02-10 Thread rif
Thanks a lot LightDot,

That was exaclty what I needed :)

-rif

luni, 10 februarie 2014, 12:56:38 UTC+2, LightDot a scris:

 Sure, shouldn't be complicated either, assuming your database definitions 
 and the actual database structure is the same.

 Restore your database and it's contents, restore the web2py code and then 
 all that is left is to rebuild the web2py's database metadata. Take a look 
 at fake migrations in the book: 
 http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=fake_migrate

 Regards

 On Monday, February 10, 2014 11:41:25 AM UTC+1, rif wrote:

 Hi guys,

 If I lost the content of datatbases directory can I restore a web2py 
 application having only the pg_dump of the application datatbase?

 -rif



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


[web2py] Re: emacs and web2py

2014-02-06 Thread rif
M-x package-list-packages right now.

Thanks a lot!

marți, 4 februarie 2014, 23:22:14 UTC+2, François-Xavier Bois a scris:

 Hi,
 I would like to announce that web-mode.el, an emacs major mode for editing 
 web templates, is now compatible with web2py templates.
 web-mode.el is available on http://web-mode.org
 Cheers

 fxbois


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


[web2py] Re: Error with virtual field

2014-01-12 Thread rif
Manuele: Massimo suggested adding the virtualfield name parameter like this:

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

It works this way.

In my ticket (http://code.google.com/p/web2py/issues/detail?id=1851) I have 
taken the example directly from the book so I made a pull request to add it 
in the book example as well. 

However it does not make too mutch sense as the name of the field is 
already specified in the db.testtable.testfield part.

-rif

vineri, 10 ianuarie 2014, 17:00:52 UTC+2, Manuele a scris:

 Il 10/01/14 12:47, rif ha scritto: 
  I meant a few updates to web2admin :) 
 thank you very mutch rif for your interest!! 
 :) I'll use old style viertual fields for 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/groups/opt_out.


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.


[web2py] Re: !! NEW ADMIN !!

2014-01-10 Thread rif
It sure looks like it, the more options the better :)

Anyhow if there are any features in A-Plus missing in web2admin please let 
me know, I'll try to keep up.

-rif

vineri, 10 ianuarie 2014, 11:26:48 UTC+2, Alan Etkin a scris:

 El lunes, 6 de enero de 2014 18:19:54 UTC-3, samuel bonill escribió:

 Admin Plus(A-Plus) is a web2py plugin that provides an easy-to-use 
 interface for managing your data


 Wait, isn't this a similar project than this another?

 https://groups.google.com/d/msg/web2py/9ajKQChEmHQ/lNzHUqTKaa8J



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


[web2py] Re: !! NEW ADMIN !!

2014-01-10 Thread rif
You can clone the repo

git clone https://github.com/pyner/admin_plus.git

And you will have the w2p file available in the cloned directory.

vineri, 10 ianuarie 2014, 14:13:06 UTC+2, Remco Boerma a scris:

 Github complains about the file being to big? Can i download it somewhere 
 else? 


 https://github.com/pyner/admin_plus/blob/master/web2py.plugin.admin_plus.w2p




-- 
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] Re: web2py app like adminer

2014-01-02 Thread rif
https://github.com/rif/web2admin it's something like a django admin. Maybe 
it can help.

-rif

joi, 2 ianuarie 2014, 03:54:43 UTC+2, samuel bonill a scris:

 when it's ready  i'll let you know


 2014/1/1 Massimo Di Pierro massimo@gmail.com javascript:

 I look forward to see more of this!

 Massimo


 On Wednesday, 1 January 2014 17:58:04 UTC-6, samuel bonill wrote:

 https://lh5.googleusercontent.com/-lD32MGzGwpo/UsSqa-h92QI/AT0/lQ8votCwDsM/s1600/01-login.pnghttps://lh6.googleusercontent.com/-jysxEPHM-Ug/UsSq99820QI/AUQ/02p6x95FhvU/s1600/092-csv.png

 Hi all,

 I am developing a modern admin to web2py

 supports permissions 
 supports csv files
 pagination
 resposponsive desing

 this week will be released under the GPL3 license

 a quick look :





 https://lh5.googleusercontent.com/-_GFKOEuDPeE/UsSql4Zt-bI/AT8/10Tkp6v2gtg/s1600/093-eliminar.png
 https://lh3.googleusercontent.com/-3MdD6PZHYVk/UsSqTKA-WtI/ATs/-gdWczesQ8w/s1600/09-crear.pnghttps://lh6.googleusercontent.com/-0tbJi6Rn1Qw/UsSp6UAEUZI/ATk/MoAMop-TmTQ/s1600/05-lista.pnghttps://lh4.googleusercontent.com/-YXdkhyoIuBs/UsSqyghF3rI/AUI/k13r-27VDwE/s1600/08-ditar.png

  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/web2py/EYKqGYry6Eg/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




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


[web2py] status of web2py on openshift

2013-11-05 Thread rif
I try to deploy on openshift with Version 
2.7.4-stable+timestamp.2013.10.14.15.16.29 and I could not get application 
to run on the server.

What I did:

1. Created an opesnhift python 2.7 application
2. Cloned the resulted repo with git
3. Used web2py's Deploy to openshift button
4. Used resulted directory as root, left WSGI reference name to web2py and 
selected my app
5. Pushed the repo 
Checked on the server but got same opeshift message
(renamed app.py.disabled to app.py) still nothing

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


[web2py] Re: web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-13 Thread rif
try https://github.com/rif/web2admin and post back your impressions.

-rif

miercuri, 13 martie 2013, 15:33:49 UTC+2, RunSky ruan a scris:

 I want to use the web2py because it easy to use,
 but the appadmin is not easy to use.
 is there some beautiful appadmin like the django?


-- 

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




[web2py] Re: how to show login/logout auth in custom layout

2013-02-17 Thread rif
try this:

{{='auth' in globals() and auth.navbar(mode=dropdown) or ''}}

you can also remove the mode=dropdown parameter.

-rif

duminică, 17 februarie 2013, 07:24:11 UTC+2, 黄祥 a scris:

 hi,

 i've create the custom layout using 
 http://www.cssportal.com/layout-generator/ and also the menu 
 http://www.cssportal.com/css3-menu-generator/ and tried to use it on 
 web2py application.

 views/custom_layout.html
 html
 head
 {{  
 response.files.append(URL('static','css/custom_layout.css'))
 response.files.append(URL('static','css/custom_menu.css'))
 response.files.append(URL('static','css/custom_footer.css'))
 }}

 {{include 'web2py_ajax.html'}}
 /head
 body
 div id=navigationwrap
 div id=navigation
 {{=MENU(response.menu, _id='menu-bar')}}
 *{{='auth' in globals()}}*
 /div
 /div
 /body
 /html

 the login link is not show up in my custom layout, like in default 
 layout.html the login is on upper right in drop down style, is there anyone 
 know how to show it?

 many thanks before.


-- 

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




[web2py] Re: web2py admin2 is DEAD?

2013-02-16 Thread rif
You can use any user email as long as you put the user in one of the w2a_root 
or w2a_manager groups:


   - 
   
   If a user is in the w2a_root group then it has full rights including 
   adding permissions or changing the groups of other users.
   - 
   
   If a user is in the w2a_manager group then it has all permissions for 
   all tables except auth tables (no changing permissions for other users).
   

So you must create at least one of the groups and add a membership for a 
user to that group. You can do that via old admin or in the shell.

-rif


sâmbătă, 16 februarie 2013, 17:04:17 UTC+2, MJo a scris:

 How to get going with web2admin? What is the e-mail address it's asking 
 for.. I have to fill db with some details (using old admin, or current 
 default if you like) and after that I'm able to login via web2admin? What 
 are the required minimums here?


-- 

--- 
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] web2py admin2 is DEAD?

2013-02-08 Thread rif
Yes, AFAIK it was never tested on windows.

-rif

vineri, 8 februarie 2013, 21:38:11 UTC+2, Derek a scris:

 It shouldn't be the default because it doesn't work for everyone (at 
 least, it doesn't work for me)

 class 'pyodbc.ProgrammingError' ('42000', [42000] [Microsoft][ODBC SQL 
 Server Driver][SQL Server]Introducing FOREIGN KEY constraint 
 'plugin_web2admin_history_modified_by__constraint' on table 
 'plugin_web2admin_history' may cause cycles or multiple cascade paths. 
 Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN 
 KEY constraints. (1785) (SQLExecDirectW); [42000] [Microsoft][ODBC SQL 
 Server Driver][SQL Server]Could not create constraint. See previous errors. 
 (1750))

 On Friday, February 8, 2013 12:05:50 PM UTC-7, rochacbruno wrote:

 I already suggested in a ticket = 
 https://code.google.com/p/web2py/issues/detail?id=1103



-- 

--- 
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] web2py admin2 is DEAD?

2013-02-08 Thread rif
At the time when it was announced there were not many feature suggestions. 
However if many users find it useful we will find a better place for it.

-rif

vineri, 8 februarie 2013, 20:34:00 UTC+2, Ramos a scris:

 Also why is this not the default admin?



 2013/2/8 António Ramos ramst...@gmail.com javascript:

 Why isn't  this refered in   web2py.com 




 2013/2/8 Bruno Rocha rocha...@gmail.com javascript:

 Use this one = https://github.com/rif/web2admin

 -- 
  
 --- 
 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 javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  





-- 

--- 
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] web2py admin2 is DEAD?

2013-02-08 Thread rif
I'd love to work on it again :)

vineri, 8 februarie 2013, 22:05:41 UTC+2, rif a scris:

 At the time when it was announced there were not many feature suggestions. 
 However if many users find it useful we will find a better place for it.

 -rif

 vineri, 8 februarie 2013, 20:34:00 UTC+2, Ramos a scris:

 Also why is this not the default admin?



 2013/2/8 António Ramos ramst...@gmail.com

 Why isn't  this refered in   web2py.com 




 2013/2/8 Bruno Rocha rocha...@gmail.com

 Use this one = https://github.com/rif/web2admin

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





-- 

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




[web2py] LinuxJournal web development poll

2013-01-20 Thread rif
http://m.linuxjournal.com/content/web-development-poll

Most of my prefernces were not listed...

-- 





[web2py] Re: LinuxJournal web development poll

2013-01-20 Thread rif
Corrected link http://goo.gl/gOIJP



-- 





[web2py] Re: LinuxJournal web development poll

2013-01-20 Thread rif
Thanks Ron, the main point I was trying to make is that it seems that I am 
not main stream :)

duminică, 20 ianuarie 2013, 19:42:56 UTC+2, Ron McOuat a scris:

 You can write in your preference under Other, a text box opens when it is 
 selected.

 On Sunday, 20 January 2013 01:38:31 UTC-8, rif wrote:

 http://m.linuxjournal.com/content/web-development-poll

 Most of my prefernces were not listed...



-- 





[web2py] Re: Tips tricks : showing / pre-viewing an image before uploading and/or resizing and/or submit :)

2012-12-03 Thread rif
Unfortunately it doesn't seem to work in internet explorer (except 10).

Hopefully it will be usable in the next few years.

-rif

luni, 3 decembrie 2012, 06:20:12 UTC+2, Don_X a scris:

 Hello Web2py users :

 I had so much trouble with  previewing an image before upload or submit, I 
 have tested so many javascripts out there and various solutions that have 
 worked mostly with PHP projects,
 I have tried so many scripts taken from all over the place, none of 
 them actually did the job the way i wanted it done in web2py .. some were 
 either too complex ... or to heavy or not adapted to python out of the box 
 !!

  I have to share this with folks having the same issue !

 I have found a nice and simple way to preview an image  before actually 
 uploading it in the database ( before submitting a form  ... or updating a 
 form )

 the source that made this possible can be found here : 
 http://html5demos.com/file-api-simple

 pretty straight forward ! check it out !

 PS. take note that the pic holder id tag would be where you want that 
 image to be shown before submitting the form and in
  the DOM, you will need to know exactly which input field relates to the 
 image file you want to upload

 and it worked very nicely !

 thank you

 Don


-- 





Re: [web2py] web2py 2.3.1?

2012-12-03 Thread rif
I've been using trunk for the last three weeks and I didn't notice any problems.

-rif

-- 





[web2py] Re: Redis cache and session

2012-11-29 Thread rif
Yes, the support for redis depend on 
python-redishttps://github.com/andymccurdy/redis-pypackage for python.

-rif

joi, 29 noiembrie 2012, 02:06:00 UTC+2, Ralo Tannahill a scris:

 I have tried to make some tests using redis to store cache and sessions 
 but there is no module redis.
 I am using Version 2.2.1 (2012-10-21 16:57:04) stable, on CENTOS 6 and 
 python 2.6.

 In gluon.contrib I have redis_cache.py and redis_session.py (both have the 
 same import redis), but ther is no module named redis
 From python shell, typing the import statements from the online book:
  from gluon.contrib.redis import RedisCache
 Traceback (most recent call last):
   File stdin, line 1, in module
 ImportError: No module named redis

  from gluon.contrib.redis_session import RedisSession
 Traceback (most recent call last):
   File stdin, line 1, in module
   File gluon/contrib/redis_session.py, line 5, in module
 import redis
 ImportError: No module named redis

 I have browsed the contents of gluon/contrib in Github and see the same 
 files.
 The support of redis depends on an external module? Should I install a 
 redis-client for python as a redis module?

 Thanks in advance, kind regards



-- 





[web2py] missing anything....

2012-11-27 Thread rif
Do you have any insights on this: 
https://groups.google.com/forum/m/?fromgroups#!topic/web2py/cPvuY4mnzs0

-- 





[web2py] user_signature question

2012-11-22 Thread rif
If you create a link with user_signature=True and a controller 
with @auth.requires_signature() and a user clicks on it while not yet 
logged in he/she will be presented with the login page and after that 
redirected to the original link but with Not authorized message.

It is only after that user reloads the page containing the link and clicks 
on it again that she/he can access the page.  

Is there a workaround to this behavior? I want to be redirected directly to 
the protected page after login.

-rif

-- 





Re: [web2py] user_signature question

2012-11-22 Thread rif
In my words: validates that the user that saw the link is the user that 
executes the intended action.

More here: 
http://web2py.com/books/default/chapter/29/04?search=requires_signature#Digitally-signed-urls

joi, 22 noiembrie 2012, 14:13:19 UTC+2, viniciusban a scris:

 BTW, what does @auth.requires_signature() really means? 

 Wouldn't it be @auth.requires_login()? 



 On Thu, Nov 22, 2012 at 6:19 AM, rif feri...@gmail.com javascript: 
 wrote: 
  If you create a link with user_signature=True and a controller with 
  @auth.requires_signature() and a user clicks on it while not yet logged 
 in 
  he/she will be presented with the login page and after that redirected 
 to 
  the original link but with Not authorized message. 
  
  It is only after that user reloads the page containing the link and 
 clicks 
  on it again that she/he can access the page. 
  
  Is there a workaround to this behavior? I want to be redirected directly 
 to 
  the protected page after login. 
  
  -rif 
  
  -- 
  
  
  


-- 





[web2py] Re: GAE - SQL cloud connection

2012-11-16 Thread rif
I created today a sql cloud database. And I got the same error.

I changed to path VARCHAR(255) and now it works. Anybody else having the 
same problem?

-rif

marți, 7 august 2012, 18:27:13 UTC+3, Massimo Di Pierro a scris:

 Why does 512 result in Specified key was too long; max key length is 767 
 bytes. Is one counting unicode and one bytes? If setting this length to 
 128 is the only option, I will change it but I am afraid it may be too 
 short to store .table files. Did you encounter any problem after this 
 change?

 On Friday, 6 January 2012 18:43:22 UTC-6, howesc wrote:

 i don't know if i'm gonna regret this later, but in dal.py i changed that 
 field length to 128:

 self.db.executesql(CREATE TABLE IF NOT EXISTS 
 web2py_filesystem (path VARCHAR(128), content LONGTEXT, PRIMARY KEY(path) ) 
 ENGINE=InnoDB;)

 now it works again.



-- 





[web2py] Re: GAE - SQL cloud connection

2012-11-16 Thread rif
Done (http://code.google.com/p/web2py/issues/detail?id=1172)

Are the migrations issues to GoogleSQL still present?

-rif

vineri, 16 noiembrie 2012, 12:57:14 UTC+2, Massimo Di Pierro a scris:

 Please open a ticket and we will fix this asap.

 On Friday, 16 November 2012 04:49:35 UTC-6, rif wrote:

 I created today a sql cloud database. And I got the same error.

 I changed to path VARCHAR(255) and now it works. Anybody else having the 
 same problem?

 -rif

 marți, 7 august 2012, 18:27:13 UTC+3, Massimo Di Pierro a scris:

 Why does 512 result in Specified key was too long; max key length is 
 767 bytes. Is one counting unicode and one bytes? If setting this length 
 to 128 is the only option, I will change it but I am afraid it may be too 
 short to store .table files. Did you encounter any problem after this 
 change?

 On Friday, 6 January 2012 18:43:22 UTC-6, howesc wrote:

 i don't know if i'm gonna regret this later, but in dal.py i changed 
 that field length to 128:

 self.db.executesql(CREATE TABLE IF NOT EXISTS 
 web2py_filesystem (path VARCHAR(128), content LONGTEXT, PRIMARY KEY(path) 
 ) 
 ENGINE=InnoDB;)

 now it works again.



-- 





Re: [web2py] GAE - SQL cloud connection

2012-11-16 Thread rif
I was referring to http://web2py.com/books/default/chapter/29/06#Gotchas

vineri, 16 noiembrie 2012, 15:04:47 UTC+2, Massimo Di Pierro a scris:


 On Nov 16, 2012, at 5:17 AM, rif wrote:

 Done (http://code.google.com/p/web2py/issues/detail?id=1172)

 Are the migrations issues to GoogleSQL still present?


 I am not aware of any issue. Can you point me to some something about this?


 -rif

 vineri, 16 noiembrie 2012, 12:57:14 UTC+2, Massimo Di Pierro a scris:

 Please open a ticket and we will fix this asap.

 On Friday, 16 November 2012 04:49:35 UTC-6, rif wrote:

 I created today a sql cloud database. And I got the same error.

 I changed to path VARCHAR(255) and now it works. Anybody else having 
 the same problem?

 -rif

 marți, 7 august 2012, 18:27:13 UTC+3, Massimo Di Pierro a scris:

 Why does 512 result in Specified key was too long; max key length is 
 767 bytes. Is one counting unicode and one bytes? If setting this length 
 to 128 is the only option, I will change it but I am afraid it may be too 
 short to store .table files. Did you encounter any problem after this 
 change?

 On Friday, 6 January 2012 18:43:22 UTC-6, howesc wrote:

 i don't know if i'm gonna regret this later, but in dal.py i changed 
 that field length to 128:

 self.db.executesql(CREATE TABLE IF NOT EXISTS 
 web2py_filesystem (path VARCHAR(128), content LONGTEXT, PRIMARY KEY(path) 
 ) 
 ENGINE=InnoDB;)

 now it works again.


 -- 
  
  
  




-- 





[web2py] web2py love

2012-10-20 Thread rif
Constrained by some performance requirements I am developing a web app 
using Go http://golang.org/, Gorilla http://www.gorillatoolkit.org/, The 
Goods http://thegoods.biz/ and MongoDB http://labix.org/mgo.

While I enjoy the beauty of go and the lightweight feeling of minimal 
libraries I stop from time to time to re-appreciate web2py for all the help 
it provides.

All the little things like: painless crud, csrf, auth, form validation, 
many little/unknown checks that we have come to take for granted came from 
hours of work done by someone else for us.

Thank you Massimo and web2py team and receive all our love!

-- 





Re: [web2py] Re: pythondiary

2012-10-19 Thread rif


I was working for the last few hours on supporting appadmin's queries into 
web2admin and these are my conclusions:

- executing queries and displaying them in the same smartgrid table would 
complicate the code very much (smartgrid already supports smart queries and the 
possibility of using both of them generates too many conditions)
- the appadmin and web2admin target two different needs although some features 
overlap (the ability to run powerful queries might not be a good idea to expose 
to the clients)
- if dal queries are a must for the admin then maybe the appadmin should stay 
as it is and web2admin should only be an optional plugin


Either way I hope more people would find out about it.

-rif

vineri, 19 octombrie 2012, 06:39:31 UTC+3, rochacbruno a scris:

 To don't let this issue to get lost, I created a ticket about this: 
 http://code.google.com/p/web2py/issues/detail?id=1103 

-- 





[web2py] Re: pythondiary

2012-10-18 Thread rif
I guess two out of the three cons would be eliminated by web2admin. 

Please take some time to review it and give it some visibility.

joi, 18 octombrie 2012, 00:58:24 UTC+3, Massimo Di Pierro a scris:

 http://www.pythondiary.com/reviews/web2pyV2.0.html


-- 





Re: [web2py] Re: pythondiary

2012-10-18 Thread rif
One query support coming up!

joi, 18 octombrie 2012, 14:47:11 UTC+3, rochacbruno a scris:

 +1 web2admin is awesome! if we include query support it will be perfect to 
 replace appadmin
  Em 18/10/2012 03:23, rif feri...@gmail.com javascript: escreveu:

 I guess two out of the three cons would be eliminated by web2admin. 

 Please take some time to review it and give it some visibility.

 joi, 18 octombrie 2012, 00:58:24 UTC+3, Massimo Di Pierro a scris:

 http://www.pythondiary.com/**reviews/web2pyV2.0.htmlhttp://www.pythondiary.com/reviews/web2pyV2.0.html

  -- 
  
  
  



-- 





[web2py] Re: help me test sessions in cookies

2012-10-16 Thread rif
It works fine here. I get two cookies (listed below):

How can we set a longer expiration? 

Name: session_id_w2a
Content: None
Domain: localhost
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Tuesday, October 16, 2012 4:51:00 PM
Expires: When the browsing session ends

Name: session_data_w2a
Content: a1cb[...]43FA
Domain: localhost
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Tuesday, October 16, 2012 4:51:00 PM
Expires: When the browsing session ends

marți, 16 octombrie 2012, 14:24:00 UTC+3, Massimo Di Pierro a scris:

 This is new in trunk and needs to be tested. Add this to your app:

 session.connect(cookie_key='mypassphrase')

 and sessions will be stored in cookies (like Flask does). Cookies are 
 encrypted with AES 32bites and signed with HMAC+SHA1.




-- 





[web2py] Re: help me test sessions in cookies

2012-10-16 Thread rif
I'd go for this if the session is small and does not contain critical 
information. So it is good to have this option.

marți, 16 octombrie 2012, 22:27:01 UTC+3, Niphlod a scris:


 On Tuesday, October 16, 2012 7:46:16 PM UTC+2, VP wrote:


 I think one advantage of moving session data to the client side is 
 scalability.  There ought to be a noticeable difference between 100 
 processes writing to the same filesytem and these computations moved to the 
 client side.   

  
 yep, you save the filesystem for accesses, but the time taken 
 serializing/deserializing remains the same, plus there's 
 encryption/decryption and the time took to send extra bytes back and forth 
 server and client. There's no computation moved to the client side. 
 Anyway, it's another option you can use with web2py, and as always, to be 
 chosen with a grain of salt.



-- 





[web2py] Re: session in redis

2012-10-13 Thread rif
It is working for me and the performance is very close to session.forget()

Good work,
-rif

sâmbătă, 13 octombrie 2012, 20:05:24 UTC+3, Niphlod a scris:

 it's in trunk. Docs will be available shortly but just looking at the 
 docstring it should be painless.

 On Saturday, October 13, 2012 2:49:18 PM UTC+2, Jose C wrote:

 +1 request for full Redis session integration.  Really like Redis' 
 features over memcache, especially the auto- `save-to-db` config option.

 Would you prefer opening a feature request ticket?



-- 





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

2012-10-12 Thread rif
Thank you Ovidio. Do you mean like auth.enable_record_versioning? Can you 
give more details?

-rif

vineri, 12 octombrie 2012, 00:55:00 UTC+3, Ovidio Marinho a scris:

 It really is a great job and I think it definitely will be incorporated as 
 a standard interface for administration. A suggestion is to make a historic 
 recording of data.
   


Ovidio Marinho Falcao Neto
 Web Developer
  ovid...@gmail.com javascript: 
   ovidio...@itjp.net.br javascript:
  ITJP - itjp.net.br
83   8826 9088 - Oi
83   9334 0266 - Claro
 Brasil
   



 2012/9/25 rif feri...@gmail.com javascript:

 I really hope that my code meets your standards and if you find something 
 you don't like please let me know and I'll fix it.

 The code is quite small (especially if the static folder is merged with 
 the welcome app, I just extended the main layout).

 Any functionality requests are welcomed for the 1.1 release.

 -rif

 marți, 25 septembrie 2012, 15:22:06 UTC+3, Massimo Di Pierro a scris:

 Let me add... appadmin was never developed to be a production tool. 
 Something better like web2admin is very much welcome. I will review and we 
 will discuss on this list whether to replace appadmin.

 Some of the issues to be considered are:
 - functionality
 - bloat of the welcome app



 On Tuesday, 25 September 2012 07:19:51 UTC-5, Massimo Di Pierro wrote:

 No but it not excluded. I did not have time to review it in detail.

 On Tuesday, 25 September 2012 05:29:18 UTC-5, Alec Taylor wrote:

 Just a quick question, is your goal to eventually replace appadmin 
 with this?

 :)

 On Tue, Sep 25, 2012 at 8:24 PM, rif feri...@gmail.com wrote:

 Added django like filters to web2admin.

 I will stop adding new features for a while and declare the current 
 build as beta. Please test it and report issues on 
 githubhttps://github.com/rif/web2admin/issues
 .

 Currently the GAE is not supported due to some dal issues.

 Please test,
 -rif

 marți, 18 septembrie 2012, 14:37:57 UTC+3, rif a scris:

 Lots of new customization options and features. Check it out and 
 please report bugs.

 -rif

 duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:

 Check out the new global search, feedback most welcomed.

 Features still to come:

- Custom Links
- Custom Left join


 -rif

 sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:

 I just thought that one might want to use the manager (without 
 prefix) role for a different propose so I was just playing safe. I 
 agree 
 about namespace pollution.

 We just need more opinions on this matter (Is it safe to just use 
 manager role or general read/write/etc permissions?). And if we reach 
 a 
 conclusion I am happy to change.

 Also the the plugin_web2admin-plugin_admin is OK, especially if 
 it will become official :)

 To others: please give feedback on this.

 -rif

 sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:

 Shouldn't this be called plugin_admin or similar (following the 
 plugin_wiki fashion)?

 Does w2x_etc naming use any plugin convention?. For instance, in 
 Pyodel (also a plugin) I rely in an application manager role 
 (without a 
 prefix). Maybe we can adopt a standard naming convention for plugin 
 roles. 
 Also, I think that roles with prefixes somehow polute the group 
 space.

 El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:

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

 You can find it here: 
 https://github.com/rif/**w**eb2adminhttps://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

  -- 
  
  
  


  -- 
  
  
  




-- 





[web2py] session in redis

2012-10-08 Thread rif
Is the code bellow the correct way to create the sessions in redis?

from gluon.contrib.memdb import MEMDB
from gluon.contrib.redis_cache import RedisCache
cache.redis = RedisCache('localhost:6379',db=None, debug=True)
session.connect(request, response, db = MEMDB(cache.redis))

If yes, there is an error:

ERROR:web2py:Traceback (most recent call last):
  File /home/rif/Documents/webframeworks/web2py/gluon/main.py, line 614, 
in wsgibase
BaseAdapter.close_all_instances('rollback')
  File /home/rif/Documents/webframeworks/web2py/gluon/dal.py, line 529, 
in close_all_instances
THREAD_LOCAL.db_instances.clear()
AttributeError: 'thread._local' object has no attribute 'db_instances'

-- 





[web2py] Re: session in redis

2012-10-08 Thread rif
## connect to Google BigTable (optional 'google:datastore://namespace')
db = DAL('google:datastore')
## store sessions and tickets there
session.connect(request, response, db = db)
## or store session in Memcache, Redis, etc.

The last line above misled me. so it is possible to store them in memcache 
but not in redis...

-- 





[web2py] Re: session in redis

2012-10-08 Thread rif
I find it better than memcache because the sessions would survive a 
restart. So while I can settle on using memcache but I feel like I am 
loosing something.

I really see no reason to store them on the disk or in db (except limited 
memory).

-rif

luni, 8 octombrie 2012, 18:44:09 UTC+3, Niphlod a scris:

 ATM, storing session in redis is a bunch of lines put together a month ago 
 by me, but it needs to be tested carefully before releasing it. 
 Moreover, it's possible that there are 3 peoples using redis with web2py 
 (me, you, bruno), so I prefer spending time on developing other things.

 Il giorno lunedì 8 ottobre 2012 17:29:32 UTC+2, rif ha scritto:

 ## connect to Google BigTable (optional 'google:datastore://namespace')
 db = DAL('google:datastore')
 ## store sessions and tickets there
 session.connect(request, response, db = db)
 ## or store session in Memcache, Redis, etc.

 The last line above misled me. so it is possible to store them in 
 memcache but not in redis...



-- 





[web2py] Re: session in redis

2012-10-08 Thread rif
Thank you and take your time. I will report any issues I find with it.

Right now after Massimo's fix I get this:

Traceback (most recent call last):
  File /home/rif/Documents/webframeworks/web2py/gluon/main.py, line 541, 
in wsgibase
session._try_store_in_db(request, response)
  File /home/rif/Documents/webframeworks/web2py/gluon/globals.py, line 
668, in _try_store_in_db
record_id = table.insert(**dd)
  File /home/rif/Documents/webframeworks/web2py/gluon/contrib/memdb.py, 
line 256, in insert
id = self._create_id()
  File /home/rif/Documents/webframeworks/web2py/gluon/contrib/memdb.py, 
line 291, in _create_id
id = self._tableobj.incr(shard_id)
AttributeError: 'RedisClient' object has no attribute 'incr'

-rif

luni, 8 octombrie 2012, 19:21:08 UTC+3, Niphlod a scris:

 give me some time, I need to polish it with some improvements also on the 
 redis cache side.
 The current implementation is quite dumb (but redis is fast so no-one 
 noticed problems). 
 If you're up with testing it at least I can be sure it will work on 3 
 machines (my test rig, my production env, your test rig).

 Il giorno lunedì 8 ottobre 2012 18:07:50 UTC+2, rif ha scritto:

 I find it better than memcache because the sessions would survive a 
 restart. So while I can settle on using memcache but I feel like I am 
 loosing something.

 I really see no reason to store them on the disk or in db (except limited 
 memory).

 -rif

 luni, 8 octombrie 2012, 18:44:09 UTC+3, Niphlod a scris:

 ATM, storing session in redis is a bunch of lines put together a month 
 ago by me, but it needs to be tested carefully before releasing it. 
 Moreover, it's possible that there are 3 peoples using redis with web2py 
 (me, you, bruno), so I prefer spending time on developing other things.

 Il giorno lunedì 8 ottobre 2012 17:29:32 UTC+2, rif ha scritto:

 ## connect to Google BigTable (optional 'google:datastore://namespace')
 db = DAL('google:datastore')
 ## store sessions and tickets there
 session.connect(request, response, db = db)
 ## or store session in Memcache, Redis, etc.

 The last line above misled me. so it is possible to store them in 
 memcache but not in redis...



-- 





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

2012-09-25 Thread rif
Added django like filters to web2admin.

I will stop adding new features for a while and declare the current build 
as beta. Please test it and report issues on 
githubhttps://github.com/rif/web2admin/issues
.

Currently the GAE is not supported due to some dal issues.

Please test,
-rif

marți, 18 septembrie 2012, 14:37:57 UTC+3, rif a scris:

 Lots of new customization options and features. Check it out and please 
 report bugs.

 -rif

 duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:

 Check out the new global search, feedback most welcomed.

 Features still to come:

- Custom Links
- Custom Left join


 -rif

 sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:

 I just thought that one might want to use the manager (without prefix) 
 role for a different propose so I was just playing safe. I agree about 
 namespace pollution.

 We just need more opinions on this matter (Is it safe to just use 
 manager role or general read/write/etc permissions?). And if we reach a 
 conclusion I am happy to change.

 Also the the plugin_web2admin-plugin_admin is OK, especially if it will 
 become official :)

 To others: please give feedback on this.

 -rif

 sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:

 Shouldn't this be called plugin_admin or similar (following the 
 plugin_wiki fashion)?

 Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
 (also a plugin) I rely in an application manager role (without a prefix). 
 Maybe we can adopt a standard naming convention for plugin roles. Also, I 
 think that roles with prefixes somehow polute the group space.

 El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:

 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] Re: [ANN] Started development on web2admin

2012-09-25 Thread rif
I really hope that my code meets your standards and if you find something 
you don't like please let me know and I'll fix it.

The code is quite small (especially if the static folder is merged with the 
welcome app, I just extended the main layout).

Any functionality requests are welcomed for the 1.1 release.

-rif

marți, 25 septembrie 2012, 15:22:06 UTC+3, Massimo Di Pierro a scris:

 Let me add... appadmin was never developed to be a production tool. 
 Something better like web2admin is very much welcome. I will review and we 
 will discuss on this list whether to replace appadmin.

 Some of the issues to be considered are:
 - functionality
 - bloat of the welcome app



 On Tuesday, 25 September 2012 07:19:51 UTC-5, Massimo Di Pierro wrote:

 No but it not excluded. I did not have time to review it in detail.

 On Tuesday, 25 September 2012 05:29:18 UTC-5, Alec Taylor wrote:

 Just a quick question, is your goal to eventually replace appadmin with 
 this?

 :)

 On Tue, Sep 25, 2012 at 8:24 PM, rif feri...@gmail.com wrote:

 Added django like filters to web2admin.

 I will stop adding new features for a while and declare the current 
 build as beta. Please test it and report issues on 
 githubhttps://github.com/rif/web2admin/issues
 .

 Currently the GAE is not supported due to some dal issues.

 Please test,
 -rif

 marți, 18 septembrie 2012, 14:37:57 UTC+3, rif a scris:

 Lots of new customization options and features. Check it out and 
 please report bugs.

 -rif

 duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:

 Check out the new global search, feedback most welcomed.

 Features still to come:

- Custom Links
- Custom Left join


 -rif

 sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:

 I just thought that one might want to use the manager (without 
 prefix) role for a different propose so I was just playing safe. I 
 agree 
 about namespace pollution.

 We just need more opinions on this matter (Is it safe to just use 
 manager role or general read/write/etc permissions?). And if we reach a 
 conclusion I am happy to change.

 Also the the plugin_web2admin-plugin_admin is OK, especially if it 
 will become official :)

 To others: please give feedback on this.

 -rif

 sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:

 Shouldn't this be called plugin_admin or similar (following the 
 plugin_wiki fashion)?

 Does w2x_etc naming use any plugin convention?. For instance, in 
 Pyodel (also a plugin) I rely in an application manager role (without 
 a 
 prefix). Maybe we can adopt a standard naming convention for plugin 
 roles. 
 Also, I think that roles with prefixes somehow polute the group space.

 El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:

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

 You can find it here: 
 https://github.com/rif/**web2adminhttps://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

  -- 
  
  
  




-- 





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

2012-09-18 Thread rif
Lots of new customization options and features. Check it out and please 
report bugs.

-rif

duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:

 Check out the new global search, feedback most welcomed.

 Features still to come:

- Custom Links
- Custom Left join


 -rif

 sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:

 I just thought that one might want to use the manager (without prefix) 
 role for a different propose so I was just playing safe. I agree about 
 namespace pollution.

 We just need more opinions on this matter (Is it safe to just use manager 
 role or general read/write/etc permissions?). And if we reach a conclusion 
 I am happy to change.

 Also the the plugin_web2admin-plugin_admin is OK, especially if it will 
 become official :)

 To others: please give feedback on this.

 -rif

 sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:

 Shouldn't this be called plugin_admin or similar (following the 
 plugin_wiki fashion)?

 Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
 (also a plugin) I rely in an application manager role (without a prefix). 
 Maybe we can adopt a standard naming convention for plugin roles. Also, I 
 think that roles with prefixes somehow polute the group space.

 El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:

 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



-- 





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

2012-09-16 Thread rif
Check out the new global search, feedback most welcomed.

Features still to come:

   - Custom Links
   - Custom Left join


-rif

sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:

 I just thought that one might want to use the manager (without prefix) 
 role for a different propose so I was just playing safe. I agree about 
 namespace pollution.

 We just need more opinions on this matter (Is it safe to just use manager 
 role or general read/write/etc permissions?). And if we reach a conclusion 
 I am happy to change.

 Also the the plugin_web2admin-plugin_admin is OK, especially if it will 
 become official :)

 To others: please give feedback on this.

 -rif

 sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:

 Shouldn't this be called plugin_admin or similar (following the 
 plugin_wiki fashion)?

 Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
 (also a plugin) I rely in an application manager role (without a prefix). 
 Maybe we can adopt a standard naming convention for plugin roles. Also, I 
 think that roles with prefixes somehow polute the group space.

 El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:

 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] Re: [ANN] Started development on web2admin

2012-09-15 Thread rif
I have added initial multi-db support and now I am working on your 
suggestion. It should be ready in a couple of hours. I will let you know.

-rif

sâmbătă, 15 septembrie 2012, 02:33:49 UTC+3, rochacbruno a scris:

 @rif I have some suggestion

 Screenshot: http://i.imgur.com/3t2kv.png

 For the suggested [fields] buttom it can be done with a modal or popup, it 
 can loads a  table style=display:none; id=tablename_fields inside the 
 popup or modal, or if prefered it can retrieve this info via ajax.

 To retrieve the info is easy,

 for field in table.fields:
 print name.name, name.type, name.length, name.comment, name.label, 
 name.compute, name.represent, name.requires, name.required, name.unique, 
 name.readable, name.writable
 *first_name string 128 None First name None None 
 gluon.validators.IS_NOT_EMPTY object at 0x1f05210 False False True True*
  
 So that info will be very important for developers and admins, also the 
 buttom can show up only if admin is logged in.

 Let me know if you need some help, I am using this and I really think it 
 can be a replacement for appadmin.


-- 





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

2012-09-15 Thread rif
You can pull from my devel branch for multi-db support. Please give me 
feedback.

I am merging your pull request. An I think I will use ajax.

-rif

sâmbătă, 15 septembrie 2012, 13:11:14 UTC+3, rochacbruno a scris:

 I did the modal part, now need to do the shortcuts.

 also as you are working on mult-db support, the code may change a little.

 look:

 [image: Inline image 1]

 [image: Inline image 2]


-- 





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

2012-09-15 Thread rif
I bow before what you showed in modules/html.py, yet I preferred a much 
simpler solution even if it is not reusable (hopefully it will give a 
chance to less-python-gurus like me to understand :).

I will focus on the rest of the suggestions now.

-rif

sâmbătă, 15 septembrie 2012, 13:31:52 UTC+3, rochacbruno a scris:

 Your call, also if you prefer to take the modal logic from modules/server 
 side DOM on to HTML template it is easy to change.

 I just created as Server side DOM because it can be reused.


-- 





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

2012-09-15 Thread rif
I just thought that one might want to use the manager (without prefix) role 
for a different propose so I was just playing safe. I agree about namespace 
pollution.

We just need more opinions on this matter (Is it safe to just use manager 
role or general read/write/etc permissions?). And if we reach a conclusion 
I am happy to change.

Also the the plugin_web2admin-plugin_admin is OK, especially if it will 
become official :)

To others: please give feedback on this.

-rif

sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:

 Shouldn't this be called plugin_admin or similar (following the 
 plugin_wiki fashion)?

 Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
 (also a plugin) I rely in an application manager role (without a prefix). 
 Maybe we can adopt a standard naming convention for plugin roles. Also, I 
 think that roles with prefixes somehow polute the group space.

 El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:

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



-- 





[web2py] App does not exist or your are not authorized

2012-09-14 Thread rif
Does anybody know why do I get App does not exist or your are not 
authorized when I install https://github.com/rif/web2admin ?

The plugin install fine, though.

-rif



-- 





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

2012-09-14 Thread rif
Thank you massimo,

Just added history, fields selection and better access url. I am working on 
filters and on using the links and left parameters from smartgrid.

Considering that most of the heavy lifting is done by the brilliant 
smartgrid I think it is quite ready for beta testing (and any bug report is 
appreciated). However there are more features in the pipeline so whenever 
you consider it to have enough features you can start using it.

About the place for visibility: well, my goal is to make it stand near 
plugin_wiki ;)

-rif

vineri, 14 septembrie 2012, 16:39:50 UTC+3, Massimo Di Pierro a scris:

 This is really nice? If you think this is ready for production (or when 
 you think it is ready for production) let me know. Where do you do you 
 think would be a place to link it to make it more visible?

 massimo

 On Monday, 10 September 2012 08:49:35 UTC-5, rif 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



-- 





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

2012-09-14 Thread rif
Excellent suggestion. dbs will be available in the next version.

-rif

vineri, 14 septembrie 2012, 20:34:16 UTC+3, rochacbruno a scris:

 There is Pyodel (learning tool), I dont know about the status of QAStak 
 and PyForum.

 @rif what about multiple databases and databases named differently? 

 your code expects a db object, so I think you can put on the models a 
 config variable for dbs

 plugin_web2admin_dbs = [db, other_db, sessions_db, user_db]

 So in plugin code you can check

 if plugin_web2admin_dbs in globals():
 for db in  plugin_web2admin_dbs:
 # logic to create navbar menus to change the db context.




-- 





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-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] Updated cheatsheet

2012-09-05 Thread rif
Maybe the otherwise param should appear in the cheatsheet:
@auth.requires_login(otherwise=URL(...))

-- 





Re: [web2py] Updated cheatsheet

2012-09-05 Thread rif
Also the cast parameter. Are the sources for the cheatsheet available so we 
can make patch suggestions?

-rif

miercuri, 5 septembrie 2012, 18:53:45 UTC+3, Massimo Di Pierro a scris:

 It should


 On Wednesday, 5 September 2012 09:57:30 UTC-5, rif wrote:

 Maybe the otherwise param should appear in the cheatsheet:
 @auth.requires_login(otherwise=URL(...))



-- 





[web2py] Re: web2py book on github

2012-09-01 Thread rif
Another small patch to chapter with to changes:

postrgresql:// - postgres://
hocalhost - localhost

sâmbătă, 1 septembrie 2012, 20:00:49 UTC+3, Massimo Di Pierro a scris:

 The web2py book app has been rewritten 

http://www.web2py.com/book

 and the source of the app and the book itself is now on github

https://github.com/mdipierro/web2py-book/tree/master/sources

 Hopefully this will make it easier to keep it updated. You can just send 
 me patches. You can also try run it yourself and see how it looks. It is no 
 more db based. it is file based. The syntax is markmin as documented in the 
 bok itself. 

 Massimo






-- 



From 6456f13d4adecad93744feb82adc7c725656807c Mon Sep 17 00:00:00 2001
From: Radu Ioan Fericean r...@fericean.ro
Date: Sat, 1 Sep 2012 23:45:49 +0300
Subject: [PATCH] changed hocalhost-localhost, postgresql - postgres

---
 sources/29-web2py-english/06.markmin |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sources/29-web2py-english/06.markmin b/sources/29-web2py-english/06.markmin
index 3697dc8..b8741bc 100644
--- a/sources/29-web2py-english/06.markmin
+++ b/sources/29-web2py-english/06.markmin
@@ -2606,7 +2606,7 @@ db = DAL('sqlite://storage.sqlite')
 and you wish to move to another database using a different connection string:
 
 ``
-db = DAL('postgresql://username:password@hocalhost/mydb')
+db = DAL('postgres://username:password@localhost/mydb')
 ``
 
 Before you switch, you want to move the data and rebuild all the metadata for the new database. We assume the new database to exist but we also assume it is empty.
@@ -2618,7 +2618,7 @@ cd web2py
 python scripts/cpdb.py \
-f applications/app/databases \
-y 'sqlite://storage.sqlite' \
-   -Y 'postgresql://username:password@hocalhost/mydb'
+   -Y 'postgres://username:password@localhost/mydb'
 ``
 
 After running the script you can simply switch the connection string in the model and everything should work out of the box. The new data should be there.
-- 
1.7.9.5



[web2py] GAE with Janrain problem 2.0.2

2012-08-30 Thread rif
After a succesful login from janrain running on GAE I get the following 
error:

Traceback (most recent call last):
  File /home/rif/Documents/webframeworks/homepage/gluon/restricted.py, 
line 209, in restricted
exec ccode in environment
  File 
/home/rif/Documents/webframeworks/homepage/applications/init/controllers/default.py,
 
line 105, in module
  File /home/rif/Documents/webframeworks/homepage/gluon/globals.py, line 
185, in lambda
self._caller = lambda f: f()
  File 
/home/rif/Documents/webframeworks/homepage/applications/init/controllers/default.py,
 
line 103, in user
return dict(form=auth())
  File /home/rif/Documents/webframeworks/homepage/gluon/tools.py, line 
1191, in __call__
return getattr(self,args[0])()
  File /home/rif/Documents/webframeworks/homepage/gluon/tools.py, line 
1961, in login
user = self.get_or_create_user(table_user._filter_fields(cas_user))
  File /home/rif/Documents/webframeworks/homepage/gluon/tools.py, line 
1620, in get_or_create_user
(table_user[fieldname]==value)).select().first()
  File /home/rif/Documents/webframeworks/homepage/gluon/dal.py, line 
8682, in select
return adapter.select(self.query,fields,attributes)
  File /home/rif/Documents/webframeworks/homepage/gluon/dal.py, line 
4461, in select
(items, tablename, fields) = self.select_raw(query,fields,attributes)
  File /home/rif/Documents/webframeworks/homepage/gluon/dal.py, line 
4356, in select_raw
filters = self.expand(query)
  File /home/rif/Documents/webframeworks/homepage/gluon/dal.py, line 
4232, in expand
return expression.op(expression.first, expression.second)
  File /home/rif/Documents/webframeworks/homepage/gluon/dal.py, line 
4087, in OR
def OR(self,first,second): raise SyntaxError, Not supported
SyntaxError: Not supported


Does anybody experience the same problem?

-- 





[web2py] Re: Book - Overview Typo

2012-08-27 Thread rif
Another mistake is here: 
http://web2py.com/books/default/chapter/29/6#Copy-data-from-one-db-into-another

hocalhost - localhost (multiple times)

And I also thing that this is wrong:

postgresql:// - postgres:// (multiple times)


-rif

miercuri, 15 august 2012, 16:33:18 UTC+3, Anthony a scris:

 Thanks for pointing this out. Note, the ) should actually go after 
 (keyword):

 db(db.page.title.contains(keyword)).select().as_list()


 Anthony

 On Wednesday, August 15, 2012 5:52:53 AM UTC-4, Frank Cheong wrote:

 Just spotted one typo in the middle of the Overview Chapter inside the 
 xmlrpc section, ) is missing at the end of code.


 1.
 2.
 3.
 4.
 5.
 6.
 7.
 8.
 9.
 10.

 service = Service()

 @service.xmlrpc
 def find_by(keyword):
  finds pages that contain keyword for XML-RPC
  return db(db.page.title.contains(keyword).select().as_list()

 def call():
 exposes all registered services, including XML-RPC
 return service()


 whereas the final statement of the function find_by:-

 return db(db.page.title.contains(keyword).select().as_list() should be 
 replaced by:-

 return db(db.page.title.contains(keyword).select().as_list())




-- 





[web2py] Re: web2py nginx and uwsgi

2012-08-24 Thread rif
There are some (scripts/setup-web2py-nginx-uwsgi-ubuntu.sh and 
scripts/setup-web2py-nginx-uwsgi-on-centos.sh) that automate the processes 
of setting up web2py with nginx+uwsgi.

You can start by analyzing these scripts and then consult the upstream 
documentation.

-rif

vineri, 24 august 2012, 06:12:50 UTC+3, visuallinux a scris:

 Dear. 

 I am new in web developing and  always i used sample apache config. But i 
 see many post about my subject, so I would like use it. 

 Also I would like to integrate git to development environment, now i do 
 using trac + svn for my standalone projects. 

 I am following the follow howto: 


 http://alvarolizama.net/2012/06/30/mi-configuracion-para-servidores-con-python/
  

 But i am some confused. 

 I would like to learn how to set up a development and production 
 environment for web2py with nginx + uwsgi. 

 Does anyone know some howto for beginners? 

 Does anyone let me know some links or how i can do slowly so i will can 
 understanding? 


 Regards. 


-- 





[web2py] Re: need a simple wiki...

2012-08-20 Thread rif
The Search Pages is also not working. If I enter a page title and hit 
Submit I get:

Traceback (most recent call last):
  File /home/rif/Downloads/web2py/gluon/restricted.py, line 205, in 
restricted
exec ccode in environment
  File 
/home/rif/Downloads/web2py/applications/hopa/controllers/default.py, line 
67, in module
  File /home/rif/Downloads/web2py/gluon/globals.py, line 182, in lambda
self._caller = lambda f: f()
  File 
/home/rif/Downloads/web2py/applications/hopa/controllers/default.py, line 
13, in index
return auth.wiki()
  File /home/rif/Downloads/web2py/gluon/tools.py, line 3146, in wiki
return self._wiki.read(slug)['content'] if slug else self._wiki()
  File /home/rif/Downloads/web2py/gluon/tools.py, line 4573, in __call__
return self.search()
  File /home/rif/Downloads/web2py/gluon/tools.py, line 4794, in search
content.append(DIV(T(No results,_class='w2p_wiki_form')))
NameError: global name 'T' is not defined

-- 





[web2py] Re: appadmin in Romanian (for Massimo)

2012-06-03 Thread rif
Thank you very much, Ionel!

-rif

sâmbătă, 2 iunie 2012, 18:30:30 UTC+3, ionel a scris:

 Hello Massimo,

 This is the language file for appadmin in Romanian.

 Thank you,

 i.a.



Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-27 Thread rif
I had the same issue and I solved by adding plugin python in the uwsgi 
web2py configuration:

uwsgi
pluginpython/plugin 
--HERE
socket127.0.0.1:9001/socket
pythonpath/home/www-data/web2py//pythonpath
app mountpoint=/
scriptwsgihandler/script
/app
/uwsgi

joi, 12 aprilie 2012, 09:23:39 UTC+3, Bruce Wade a scris:

 I am having the exact same problem with uwsgi

 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed 
 connection while reading response header from upstream, client: 
 108.172.101.4, server: 50.18.67.206, request: GET / HTTP/1.1, upstream: 
 uwsgi://127.0.0.1:9001, host: 50.18.67.206

 I tested and I can get to my static files using nginx without a problem so 
 I know that isn't the issue.

 Thinking maybe sticking with apache is a better more stable solution?

 On Wed, Apr 11, 2012 at 2:05 PM, Michele Comitini 
 *michele.comit...@gmail.com
 * wrote:

 To handle static request using alias instead of root with regexp
 should work better


  set $web2pyroot put the dir where you installed web2py


location ~ ^/(.*)/static/(.*) {
 alias $web2pyroot/applications/$1/static/$2;
}

 mic


 Il 11 aprile 2012 18:23, pbreit * pbreitenb...@gmail.com** ha 
 scritto:
  Looks like it is having trouble with a file in /static. This is how I 
 serve
  /static:
 
  location /static {
  root /opt/web2py/applications/myapp/;
  }
 
  You may just need to add the appname to:
  root  /home/www-data/web2py/applications/
 
  Also, I don't know if you need that extra stuff on the location line.




 -- 
 -- 
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.fittraineronline.com - Fitness Personal Trainers Online
 http://www.warplydesigned.com

  

[web2py] Re: Problem runing on GAE

2012-04-09 Thread rif
Please check that your python version is 2.5. If this is not the case, 
change the app.yaml to use python2.7 runtime.

-rif

luni, 9 aprilie 2012, 20:57:21 UTC+3, waglik a scris:

 Hi guys.


 I try playing with web2py on GAE but on a very beginning I fail with 
 running my app. when I start my app I get :

 Internal errorTicket issued: 
 unrecoverablehttp://localhost:8080/admin/default/ticket/unrecoverable

 and in the dev_appserver console I get : 


 WARNING  2012-04-09 17:51:57,679 dev_appserver_import_hook.py:546] 
 Blocking access to skipped file /home/waglik/workspace/aaa/gluon/rocket.py
 WARNING  2012-04-09 17:51:57,687 dev_appserver_import_hook.py:546] 
 Blocking access to skipped file 
 /home/waglik/workspace/aaa/applications/myapp/languages/en-us.py
 WARNING  2012-04-09 17:51:57,687 dev_appserver_import_hook.py:546] 
 Blocking access to skipped file 
 /home/waglik/workspace/aaa/applications/myapp/compiled
 WARNING  2012-04-09 17:51:57,688 dev_appserver_import_hook.py:546] 
 Blocking access to skipped file 
 /home/waglik/workspace/aaa/applications/myapp/models/db.py

 ERROR2012-04-09 17:51:57,798 restricted.py:155] Traceback (most recent 
 call last):
   File /home/waglik/workspace/aaa/gluon/main.py, line 498, in wsgibase
 serve_controller(request, response, session)
   File /home/waglik/workspace/aaa/gluon/main.py, line 200, in 
 serve_controller
 run_models_in(environment)
   File /home/waglik/workspace/aaa/gluon/compileapp.py, line 512, in 
 run_models_in
 code = getcfs(model, model, None)
   File /home/waglik/workspace/aaa/gluon/cfs.py, line 37, in getcfs
 t = os.stat(filename)[stat.ST_MTIME]
   File 
 /home/waglik/Applications/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 620, in __call__
 raise OSError(errno.EACCES, 'path not accessible', path)
 OSError: [Errno 13] path not accessible: 
 '/home/waglik/workspace/aaa/applications/myapp/models/db.py'


 my db.py is :

 from gluon.contrib.gql import GQLDB
 db = GQLDB()
 session.connect(request,response,db=db)

 db.define_table('book',
Field('name'),
Field('code', unique=True),
Field('file', 'upload'),
format = '%(title)s')


 What do I do wrong? Is there a documentation that covers GAE integration 
 (I just find video on vimeo and some short post on old web2py blog)

 thanks for help




[web2py] Older facebook clone application issue

2012-04-02 Thread rif
The facebook clone application contains some code that is not supported on 
appengine:

   tokens = form.vars.name.split()

query = reduce(lambda a,b:ab, 
[User.first_name.contains(k)|User.last_name.contains(k) for k in tokens])
people = db(query).select(orderby=alphabetical)


Is there any recommended workarount to this kind of search on gae?

Moreover http://web2py.appspot.com/friends/default/home will issue a crash 
ticket after login. Maybe it should be checked and fixed if the application 
is still online on web2py appspot.

-rif


[web2py] Re: Two gae questions

2012-03-07 Thread rif
Thank you for your answers.

-rif

miercuri, 7 martie 2012, 06:06:32 UTC+2, howesc a scris:

 1. i think they just promoted it to be generally available in the last 
 couple of weeks.
 2. there is also the files API.  check out the google docs for writing 
 directly to a blob.  for end-user uploads that slice is still pretty 
 accurate.  i may have some minor enhancements to error checking since then, 
 but nothing has changed in the functionality that i use.

 cfh

 On Tuesday, March 6, 2012 1:19:40 AM UTC-8, rif wrote:

 1. What is the status of mysql database for gae?
 2. Is there any better solution than this (
 http://www.web2pyslices.com/main/slices/take_slice/63) to write blobs to 
 blobstore?

 Thank you,
 -rif



[web2py] Re: Using Blobstore API

2012-03-07 Thread rif
I am working on the same thing but for sounds. I used the experimental file 
writing to blobstore liker this:

def blobstore_upload(form):
from google.appengine.api import files
from google.appengine.ext import blobstore
if request.env.web2py_runtime_gae and form.vars.file:
# Create the file
file_name = 
files.blobstore.create(mime_type='application/octet-stream')

# Open the file and write to it
with files.open(file_name, 'a') as f:
f.write(form.vars.file.file.read())

# Finalize the file. Do this before attempting to read it.
files.finalize(file_name)

# Get the file's blob key
form.vars.blob_key = files.blobstore.get_blob_key(file_name)
form.vars.file = None

@auth.requires_login()
def upload():
return dict(form=crud.update(db.sounds, a0, 
onvalidation=blobstore_upload, message=T('Upload complete!')))

def download_blob():
from google.appengine.ext import blobstore
sound = db.sounds(a0)
if not sound:
raise HTTP(404)
blob_info = blobstore.BlobInfo.get(sound.blob_key)
return response.stream(blob_info.open())

Now I am hitting the 10Mb limit so I need to experiment some more with 
create_upload_url.

-rif

miercuri, 7 martie 2012, 11:36:40 UTC+2, Sushant Taneja a scris:

 Hi,

 I am trying to use the Google Blobstore API for uploading images. I also 
 checked the link: http://www.web2pyslices.com/main/slices/take_slice/63 for 
 the help but couldn't understand much.

 In my application's (uploadPic) default controller I have the code as 
 follows:

 from google.appengine.ext import blobstore

 def index():
 
 This provides the upload_url to the upload form
 
 
 upload_url=blobstore.create_upload_url(URL('uploadPic','default','pic'))
 return dict(upload_url=upload_url)

 def pic():
 
 This method stores the bolb key in a table and is used for serving the 
 BLOB images
 
 response.write(request)

 In the view index.html, I have a simple form

 html
 body
 form method='post' action='{{=upload_url}}' 
 enctype='multipart/form-data'
 input type='file' name='file'
 input type='submit' name='submit' value='Upload'
 /form
 /body
 /html

 As per my understanding, when the upload is successful, GAE automatically 
 redirects to the URL provided in the create_upload_url function with the 
 request containing the blob_key.

 But when I execute the above, all I get in the page is None. The log is 
 showing the following:

 INFO 2012-03-07 09:30:31,188 dev_appserver.py:2865] GET 
 /uploadPic/default/index HTTP/1.1 200 -
 INFO 2012-03-07 09:30:37,558 dev_appserver.py:687] Internal 
 redirection to /uploadPic/default/pic
 INFO 2012-03-07 09:30:37,681 gaehandler.py:69]  Request: 
 104.29ms/100.00ms (real time/cpu time)
 INFO 2012-03-07 09:30:37,686 recording.py:372] Saved; key: 
 __appstats__:037500, part: 20 bytes, full: 1234 bytes, overhead: 0.000 + 
 0.004; link: http://localhost:8080/_ah/stats/details?time=1331112637576
 INFO 2012-03-07 09:30:37,695 dev_appserver_blobstore.py:447] Upload 
 handler returned 200
 INFO 2012-03-07 09:30:37,723 dev_appserver.py:2865] POST 
 /_ah/upload/ag9kZXZ-aW1hZ2V1cGxvYWRyGwsSFV9fQmxvYlVwbG9hZFNlc3Npb25fXxggDA 
 HTTP/1.1 200 -

 Can someone please help me understand it ? 

 Thanks,
 Sushant




[web2py] Two gae questions

2012-03-06 Thread rif
1. What is the status of mysql database for gae?
2. Is there any better solution than this (
http://www.web2pyslices.com/main/slices/take_slice/63) to write blobs to 
blobstore?

Thank you,
-rif


[web2py] Re: book: why web2py

2011-12-11 Thread rif
I can do that:. Is the following environment relevant?

- ubuntu 11.10 on a kvm virtual instance (mod_wsgi 3.3 - latest)
- web2py with the default setup from scripts/setup-web2py-ubuntu.sh
- ab -n1000 -c20 http://localhost/ and ab -n1000 -c20 http://localhost:8000/

I also have to report two public website made with web2py: 
http://avocadosoft.ro/ and http://firmoasa.appspot.com/, is this a good 
place to report them or should I do it somewhere else?


[web2py] Rocket vs mod_wsgi

2011-12-11 Thread rif
Environment

machine: libvirt kvm instance: *512Mb 1cpu* on a acer aspire 5100 laptop
os: ubuntu 11.10, mod_wsgi3.3
web2py: 1.99.3
apache config: default resulted from scripts/setup-web2py-ubuntu.sh
Rocket:  v1.2.4  python web2py.py -Na test -i 0.0.0.0

Commands:
- run from the host system
ab -n1000 -c20 http://192.168.122.187/welcome/default/index/
ab -n1000 -c20 http://192.168.122.187:8000/welcome/default/index/

Results:

ab -n1000 -c20 http://192.168.122.187/welcome/default/index
This is ApacheBench, Version 2.3 $Revision: 655654 $
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.122.187 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:Apache/2.2.20
Server Hostname:192.168.122.187
Server Port:80

Document Path:  /welcome/default/index
Document Length:11432 bytes

Concurrency Level:  20
Time taken for tests:   60.128 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Total transferred:  11859889 bytes
HTML transferred:   11432000 bytes
*Requests per second:16.63 [#/sec] (mean)*
Time per request:   1202.552 [ms] (mean)
Time per request:   60.128 [ms] (mean, across all concurrent requests)
Transfer rate:  192.62 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:01   1.2  0  10
Processing:   608 1195 199.3   11801923
Waiting:  608 1166 199.0   11481892
Total:610 1196 199.3   11801923

Percentage of the requests served within a certain time (ms)
  50%   1180
  66%   1276
  75%   1324
  80%   1356
  90%   1460
  95%   1557
  98%   1652
  99%   1723
 100%   1923 (longest request)



ab -n1000 -c20 http://192.168.122.187:8000/welcome/default/index
This is ApacheBench, Version 2.3 $Revision: 655654 $
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.122.187 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:Rocket
Server Hostname:192.168.122.187
Server Port:8000

Document Path:  /welcome/default/index
Document Length:11432 bytes

Concurrency Level:  20
Time taken for tests:   56.926 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Total transferred:  11857000 bytes
HTML transferred:   11432000 bytes
*Requests per second:17.57 [#/sec] (mean)*
Time per request:   1138.520 [ms] (mean)
Time per request:   56.926 [ms] (mean, across all concurrent requests)
Transfer rate:  203.41 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:01   1.0  0  10
Processing:   380 1129 2093.4   1001   34988
Waiting:  363 1121 2093.7991   34987
Total:383 1130 2093.5   1002   34991

Percentage of the requests served within a certain time (ms)
  50%   1002
  66%   1067
  75%   1099
  80%   1115
  90%   1224
  95%   1333
  98%   1640
  99%   1888
 100%  34991 (longest request)

Conclusion:
Requests per seckond
mod_wsgi: 16.63 [#/sec]
rocket: 17.57 [#/sec]

Rocket is about 5% faster in this environment.

Waiting for your comments!


[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
And now the weirdest thing:

Enabling two CPUs on the virtual machine gave me the following weird 
results:

nginx: 31.92 [#/sec]
apache: 10.63 [#/sec]
rocket: 10.36 [#/sec]

So 1000 request with a concurrency of 20 on 2 CPUs actually slows down 
apache and rocket. I thought that apache and rocket hit the memory limit so 
I raised the memory to 1024 but the results remained the same.

Is this even possible? I can understand that the performance could stay the 
same with 2CPUs (the servers are not using the second one) but to actually 
drop the performance is not very intuitive.

I guess the default configuration of apache and rocket should be improved 
since most of the servers have more than 1 CPU. Or maybe I just my 
environment.


[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
This comparison was intended to help writing the why web2py paragraph from 
the book (https://groups.google.com/d/topic/web2py/29jdfjejwZo/discussion )

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
Compiled uwsgi 0.9.9.3 (the 0.9.8.1 did not now about pythonpath)
uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http :80 -s 
/tmp/we2py.sock uwsgi.log 21

1 CPU: 17.83 [#/sec] (better than rocket)
2 CPUs: 17.98 [#/sec]

uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http :80 -s 
/tmp/we2py.sock -M -p2 uwsgi.log 21

2 CPUs: 31.30 [#/sec]

I guess with the -p 2 enabled it was not as fast as nginx for static 
content.

Anyhow, is this a recommended setup? Doesn't it show the same behavior as 
gunicorn ( Without this (nginx) buffering Gunicorn will be easily 
susceptible to denial-of-service attacks. )


[web2py] book: why web2py

2011-12-10 Thread rif
One of the reasons to use web2py mentioned in the book is the following:

web2py has a small footprint and is very fast. It uses the Rocket WSGI web 
server developed By Timothy Farrell. It is 30% faster than Apache with 
mod_proxy.

I don't really understand the second sentence. Should it say Apache with 
mod_wsgi? 




Re: [web2py] Re: github hg repo

2011-11-24 Thread rif
I really tried to switch from hg to git (several times) but did not 
find sufficient reasons to stick with it.

[web2py] Re: what other tools do you use with web2py

2011-09-11 Thread rif
I use SASS provided by compass http://compass-style.org/ and it really 
makes CSS more pleasant. I never used CoffeeScript as I stay on jQuery 
syntax 95% of javascript code.

  1   2   >