[web2py] Cyrillic encoding no working

2017-08-19 Thread Вячеслав Анатольевич
Hi everyone!
What happened to the Cyrillic after the update of pydal or web2py (maybe, 
before everything worked fine)? 
Whichever I choose the encoding of the Oracle database itself (utf8, 
cp1251, .) - I get "???". In db = DAL (, db_codec = '...') 
tried everything that could - the result is the same. 
With base "sqlite" - it works normally.

-- 
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: cx_Oracle 6.0

2017-08-18 Thread Вячеслав Анатольевич
Thanks, Leonel! It works!

-- 
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] cx_Oracle 6.0

2017-08-18 Thread Вячеслав Анатольевич
Hi everyone!

Actually the question on the topic! Do you need changes to pydal or we2py 
due to the release of cx_Oracle 6.0? Release web2py 2.15.3 took place a 
week earlier than cx_Oracle 6.0. I ask - because it creates parallel tables 
with already existing only with a small (or large) letter, when I it define.
For example, have a table 'MAIN', in models - define_table('main') after 
ugrate to 6.0 - it creates one more table - 'main'
Previously, this was not.
Maybe stupid question..

-- 
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: Weird problems generating menu from database

2017-08-16 Thread Вячеслав Анатольевич

Thank you so much, Massimo!

That's what I need!

-- 
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: Weird problems generating menu from database

2017-08-14 Thread Вячеслав Анатольевич


Hi! in that example - i have error:

   subsubmenu = [[key, None, link] for key, link in items]
ValueError: too many values to unpack

-- 
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: Weird problems generating menu from database

2017-08-07 Thread Вячеслав Анатольевич

>
> In Wiki menus:
>
- Home > @index

- Info > @info
- web2py > http://www.web2py.com
- - About us > @aboutus 

- - - Contact us > @contactus  -  If I add a third minus - THIS NOT WORKED!


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Weird problems generating menu from database

2017-08-06 Thread Вячеслав Анатольевич
Thanks, Massimo!
So, i have a database table - named "map", in that table - three field - 
menu1, menu2, mnm_name.
Menu mast be like that:

   - menu1
- menu2
  -mnm_name
In menu1 - menu2, in menu2 - mnm_name

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Weird problems generating menu from database

2017-08-02 Thread Вячеслав Анатольевич

>
> Me personally, no, but I understand BS3 limits the number of menu levels.
>
> /dps
>  
>

So, it is inpossible or not? I'm ask because it's hard to puzzle over this 
or it's really impossible?

-- 
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: Weird problems generating menu from database

2017-08-02 Thread Вячеслав Анатольевич
Have some idea about this?

-- 
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: Weird problems generating menu from database

2017-08-01 Thread Вячеслав Анатольевич
I understood what was the matter, it was styling!
But, how to add the third field:

if auth.is_logged_in():
 rows = db(db.map).select(db.map.menu1, db.map.menu2, db.map.mnm_name, 
orderby=db.map.num, distinct=True)


 from collections import defaultdict
 d = defaultdict(list)
 for row in rows:
 d[row.menu1].append(row.menu2)


response.menu = [('Shema', True, URL('default'),[

[key, False, None, [[sub, False, None, [[sub, False, 'link']]] for sub in 
sorted(d[key])]] for key in sorted(d)])

]


in layout.html add style and js:


 
  .dropdown-submenu{position:relative;}
  
.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0
 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
  .dropdown-submenu:hover>.dropdown-menu{display:block;}
  .dropdown-submenu>a:after{display:block;content:" 
";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px
 0 5px 5px;border-left-color:#cc;margin-top:5px;margin-right:-10px;}
  .dropdown-submenu:hover>a:after{border-left-color:#ff;}
  
.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px
 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}






How to add db.map.mnm_name to row.menu2, somthing like that -  


d[row.menu1].append(row.menu2).append(db.map.mnm_name) (i know - that's is not 
working) 


?

-- 
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: Weird problems generating menu from database

2017-08-01 Thread Вячеслав Анатольевич

>
> I'm using bootstrap css/js form wellcom app, about stupid.css - now 
> reading, but it's a little different, 
>
I need to build a menu from the database table (three fields), as in the 
> example above.
>
Somthing like this:

topmenu
 |menu
 |-sibmenu
 |  |- submenu 

>  
>

-- 
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: Weird problems generating menu from database

2017-07-31 Thread Вячеслав Анатольевич

Hi,  Dave S, maybe you right! But How to create in submenuitem - 
submenuitem?
>
>  
>

-- 
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: Weird problems generating menu from database

2017-07-30 Thread Вячеслав Анатольевич
Thanks for the answer, Massimo!

But this example makes the menu items in one line with one drop-down menu item.
Like this:

Menuitem Menuitem
- submenuitem- submenuitem

I have three fields, they must be somthing like this (anothermenu - just for 
example - to understand that is top menu):

 
 
Menuitem
- submenuitem
   - subsubmenuitem
- submenuitem
- submenuitem
Menuitem
-submenuitem
-submenuitem
- subsubmenuitem
- subsubmenuitem
- subsubmenuitem
-submenuitem
-submenuitem

Please, can you tell me how to do this?

-- 
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: Weird problems generating menu from database

2017-07-29 Thread Вячеслав Анатольевич
Hi!

Paraphrase the question, can anyone explain how to create 
a drop-down menu from a database table or show a working example?

-- 
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: Weird problems generating menu from database

2017-07-27 Thread Вячеслав Анатольевич


> db.define_table('store_catalog',
>> Field('title'),
>> Field('slug',requires=IS_SLUG(),compute=lambda row: 
>> IS_SLUG.urlify(row.titl\
>> e)),
>> Field('parent_id','reference store_catalog'))
>>
>> id1 = db.store_catalog.insert(title='main')
>> id2 = db.store_catalog.insert(title='one',parent_id=id1)
>> id3 = db.store_catalog.insert(title='two',parent_id=id2)
>>
>> def menu_rec(items): return 
>> [(x.title,None,URL('action',args=x.slug),menu_rec(x\
>> .children)) for x in items or []]
>> response.menu = menu_rec(db(db.store_catalog).select().as_trees())
>> print response.menu
>>
>

Hi! 
Is there a more modern solution to this issue? 
Raises an error - need more than 0 values ​​to unpack
If to substitute  
return [((x.title,None,URL('action',args=x.slug),menu_rec(x.children)) for 
x in items or []), False, URL('default')]

it shows - but an error


-- 
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: After update can't connect Oracle

2017-07-25 Thread Вячеслав Анатольевич
Hi, another error in oracle (can't create auth_  tables):

 not all arguments converted during string 
formatting

File "D:\Web\server\web2py\gluon\packages\dal\pydal\adapters\oracle.py", line 
70, in create_sequence_and_triggers
'MINVALUE -1;' % sequence_name)
TypeError: not all arguments converted during string formatting

Function argument list

(self=, query='CREATE TABLE "auth_user"(\n 
"id" NUMBER PRIMAR...HAR2(512),\n "registration_id" VARCHAR2(512)\n);', 
table=, **args={})


