[web2py] Nice web plugin, like jQZoom

2010-05-26 Thread KMax
http://www.professorcloud.com/mainsite/cloud-zoom.htm Looks great.

[web2py] FORM with CHEKCBOX and IS_IN_DB

2010-07-26 Thread KMax
Hello I had table defined: db.define_table('papers', Field('printdate','date'), Field('printout','boolean',default=False)) So I need FORM with checkboxes for each printdate, but if printout for particular date gets 'True' (mean to app user 'CLOSED FOR ACCEPT NEW POST' ) error message print

[web2py] Re: FORM with CHEKCBOX and IS_IN_DB

2010-07-27 Thread KMax
=id).printout >     chkposts=[Field('pst_ > %s'%pst.id,requires=condition,label=pst.printdate, writable=condition) > for pst in posts] >     form=SQLFORM.factory(*chkposts) >     if form.accepts(request.vars, session): >         response.flash = 'form accepted&#

[web2py] Re: FORM with CHEKCBOX and IS_IN_DB

2010-07-27 Thread KMax
I just solve this by using db.define_table('papers', Field('printdate','date'), Field('printout','boolean',default=False), Field('oncheck','string',default='on')) # this field for checkbox value = 'on' def test1(): chkposts=[] posts=db(db.papers.id > 0).select() for pst in

[web2py] Re: multiple checkboxes

2010-07-27 Thread KMax
> But after > reading:http://groups.google.com/group/web2py/browse_thread/thread/401b4c1928..., > I don't think sqlform.factory is able to do what I want it to do.  I > want to basically display ALL rows of a table given this database so Actualy FORM(and sqlform.factory i guess) could do any form

[web2py] performance issue select().first()

2010-08-02 Thread KMax
Hello I have situation when .select() give lots of rows select().first() start consume lots of cpu. I work around this by changing query to minimize answer of select(). LOGGING = True gives this in profile.log ncalls tottime percall cumtime percall filename:lineno(function) 3

[web2py] Re: performance issue select().first()

2010-08-02 Thread KMax
y=(0,1) On 2 авг, 17:37, mdipierro wrote: > use > > select(limitby=(0,1)).first() > > On Aug 2, 4:22 am, KMax wrote: > > > > > Hello > >  I have situation when .select() give lots of rows select().first() > > start consume lots of cpu. > >  I wor

[web2py] IS_IN_DB issue in FORM data

2010-08-11 Thread KMax
Hello I have following cut of code: db.define_table('papers', Field('printdate','date'), Field('printout','boolean',default=False), Field('globnum','integer'), Field('locnum','integer'), Field('oncheck','string',default='on',readable=False,writable=False)) conntroller posts =

[web2py] Re: IS_IN_DB issue in FORM data

2010-08-11 Thread KMax
m,None)) > > and > > posts = db(db.papers.printout == > False).select(limitby=(0,16),orderby=db.papers.id,cache=(cache.ram,0)) > > to force a refresh > > On Aug 11, 2:00 am, KMax wrote: > > > > > Hello > > I have following cut of code: > > db.d

[web2py] Re: IS_IN_DB issue in FORM data

2010-08-11 Thread KMax
Look like this should help. http://web2py.com/book/default/chapter/04?search=session#session Thank you.

[web2py] Re: IS_IN_DB issue in FORM data

2010-08-11 Thread KMax
As second thought, Pickle and put as hidden post element, this should prevent from overwrite session in case few forms opened in tabs. On 11 авг, 22:00, KMax wrote: > Look like this should > help.http://web2py.com/book/default/chapter/04?search=session#session > > Thank you.

[web2py] Re: Typo in cron..

2010-02-10 Thread KMax
Please note: gluon/contrib/cron.py has self.cronmaster = crondance(self.path, 'soft', starup = True) but should be (I guess) self.cronmaster = crondance(self.path, 'soft', startup = True) Thanks On Feb 7, 12:57 am, Thadeus Burgess wrote: > How do these make it into the commit ? >

[web2py] Re: How much memory does web2py need on Unix

2010-02-11 Thread KMax
Look like OpenVZ container. I play with this a lot. First of all memory size, not always limits your need. 64M - to low. Hardly to run static serve apache. (moderate load). VZ container also has limits for (sample from my server) 100: kmemsize23782914102256 2147483647 2147483647

