hi web2py users i have two questions

1) in my application admin application is very very slow during edit 
default.py because its size 24Mbyte on disk, i check windows and linux 
reaally seems 24MBytes but it has only 611 lines
really i don't understand .....

2) in my applications have 4-5 groups of user and i use < 
@auth.requires_membership('admin') >  decatorus access the functions,
and use menu for groups for example

1) if grup_A ==> response.menu += [ some submenus]
2) if grup B ==> response.menu += [ some other submenus]

its perfectyl run for all grups but one errors with  "ValueError: need more 
than 1 value to 
unpack"<http://stackoverflow.com/questions/2814128/python-error-valueerror-need-more-than-1-value-to-unpack>
 i 
change grup name and role but 

here is my code for adding response.menu in default.py

*def init1():*
*    try:*
*        user=auth.user.id*
*        
g=db(db.auth_membership.user_id==user).select(db.auth_membership.group_id).first()['auth_membership.group_id']
*
*        
grup=db(db.auth_group.id==g).select(db.auth_group.role).first()['auth_group.role']
*
*        if grup=="paket_lider":*
*            pass*
*            '''*
*            response.menu += [*
*                (SPAN('Paket Yönetimi', _class='highlighted'), False, 
False,URL('paket'), [*
*                 #veri giriş menüleri*
*                     (T('Paket İşlemleri'), False,URL('paket')),*
*                     (T('Paketi Gör'), False,URL('paket_lider')),*
*                      (T('Paketleri Oyla'), False,URL('paket_oyla')),*
*                     (T('Firmalar'), False,URL('firmalar')),*
*                     (T('Kişiler'), False,URL('kisiler')),])]*
*           '''*
*    except Exception,e:*
*        response.write("error "+str(e))*
*    return*
*
*
this code perfectly run for grup "admin", "kisi","firma" but not running 
for paket, 

-- 

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


Reply via email to