65.
66.
67.
68.
69.
70.

71.
72.
73.
74.

sequence_name = table._sequence_name
trigger_name = table._trigger_name
self.execute(query)
self.execute(
'CREATE SEQUENCE %s START WITH 1 INCREMENT BY 1 NOMAXVALUE ' +
'MINVALUE -1;' % sequence_name)

self.execute(_trigger_sql % dict(
trigger_name=trigger_name, tablename=tablename,
sequence_name=sequence_name,
id=id_name)

any ideas?

-- 
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: After update can't connect Oracle

2017-07-19 Thread Вячеслав Анатольевич
In web2py 2.15.2 
 - error not 
fixed... I fixed myself but:

File "D:\Web\server\web2py\gluon\packages\dal\pydal\adapters\oracle.py", line 
40, in execute
m = self.cmd_fix.match(command)
AttributeError: 'Oracle' object has no attribute 'oracle_fix'

-- 
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: After update can't connect Oracle

2017-07-18 Thread Вячеслав Анатольевич


But now i have another error:

File ".bububu.web2py\gluon\packages\dal\pydal\adapters\oracle.py", line 
71, in create_sequence_and_triggers
'MINVALUE -1;' % sequence_name)
TypeError: not all arguments converted during string formatting

-- 
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: After update can't connect Oracle

2017-07-18 Thread Вячеслав Анатольевич

Grandiose mersi!

-- 
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] After update can't connect Oracle

2017-07-18 Thread Вячеслав Анатольевич
HI!
Can anyone explain why after updating web2py to version 2.15.1 I started to 
get errors when connecting to Oracle?
For example, this:
AttributeError: 'Oracle' object has no attribute 'oracle_fix'

-- 
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: How I can disable user_group, membership, permission, events?

2017-06-15 Thread Вячеслав Анатольевич
Thx, i understand, that its all must be in model - im testing)
So, how i must write, that web2py understand "tabnum" like "id"?

In book i found:

db.mytable.other_id.represent = lambda id, row: row.myfield

and

primarykey=['accnum','acctype']

im trying, but still error.

-- 
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] How I can disable user_group, membership, permission, events?

2017-06-14 Thread Вячеслав Анатольевич
So, I have db/table where i have data, i want just login user by the my 
field/data:


def user():
auth = Auth(db, signature=False)
auth.settings.create_user_groups = False
db.define_table('user_psw',
Field 
('tabnum', 'id', 
readable=False, writable=False),
Field 
('name', readable=False, 
writable=False),
Field 
('pwd', 'password', 
requires=CRYPT (), 
readable=False),
Field 
('ipadr'),
Field 
('groupid'),
Field 
('registration_key', 
writable=False, readable=False, default=''),
Field 
('reset_password_key', 
writable=False, readable=False, default=''),
Field 
('registration_id', 
writable=False, readable=False, default='')
)
if request .args(0) == 
'login':
auth.settings.showid = False
auth.settings.table_user_name = 'user_psw'
auth.settings.login_userfield = 'name'
auth.settings.password_field = 'pwd'
auth.settings.login_next = URL 
('index.html')
auth.settings.logout_next = URL 
('index.html')
auth.settings.actions_disabled.append('register')
auth.settings.login_email_validate = False
custom_auth_table = db[auth.settings.table_user_name]
custom_auth_table.name.requires = IS_NOT_EMPTY 
()
custom_auth_table.pwd.requires = CRYPT 
()
auth.settings.table_user = custom_auth_table

login works, but some error:

File "D:\Web\server\web2py\gluon\tools.py", line 4159, in update_groups
table_membership.user_id == self.user.id).select()
  File "D:\Web\server\web2py\gluon\packages\dal\pydal\objects.py", line 90, in 
__getattr__
raise AttributeError
AttributeError

Whats wrong? I write - 
 auth.settings.create_user_groups = False

How i can disable this? In project i dont need any groups, memebership, etc... 
only login

-- 
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] Login(auth) from Oracle db

2017-06-01 Thread Вячеслав Анатольевич
Hi!
Can anybody help me? I am only starting on web2py.
So, i have db oracle with alredy having data, and i want to make login 
only, without reg/change pass and other.
I have a table in db for example, user_psw, where i have "name" and "pwd" - 
(username & password).
How i can tell web2py watch username and password in that table in that 
colums. If you can, small example please.
Sory fo my english.

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