[web2py] Re: Alert when email not sent sucessfully !

2010-02-12 Thread KMax
I could sudjest to use mail-hooks in two ways. 1. cron check mailbox for bouce messages and get invalid mails from there 2.use /etc/aliases (linux at least) and add there '|/opt/mysqcript' for email address which used to sent mail from. both types I get from RequestTracker http://bestpractical.com

[web2py] Re: web2py 1.75.5 is OUT

2010-02-26 Thread KMax
On 26 фев, 12:09, mdipierro wrote: > Changelog #1.75.5 > > fixed behaviour with languages.py, thanks Iceberg I had an issue with shifting translation. a=a b=b c=c become a=a b=c c= Does this issue fixed or something else? -- You received this message because you are subscribed to the Google Gr

[web2py] Re: Redefining db types without patching sql.py

2010-03-03 Thread KMax
andom': 'RANDOM()', 'notnull': 'NOT NULL DEFAULT %(default)s', 'substring': 'SUBSTR(%(field)s,%(pos)s,%(length)s)', }, } ---end of code This does not work, web2py use code from sql.py an

[web2py] Re: how to troubleshoot admin errors?

2010-03-21 Thread KMax
Hello My web2py instalation (1.73 and newer) was affected by the same issue. Running on debian by wsgi apache2. Installed by unzipping web2py_src.zip in to fresh folder and coping parameters_443.py. Creation of new application give an error flash "unable to create application." Workaround

[web2py] Re: web2py russian group

2010-08-19 Thread KMax
Thank you professor for announce. Добро пожаловать в группу. On 20 авг, 09:24, mdipierro wrote: > There is a web2py group in russian. > > http://groups.google.ru/group/web2py_russian > > If you are the owner please let me know and I will be happy to link it > from web2py.com

[web2py] oposite to XML operation or how to escape string

2010-08-19 Thread KMax
Hello I have a string with '&&' which must be replaced by If I change all && with and XML it, it could miss other html tag in a string I could join ''.join(DIV(substr)), but I do not need div tag in output. So how to escaped string without DIV or other HTML helper? I look at web2py source

[web2py] Re: oposite to XML operation or how to escape string

2010-08-20 Thread KMax
Yes, thanks. xmlescape(s) - makes tags safe On 20 авг, 17:16, mdipierro wrote: > something like this? > > ''.join(xmlescape(s) for s in t.split('&&')) > > On Aug 19, 11:25 pm, KMax wrote: > > > > > Hello > >  I have a string w

[web2py] Re: integrate editarea in application

2010-08-20 Thread KMax
What does mean 'without going through the admin interface' ? Try search TEXTAREA in book? On 20 авг, 23:12, Cory Coager wrote: > How would I integrate editarea in my application without going through > the admin interface?

[web2py] ajax post before ajax reload

2010-08-22 Thread KMax
Hello So we have a list of posts, which are need to be moderated. Each post is a link which load crud.update on the particular post. I plan to update the list to reflect crud.update changes. So I put into crud form: form.element(_type='submit')['_onclick'] = XML("ajax('"+str(URL(r=request,f='exp

[web2py] Re: ajax post before ajax reload

2010-08-22 Thread KMax
, > 'content');retrun false" % ( > URL('export.load',args=[request.args(1),request.args(2)]),request.args(1)) > > return false; should do what you ask. > > On Aug 22, 10:52 am, KMax wrote: > > > > > Hello > >  So we have a list of posts,

[web2py] Re: ajax post before ajax reload

2010-08-22 Thread KMax
return false; - helps avoid moving page at top, and now ajax crud.update appears like it hided. On 22 авг, 23:23, mdipierro wrote: > return false; should do what you ask.

[web2py] Re: ajax post before ajax reload

2010-08-22 Thread KMax
: > I think I need more explanation, a practical example of usage and an > example of code. I do not understand. > > On Aug 22, 11:39 am, KMax wrote: > > > > > Thank for this, but it works opposite. > > > This does not POST, but reload content. My current situat

[web2py] Re: ajax post before ajax reload

2010-08-22 Thread KMax
## to db.py added db.define_table('mytable',Field('myfield','string')) ## controllers/default.py def index(): """ example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html """ onclick = XML( "ajax('"+str

[web2py] Re: ajax post before ajax reload

2010-08-23 Thread KMax
This is link to example http://web2py.ru/test Click on 'show me' then on any in link of list and update. Second update will reflect changes in first time On 23 авг, 11:52, KMax wrote: > ## to db.py added > db.define_table('mytable',Field('myfield','

[web2py] Re: ajax post before ajax reload

2010-08-24 Thread KMax
I am glad you writing poems, but it is not the wall for comments :) This is for issue invetigation. On 24 авг, 07:33, KMax wrote: > This is link to examplehttp://web2py.ru/test > Click on 'show me' then on any in link of list and update. Second > update will reflect changes in

[web2py] Re: ajax post before ajax reload

2010-08-24 Thread KMax
form=crud.update(db.mytable,i.id,onaccept=crud.archive,deletable=False) result.append(DIV(DIV(A(XML(db.mytable[i.id].myfield),_href='#',_onclick=onclick)), ## db.mytable[i.id].myfield - force to reread data from table. # two days of brain breaking :) On 24 авг, 21:30, KMax wrote: >

[web2py] Re: Suggestions for the Basic Authentications

2010-09-19 Thread KMax
I guess, this is still actual. And some thought on profile remove feature. If some posts or any other records are referenced to the profile, is it good idea to drop them in cascade? I guess not. The obly way is mark profile as removed (or might empty all fields), and process this flag in app. Cros

[web2py] Re: AJAX issue with '#' in URL

2010-09-20 Thread KMax
Did you check errors in admin page? Ajax errors not easy to catch due their hideness. Try FireBug or other simular tools (Google chrome & IE8 has own build- in) On 13 сен, 10:40, weheh wrote: > Sorry, I don't think I was very clear in my last message. I tried > Massimo's suggestion but did the

[web2py] Re: postgresql 9

2010-09-20 Thread KMax
Hot-backup and other HA features make me excited! On 21 сен, 01:06, mdipierro wrote: > http://www.postgresql.org/about/news.1235

[web2py] Re: Suggestions for the Basic Authentications

2010-09-23 Thread KMax
reminding if actual > On 17 авг, 05:34, mdipierro wrote: This should be easy to do. I am traveling this week but I can do it the next. Please remind me.

[web2py] Re: nginx with bultin uwsgi module

2010-09-30 Thread KMax
Glad you note this, but no documentaions on top. I like nginx , but apache-wsgi is more documented so used. If any one have links to nginx-wsgi docs please share. On 30 сен, 19:12, elffikk wrote: > http://nginx.org/

[web2py] How cache in db().select() works

2010-10-05 Thread KMax
Hello In trying to optimize db selects I get start to use cache=(cache.ram, 10), but performance does not changed. So, I start to figure out how cache works. As I underdestand each process (or tread) has own cache in ram. If I get db(db.auth_user.id==1).select(cache.ram,600), then this requ

[web2py] Re: How cache in db().select() works

2010-10-05 Thread KMax
ur third table in your model description. > > On Oct 5, 12:15 am, KMax wrote: > > > > > Hello > >   In trying to optimize db selects I get start to use cache=(cache.ram, > > 10), but performance does not changed. > >   So, I start to figure out how cache works.

[web2py] Propose to add case-independ like

2010-10-05 Thread KMax
Hello Postgres has ILIKE where clawse, but it postgres specific extention. Is there way to add .ilike to gluon of web2py DAL ? Or is there the way to add .ilike to dal at model initialisation. I know that .lower could be used to workaround case sensity, but I have cyrillic chars and .lower

[web2py] Re: "unable to create application" on Ubuntu 10.04 LTS

2010-10-05 Thread KMax
Maybe not the same issue. But I do following: sudo su - www-data or to user which selected in wsgi settings. And do cd 'web2py installation dir' #put your path python web2py.py Set the password and then stop it (Ctrl-C). Restart apache and try to create new application complete with success. ps. m

[web2py] Re: prefork or worker mpm for apache embedded mode

2010-11-01 Thread KMax
I guess DAL threadsafe. Worker is better for mod_wsgi, it could use multithreads, while prefork is not. What is 'embedded mode' ? On 1 ноя, 10:26, Sujan Shakya wrote: > The preferred apache configuration for mod_wsgi applications is to run > in daemon mode. > But if the application is to be run

[web2py] Re: Component updating too quickly

2010-11-01 Thread KMax
I have same issue recently. Even give access to the app with demonstration... Solution were too oblevious. insert were after select, so only next select shows all data (with recently inserted row) On 1 ноя, 03:10, Luther Goh Lu Feng wrote: > In my action, I would like to update a component if

[web2py] Re: PostgreSQL super slowdowns

2010-11-01 Thread KMax
Please check .first() or .last() usage. With Postgres for some reason, all data are transfered to DAL, and on w2p side first or last recored selected. Solution also are easy use: .select(limitby=(0,1)).first() or select(limitby=(0,1),orderby=~db.papers.id).first() or .select(limitby=(0,1),orderby=

[web2py:36070] Re: expire login when browser closes

2009-11-27 Thread KMax
logout ? On 27 ноя, 00:54, vince wrote: > it will expire when browser close on firefox/safari. however, if you > just close the tab the session won't expire. is there any workaround > for this problem? -- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py:37578] restore db tcp connection

2009-12-19 Thread KMax
Hello Unable to find solution here, so i am asking. Is there any way to avoid Internal error on losing connection to db? At this moment I have to restart apache to restore connection. Apache2 and postgres8.3 run on separate linux workstations. Thanks in advice. -- You received this message be

[web2py:37586] Re: restore db tcp connection

2009-12-20 Thread KMax
db = DAL('postgres://web2py:web2p...@db.host.local/web2py', pool_size=10) Direct tcp connection. If db.host.local restarted or postgres restarted. No way to restore connection unless restart apache who host web2py. On 20 дек, 12:22, mdipierro wrote: > I think I need to know more about settings. W

[web2py:37599] Re: restore db tcp connection

2009-12-20 Thread KMax
I'l update this tread. Thank you for your attention. On 20 дек, 23:25, mdipierro wrote: > Please remind me > when the new DAL is out (in 2-3 weeks) so you test it. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send em

[web2py:37794] Re: Postgresql-types limited by web2py :(

2009-12-23 Thread KMax
+1 For now in may project, tables with inet types is out of web2py table definition, and live with their own life. Maybe some kind plugin could make this feature works in main application? On 24 дек, 00:01, Thadeus Burgess wrote: > I am also curious about using the postgresql inet type. -- You r

[web2py:37826] Re: Postgresql-types limited by web2py :(

2009-12-25 Thread KMax
Sorry for linking: http://www.postgresql.org/docs/current/static/datatype-net-types.html Maybe in some way inet/cidr types could be released using SQLCustomType On 24 дек, 10:20, mdipierro wrote: > what is the inet type? -- You received this message because you are subscribed to the Google Gr

[web2py:37834] Re: Happy Holidays

2009-12-25 Thread KMax
Warm wishes from cold Russia! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, vis

[web2py:38046] Re: Postgresql-types limited by web2py :(

2009-12-29 Thread KMax
Please advise. Error traceback Traceback (most recent call last): File "gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/web2py/applications/test/models/db.py", line 12, in SQLField('network',type=cidr)) File "g

[web2py:38054] Re: Postgresql-types limited by web2py :(

2009-12-29 Thread KMax
This code start to work === from gluon.sql import SQLCustomType db = DAL('postgres://web2py:gfhj...@db.sibnet.su/test1', pool_size=10) inet = SQLCustomType ( type='string',native='inet') db.define_table('firewall', SQLField('network',type=inet)) === Look like ==from gluon.dal

[web2py:38198] Look like http://www.web2py.com/ is DOWN

2010-01-02 Thread KMax
URL reply with: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Apache/2.2.9 (Ubuntu) mod_ssl/2.2.9 OpenSSL/0.9.8g Server at www.web2py.com Port 80 -- You received this message beca

[web2py:38204] membership manager plugin

2010-01-02 Thread KMax
Hello Im working on plugin to manage group membership. Main idea is following: Some kind of view loading the manager (i guess this way): =LOAD('plugin_membershipmanager',args=Group_id,ajax=True) Plugin gets all members of group with id=Group_id, and gets all users are not in group. Im easyly sho

[web2py:38242] Re: membership manager plugin

2010-01-03 Thread KMax
I have some progress here. Code might looks ugly, please excuse my newbie try. As you can see I use raw sql query to my postgress, since I fail to make same by web2py dal --begin of plugin controller-- def index(): group_id=request.args(0) if IS_IN_DB(db(db.auth_user.id==request.vars.id),db

[web2py:38256] Re: membership manager plugin

2010-01-03 Thread KMax
Thank you for comments. I was looking to .belongs side, but did not find correct one query. Searching for documentation make me think that all plugin_* stuff are not so complicatated. Just admin Plugins division. All my creating could be done using usual controller with corresponding view. Is not

[web2py:38287] Re: membership manager plugin

2010-01-03 Thread KMax
The issue is: links inside ajax loaded content on click does not update ajax loaded data, but sent browser to /welcome/plugin_groups/ index/1 # correct and about this guess? I guess only 'post' are modified to ajax compatible way, but not 'get' links. On 4 янв, 00:21, mdipierro wrote: > correct

[web2py:38317] Re: membership manager plugin

2010-01-04 Thread KMax
I get understand following things: I am too week with js GroupMembershipManager may be usual function from any controller with corresponding view. To use ajax features, I need make all get links as post (due to lack of js knowledge) OR Use http://code.google.com/p/jquery-hijack/ with Jquery UI

[web2py:38376] make web2py_ajax.html support A links

2010-01-05 Thread KMax
Hello I've done small modification to web2py_ajax.html (to function web2py_trap_form precisely) to support not only forms but A links also. #function web2py_trap_form(action,target) { # jQuery('#'+target+' form').each(function(i){ # var form=jQuery(this); # jQuery(':submit,.submit',

[web2py:38382] Re: membership manager plugin

2010-01-05 Thread KMax
And finaly membership manager was done. You could download it from following link (should be active for month) http://files.mail.ru/73S2GE or http://files.mail.ru/QXD2TK Just unpack (tar.bz2 and rar variant provided) in to your application ( aware web2py_ajax.html will be overwriten) Create at leas

[web2py:38423] Re: make web2py_ajax.html support A links

2010-01-05 Thread KMax
I believe this code trap only links inside .ajax loaded page. At least my plugin works well with this patch. Thank you for checking this. On 6 янв, 02:42, mdipierro wrote: > This is useful but I am not convinced it should be the default. > Perhaps we can capture only links of class "trapped". --

[web2py:38468] Re: template, static files, routes.py

2010-01-06 Thread KMax
I just check layout.html and found there place for menu. So it should not be the issue to plase at layout.html code like {{=myhead()}} and only issue will be valid return of myhead(). is it? On 6 янв, 21:36, mdipierro wrote: > Yes and no. the web2py template language is very different from > Djang

[web2py:38483] [bug?] [ update all languages ] mix translation

2010-01-06 Thread KMax
Hello I have broke my translation file for second time while 'update all languages' Most translation are shifted to up heighbour. And at the and there are 3-4 steps different: like # coding: utf8 at the begining all fine { '"update" is an optional expression like "field1=\'newvalue\'". You cann

[web2py] Re: mix translation

2010-01-06 Thread KMax
The lastest version. On 7 янв, 05:31, mdipierro wrote: > Which web2py version? I made some patches to sql.py and dal.py ( timestamp->timestamp with time zone, integer -> bigint, serial->bigserial), hardly belielive this is cause. Maybe ru locale is the reason? Webserver locale? Did anyone with ru

[web2py] Re: new in trunk RFC

2010-01-11 Thread KMax
few questions bellow: On 10 янв, 21:38, mdipierro wrote: > There are two new features in trunk. One will probably stay, the other > I do not know: > > 1) Before you could do > >     db.define_table('person',Field('name'),format='%(name)s') >     db.define_table('dog',Field('name'),Field('owner',db

[web2py] Why id=0 is not assessible by [0]

2010-01-16 Thread KMax
Hello Lets define at db.py db.define_table ('a', SQLField('a')) And lets insert to this table (not by web2py admin panel) sqlite> insert into a values(0,0); And then def test(): return dict(message=db.a[0].a) --- Will give: Traceback (most recent call last): File "gluon/restri

[web2py] Re: Why id=0 is not assessible by [0]

2010-01-16 Thread KMax
So, I make a resume. Using zero id was bad idea. Thank you. On 16 янв, 23:16, mdipierro wrote: > id starts counting a zero. It is not a rule but a convention in SQL. > web2py makes sure it is followed. > > Massimo -- You received this message because you are subscribed to the Google Groups "web

[web2py] Re: Why id=0 is not assessible by [0]

2010-01-16 Thread KMax
I note about force id value on insert: sqlite> insert into a values(0,0); Yes, it is hack. Yes, I was trying to cheat with id for my own reasons. And then I was surprised that db.a[0].a does not exist while db.a[1].a is. Looking in to the sourcecode does not give me the answer 'Why' due to luck of

[web2py] Re: restore db tcp connection

2010-01-16 Thread KMax
remider > On 20 дек, 23:25, mdipierro wrote: > > >  Please remind me > > when the new DAL is out (in 2-3 weeks) so you test it. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To uns

[web2py] format = lambda ... give error

2010-01-17 Thread KMax
Please find test code below If i remove format = lambda x: from defining db.a, no error appears Error traceback Traceback (most recent call last): File "gluon/restricted.py", line 171, in restricted File "C:/!Work/web2py/applications/test/models/db.py", line 9 format = '%(a

[web2py] Re: format = lambda ... give error

2010-01-17 Thread KMax
my fall, I'l make better samble (missed ",") On 17 янв, 18:45, KMax wrote: > Please find test code below > If i remove format = lambda x: from defining db.a, no error appears > > Error traceback > Traceback (most recent call last): >   File &q

[web2py] Re: format = lambda ... give error

2010-01-17 Thread KMax
Ok! 1.74.6 helps. My linux instalation was not updated, while windows is update date which confuse me. On 17 янв, 19:02, KMax wrote: > my fall, > I'l make better samble (missed ",") > > On 17 янв, 18:45, KMax wrote: > > > Please find test code below >

[web2py] Re: Table id referenced to another table error?

2010-01-17 Thread KMax
On 18 янв, 08:20, Gibran Rodriguez wrote: > db.define_table('Activity', >                 Field('type',length=45), >                 Field('start_date','date'), >                 Field('end_date','date'), >                 Field('money',length=45), >                 Field('price','double'), >    

[web2py] Re: showcase

2010-01-18 Thread KMax
Error: Not Found The requested URL / was not found on this server. On 18 янв, 20:19, Chris wrote: > Hello, > I am newbie in python and web2py. This is my first > app.http://genille.vievox.com -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To

[web2py] Re: LIKE case sensitivity: Postgres differs to MySQL => DAL not portable

2011-01-28 Thread KMax
On 7 дек 2010, 00:31, Fran wrote: > - minimally it should be in a FAQ (ideally in the next Book) & ideally > we could have a case_sensitive=True option for the DAL like() > operator...to ensure that both pgsql & mysql/sqlite existing apps > didn't break, it could default differently depending on

[web2py] Re: LIKE case sensitivity: Postgres differs to MySQL => DAL not portable

2011-01-28 Thread KMax
On 29 янв, 05:39, Bernd Rothert wrote: > On 28 Jan., 16:46, Thadeus Burgess wrote: > > > Case sensitive search is one of the benefits of using postgres instead of > > mysql! > > As Fran wrote case insensitive LIKE is just a default for MySQL and > sqlite. MySQL supports case sensitive search: Thi

[web2py] pg8000 '%' not supported in quoted string

2012-07-16 Thread KMax
Hello, Seems like an issue for me, pg8000 cant insert into db char '%'. As a result inserting string = 'We did it for 100%' throw an exception. '%'' not supported in quoted string pg8000 checks for '%' in an arguments, so... Thank you. -- Maxim

[web2py] Re: pg8000 '%' not supported in quoted string

2012-07-16 Thread KMax
it properly. If you can post your whole > traceback, I could help you to find out what file you need to add the extra > escaping. > > On Monday, July 16, 2012 4:34:07 AM UTC-7, KMax wrote: >> >> Hello, >> Seems like an issue for me, pg8000 cant insert into db char &

[web2py] virtual fields book example

2012-09-12 Thread KMax
Hello, I was looking the book http://www.web2py.com/books/default/chapter/29/06 And intrested with: New style virtual fields (experimental) Create model.db with: db.define_table('item', Field('unit_price','double'), Field('quantity','integer')) db.item.total_price = Field.Virtual(lambda

[web2py] Re: virtual fields book example

2012-09-12 Thread KMax
be wrong in the book. > > > On Wednesday, 12 September 2012 11:21:10 UTC-5, KMax wrote: >> >> >> Hello, >> I was looking the book http://www.web2py.com/books/default/chapter/29/06 >> And intrested with: >> >> New style virtual fields (experimental)

[web2py] bug? MSSQL query where date compares - Fails

2012-09-19 Thread KMax
Hello, DAL with MSSQL Query like: db(db.mytable.date>now()).select() Gives error: ('22007', '[22007] [FreeTDS][SQL Server]Conversion failed when converting character string to smalldatetime data type. (295) (SQLExecDirectW)') now() -> translated into: '2012-09-19 23:22:56.977817') Runnin

[web2py] select * from table_name where id IN (1,2,3,4,5,6) Using DAL ?

2012-07-04 Thread KMax
Hello, Is any way to query subj with DAL sintax? I am using two databases, and I want select from second one few rows according to result of select from first database. I think this will not work. db1(db1.tablename.id==db2.tablename.id).select() Thanks in advance -- Maxim

Re: [web2py] select * from table_name where id IN (1,2,3,4,5,6) Using DAL ?

2012-07-04 Thread KMax
пользователь Marin Pranjić написал: > > You cannot join tables that are not in the same database. > > You can do: > > list_of_ids = db1(...).select(db1.tablename.id).as_list() > > db2(db2.tablename.id.belongs(list_of_ids)).select() > > > Marin > > On We

Re: [web2py] select * from table_name where id IN (1,2,3,4,5,6) Using DAL ?

2012-07-04 Thread KMax
*belongs* - indeed! Thank you all for working samples. среда, 4 июля 2012 г., 19:53:50 UTC+7 пользователь Anthony написал: > > list_of_ids = db1(...).select(db1.tablename.id).as_list() >> > > That will yield a list of dictionaries. Instead, you can do: > > list_of_ids = [r.id for r in db1(...).se

[web2py] Re: MS SQL server

2012-11-04 Thread KMax
Have you checked here: https://web2py.com/books/ ? 1 - not really true. 2 - save as with usuall PK 3 - There are a lot of in the boot and in the other sites noted here суббота, 3 ноября 2012 г., 18:13:17 UTC+7 пользователь Jscriptor09 написал: >

[web2py] widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread KMax
Hello, Using this widget=SQLFORM.widgets.checkboxes.widget for list of values gives the following html code: Option1 Option2 While if INPUT reside inside LABLE it looks better (imho) Option1 Option2 Same time this change might broke some compatibility. Maybe this behavior was m

[web2py] Re: widgets.checkboxes.widget INPUT inside LABLE

2012-12-24 Thread KMax
orms<http://www.w3.org/TR/html5/forms.html#forms> >>> tells: >>> >>> "To label a control, the label element is used; the label text and the >>> control itself go inside the label element." >>> >>> So KMax request should be accept

[web2py] Re: Script to generate schema (models) from mysql

2012-02-09 Thread KMax
Hi I was trying to create model/db.py for RequestTracker mysql schema, and was fail. I found quite good plugin_legacymysql and fixed for my needs - added few types - remove 'SET' lines same as remarks - mysql data types without params (like text,) - import form_factory from sqlhtml

[web2py] Re: Subdomain based on blog users in routes.py

2011-10-01 Thread KMax
Have you looked in apache2/nginx redirect engine? On 2 окт, 05:23, Jonathan Lundell wrote: > On Oct 1, 2011, at 3:13 PM, Jonathan Lundell wrote: > > > On Oct 1, 2011, at 2:13 PM, Farsheed Ashouri wrote: > > >> I think i have no problem with DNS. cause i put a * value in subdomain > >> setting of

[web2py] xml view of dict() with attributes

2011-10-23 Thread KMax
Hello, Please help with exporting some dict to .xml view with attributes inside tags. Like: Title Value I am talking about "hello='world'" in the itemtitle tag. I know, I could do it with TAG, but how to make it using regular dict() return? i mean: def myxml(): return dict(itemti

[web2py] Re: xml view of dict() with attributes

2011-10-23 Thread KMax
t;    {{=itemvalue}} > > > On Oct 23, 5:09 am, KMax wrote: > > > Hello, > >   Please help with exporting some dict to .xml view with attributes > > inside tags. > > > Like: > > > > > > >    Title > >    Value > > > > &g

[web2py] Re: xml view of dict() with attributes

2011-10-24 Thread KMax
т, 21:15, Massimo Di Pierro wrote: > Yes. You need to implement your own XML serializer. You can use > helpers too for this purpose. It really depends on how your output > should look like. > > On Oct 23, 11:07 pm, KMax wrote: > > > > > > > > > So, wi

[web2py] Re: xml view of dict() with attributes

2011-10-25 Thread KMax
I am sure for complicated response lxml is the best. But for simple response is TAG. On 24 окт, 23:16, Richard Vézina wrote: > lxml is pretty nice lib for the task... > > Richard > > On Mon, Oct 24, 2011 at 11:57 AM, KMax wrote: > > my solu

[web2py] Re: app slow to death (sorry double post because empyt object)

2011-12-01 Thread KMax
How you have tested the load? What is your CPU/RAM ? How did you configure tread/process of wsgi ? I have a case when all slow down was on .first() or .last() ofter db was populated On 1 дек, 22:44, Richard Vézina wrote: > Use top, iotop, itop and screen so I can switch between those top... > >

[web2py] Re: Returning the Row after insert;

2011-02-01 Thread KMax
Actualy do the same action, but select allow to choose columns On 1 фев, 05:36, Vasile Ermicioi wrote: > db(db.auth_user.id=id).select() will give you a list of rows (of one element > :) ) > > easier is > > row = db.auth_user[form.vars.id]

[web2py] Re: Support for Drizzle in web2py

2011-02-02 Thread KMax
http://wiki.drizzle.org/FAQ Can I run a website with this? No. We are still making incompatible changes, and certainly do not believe the code is production quality. Right now we are defaulting many configure operations to generate debugging code for us so our binaries are not optimal. Therefore,

[web2py] Re: Mixing/supporting CMS with Web2py

2011-02-02 Thread KMax
Once I have idea for seamless moving from joomla for web2py. Stoped on attaching to joomla users table and joomla coocke of loggined in. Maing goal was to use links in joomla site to web2py functions which should use user auth from joomla. And with several steps move completely to web2py or share

[web2py] Re: LIKE case sensitivity: Postgres differs to MySQL => DAL not portable

2011-02-04 Thread KMax
On 29 янв, 04:53, Thadeus Burgess wrote: > IMHO This breaks backwards compatibility... If .like() should match case-insensitive then this is bug fix. At http://web2py.com/book/ this does not specified explicitly. PS. .ilike for case insensitive? I think the question is, to make it available for

[web2py] Re: drop support for python 2.4?

2011-02-11 Thread KMax
Just make Latest python2.4 compatible web2py_src.zip What something new, upgrade python, hosting or something else. If not, use lastest web2py_src for 2.4 Reasonable? On 5 фев, 02:37, Massimo Di Pierro wrote: > @web2py-developers we have discussing the possibility of dropping > support for Pytho

[web2py] Re: mod_pagespeed

2011-02-15 Thread KMax
Does not use it. But read http://code.google.com/intl/ru-RU/speed/page-speed/docs/module.html Resolution, this module used to optimize traffic (fix me) by filtering out useless spaces, and etc. This does not speed up web2py any kind, due to it works with generated htmls. This job do gzip module ve

[web2py] Re: VirtualFields are really slow with large datasets

2011-02-16 Thread KMax
I guess, virtualfield items gets their value by dedicated select, which give so much overheat.

[web2py] Re: Async http request in web2py

2011-02-18 Thread KMax
asynchronous http and synchronous http What the difference ? On 18 фев, 10:37, Dane wrote: > Hi, > > I need to make an asynchronous http request to one of my controller > functions in order to some lightweight background processing > (refreshing some cached objects). I came upon this thread: > > h

  1   2   >