[web2py] web2py fails auth on mysql with 1045 error

2022-05-01 Thread Ivan Gazzola
I'm trying to connect to a new db: db=DAL('mysql://userx:password@localhost/IgXortho?set_encoding=utf8mb4') I can login with my user, when I check grants I've got this: >< mysql> show grants;

[web2py] Web2py fail auth to mysql

2022-05-01 Thread Ivan Gazzola
I'm ring to connect to a new db: db=DAL('mysql://userx:password@localhost/IgXortho?set_encoding=utf8mb4') I can login with corteo user, when I check grants I've got this: >< mysql> show grants;

[web2py] How to define constraints DAL Beginner

2020-07-21 Thread Ivan Luis
db.define_table('jogador', Field('nome', 'string'), Field('posicao','string'), Field('altura','double'), Field('peso','double'), Field('equipe') ) db.define_table('equipe', Field('nome', 'string') ) I'm trying do reference the field " Equipe " at Jogador with "Name" at Equipe but

[web2py] Re: 255

2020-07-19 Thread Ivan Luis
Where can i found pycache ? Em terça-feira, 26 de maio de 2020 04:41:45 UTC-3, Geo escreveu: > > I use python 3.7 but I had the same issue, to solve it I kind of cheated > by adding MySQL default charset 255 > > in gluon\contrib\pymsysql\charset.py I have added this at line 260 (at > the end

[web2py] Looking for web2py developer for Italian small company

2020-01-21 Thread Ivan Gazzola
We are a small company in Italy, we need a new developer for our project (xortho.it) The web app is developed with jquery mobile and web2py, we are planning to move to angular and web2py or better py4web. If you're interested please contact us. Ciao Ivan -- Resources: - http://web2py.com

[web2py] Re: Admin password

2019-10-25 Thread Ivan Gazzola
I've got the same problem How did you solve it? Thx Ivan Gazzola Il giorno giovedì 16 maggio 2019 17:32:26 UTC+2, Gaël Princivalle ha scritto: > > >Does parameters_443.py exist in web2py dir? > Yes. > > >Check permissions - does web2py have access to this file? > Yes

[web2py] How to debug views?

2018-11-18 Thread Ivan Gazzola
I'm writing my code with Pycharm and I like testing my code and debug with breakpoints. Is there a way to debug python code in views? I can't figure out how to do that, I just check errors in admin interface :( Thx Ivan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: ondelete attribute missing in 2.17.2

2018-11-04 Thread Ivan Gazzola
> > > > On Sunday, 4 November 2018 12:50:21 UTC-8, Ivan Gazzola wrote: >> >> I've updated to 2.17.2-stable from 2.16.1 but i've got this error: >> >> invalid table "Prestazioni" attributes: set(['ondelete']) >> invalid_kwargs set(['ondelete'])

[web2py] ondelete attribute missing in 2.17.2

2018-11-04 Thread Ivan Gazzola
),ondelete='SET NULL') Is it changed pydal? Regards Ivan -- 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

[web2py] How to set up a custom applications folder running web2py with Apache and mod_wsgi?

2018-10-12 Thread Ivan Mikovski
ations folder. The symbolic link is deleted by an automatic deployment process, which I don't have permissions to alter. What is the best alternative to the symbolic link? Best Regards, Ivan Mikovski -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/

[web2py] Re: MULTIPLE APPLICATIONS IN SAME HOST/SUBDOMAINS WITH NGINX

2017-02-07 Thread Ivan Gazzola
Just edit the routes.py file I'm using sub-domains and a file like this: # -*- coding: utf-8 -*- routers = dict( BASE = dict( default_application="site1", domains= { 'domain.com':'site1',

[web2py] Re: AppConfig and % interpolation

2016-09-27 Thread Ivan
that doesn't interpolate at all Il giorno martedì 27 settembre 2016 17:30:21 UTC+2, Niphlod ha scritto: > > hum. did you try excaping the % with % , which means basically having %% > instead of % ? > > On Tuesday, September 27, 2016 at 4:15:45 PM UTC+2, Ivan wrote: >> >> I don'

[web2py] Re: AppConfig and % interpolation

2016-09-27 Thread Ivan
I don't want to interpolate. I have an option with a % inside and the AppConfig raises an exception. -- 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

[web2py] AppConfig and % interpolation

2016-09-27 Thread Ivan
If the .ini file contains an option with a % (eg a password), the AppConfig class raise an InterpolationSyntaxError exception. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] auth event logging for password reset

2016-08-30 Thread Ivan
After looking at the event logging behaviour for a password reset request, I think that: 1. the default message for the request should be 'User %(id)s Password reset *requested*' (because the psw is not yet changed) 2. it seems that the log message when the user change his password (by the

[web2py] missing files after "pack compiled"

2016-07-12 Thread Ivan
I have packaged (os: windows) a compiled app but some files were not added. For example: "markers-ma...@2x.png" I guess the "@" character is the problem. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] request.args and special character

2016-05-24 Thread Ivan Gazzola
he source code for args assignment but I can't find it :( Thx Ivan -- 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

[web2py] Re: Flash message if before_insert fail

2016-02-19 Thread Ivan Gazzola
e going to loop through a set of records, don't recalculate >the same value over and over inside the loop (i.e., in your callback, you >would move the transformation of the Name via CRYPT outside the loop, as >you only need to do it once). > > Correct ! > Anthony > &

[web2py] Re: Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
016 at 8:55:49 AM UTC-5, Ivan Gazzola wrote: > > > db.define_table('poc', > Field > <https://xortho.it/examples/global/vars/Field>('Name',required=True), > Field > <https://xortho.it/examples/global/vars/Field>('Birth

[web2py] Re: Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
db.define_table('poc', Field ('Name',required=True), Field ('Birthday','date',widget=bsdatepicker_widget(),required=True), Field

[web2py] Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
How can I change that? I've tried to change response.flash in callback function but this doesn't work properly, I always get the "new record inserted" message even if the record is not stored in DB. Thx Ivan -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] Migration from console

2015-12-01 Thread Ivan Gazzola
Is it possible to apply migration from console without changing migrate=False in dal connection? How can I do it? Thx Ivan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: web2py dal not creating database

2015-05-14 Thread Ivan Terreno
Ohhh...its great!!!... you fixed my problem!!! El domingo, 13 de noviembre de 2011, 20:41:53 (UTC-3), rochacbruno escribió: as you are using mysql. try to delete everything you has in /databases folder (the .table files) backup it. then try again with table definitions and migrate=True

[web2py] name 'auth' is not defined after upgrading web2py

2015-02-24 Thread Ivan
Hi, I have upgraded web2py from 2.5.1 to 2.9.12 but a compiled app stopped to work issuing the error: type 'exceptions.NameError' name 'auth' is not defined The line number showed in the ticket refers to: @auth.requires_login() The app works if compiling it again with 2.9.12. Is it required to

[web2py] Re: Problem with JSON

2015-02-18 Thread Ivan Gazzola
Ok, solved :) The issue was in some changes in Jquery. Now JQuery parses ajax response before than it is passed to success function, so js fails if I call parse on it: risposta=JSON.parse(json); ^^^ THX Ivan Il giorno lunedì 16 febbraio 2015 21:12:17 UTC+1

[web2py] Problem with JSON

2015-02-16 Thread Ivan Gazzola
After last upgrade i've this problem with response.json -Controller cut --- if form.process().accepted: return response.json({'formkey':form.formkey,'html' :XML(html_from_helpers)}) -cut --- The json generated by controller fails in this js because don't escape double

[web2py] Re: Problem with sessions2trash.py

2015-02-05 Thread Ivan Gazzola
-6, Ivan Gazzola wrote: #!/bin/bash while IFS= read -r app; do python /www/web2py/web2py.py --nogui --no-banner -S $app -M -R /www/web2pyscripts/sessions2trash.py -A -o -x 28800 -f /www/web2py/clean.txt 21 done /www/web2py/applications/list_app.txt I'm trying to clean sessions for many

[web2py] Problem with sessions2trash.py

2015-02-05 Thread Ivan Gazzola
Ivan -- 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

[web2py] Re: Web2py Deployment Script for Ubuntu 14.04

2014-08-16 Thread Ivan Di Giusto
-ubuntu-14.04.sh I will be submitting a proposed solution on code.google site. Ivan On Saturday, 19 July 2014 14:51:44 UTC+10, Brian M wrote: I posted about this a couple weeks ago along with what worked for me ,, https://groups.google.com/forum/#!searchin/web2py/Apache$20Ubuntu%7Csort:date

[web2py] db commit and xmlrpc faults

2014-07-31 Thread Ivan
I've read (if it is correct) that at the end of a request without errors, the db is automatically committed by web2py. Now, I have an xmlrpc function that should insert 2 records in a transaction. If the second insert fails (for example for a syntax error in the query, or for a notnull

[web2py] IPN paypal 404 ???

2014-07-30 Thread Ivan Gazzola
When i call /paypal/ipn from a browser is ok, when paypall try to send IPN the relay is 404??? x.x.x.x - - [30/Jul/2014:13:09:03 +0200] POST /paypal/ipn HTTP/1.0 404 66 - PayPal IPN ( https://www.paypal.com/ipn ) x.x.x.x - - [30/Jul/2014:13:10:25 +0200] POST /paypal/ipn HTTP/1.0 404 66 -

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-07-30 Thread Ivan
using postgresql). Why is this? And is there a workaround to make reference fields not null? Or worst case can I add the not null constraint manually in the db without breaking anything? On Tuesday, June 19, 2012 11:40:37 AM UTC-4, Ivan wrote: Same problem here! The notnull=True

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
. Il giorno giovedì 16 gennaio 2014 00:00:41 UTC+1, Anthony ha scritto: What value of dentista is being inserted, and have you confirmed that that value is the id of one of the records in the Nominativi table? On Wednesday, January 15, 2014 5:56:18 PM UTC-5, Ivan Gazzola wrote: I've this table

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
I found the code in sqlhtml.py, the empty upload value is '' or default elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname if f == '' or f is None: if self.vars.get(fd, False):

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
Ok, i renamed the field logo in logo2 and all works fine... Rechecking the code I saw that I had defined in a previous version the field logo as reference. it is probably not deleted the foreign key in sqlite when I change the definition of the field from reference to upload thx Ivan Il

[web2py] Bug in DAL with SQLFORM, upload field and required field ???

2014-01-15 Thread Ivan Gazzola
I've this table: db.define_table(Consulenze, Field('dentista','reference Nominativi', required=True), Field('data_inizio_collaborazione','date'), Field('data_fine_collaborazione','date'), Field ('percentuale','integer'), Field('logo','upload')) In console insert and

[web2py] Re: web2py Italy

2013-12-18 Thread Ivan Gazzola
Arrivo anch'io ... Il giorno mercoledì 18 dicembre 2013 14:41:57 UTC+1, Raffaele Tesi ha scritto: Alla grande!!! Il giorno venerdì 27 settembre 2013 10:37:23 UTC+2, Gael Princivalle ha scritto: Hi. For web2py users that speak Italian, I've create the web2py-it group. It could be a

[web2py] how to refer to other field in filter_in filter_out?

2013-12-17 Thread Ivan Gazzola
db.define_table('files', Field('nome','reference Nomi',required=True, requires=[IS_IN_DB(db, 'Nomi.id')]), Field('title', string, unique=False,label=Descrizione), Field('note'), Field('immagine', 'upload', autodelete=True),

[web2py] Re: how to refer to other field in filter_in filter_out?

2013-12-17 Thread Ivan Gazzola
On Tuesday, December 17, 2013 7:35:09 AM UTC-5, Ivan Gazzola wrote: db.define_table('files', Field('nome','reference Nomi',required=True, requires=[IS_IN_DB(db, 'Nomi.id')]), Field('title', string, unique=False,label=Descrizione), Field('note'), Field('immagine', 'upload', autodelete

[web2py] Re: autofocus html5 attribute support?

2013-12-14 Thread Ivan Gazzola
I use in view: form.element('#id_field')['_autofocus']='' and i get: input autofocus id='id_field' like html5 Il giorno venerdì 9 agosto 2013 04:04:17 UTC+2, Anthony ha scritto: form.custom.widget.tm_home[_autofocus] This is just standard Python, so the above simply attempts to

[web2py] foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I can't resolve this ticket in mhy app. I try to insert from appadmin but i've always this error: class 'sqlite3.IntegrityError' foreign key constraint failed This is my model: db.define_table('Nominativi', Field('nome',notnull=True, represent=lambda nome:nome.title()),

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I changed all fields in 'referece field' format but nothing changes :( For the validatos IS_IN_DB(db,db.table.field,format) is mistaken and return errors, indeed the correct form is IS_IN_DB(db,table.field,format) ... Regards Ivan Il giorno domenica 8 dicembre 2013 17:20:15 UTC+1, 黄祥 ha

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
If possible I prefer to keep foreign_keys=True for db integrity. Thx Ivan Il giorno domenica 8 dicembre 2013 15:41:03 UTC+1, Ivo ha scritto: though it may not be the preferred solution I resolved it by adding: adapter_args=dict(foreign_keys=False) to db = DAL('sqlite://storage.sqlite

[web2py] Encrypt table and search in fields

2013-07-31 Thread Ivan Gazzola
I'm trying to use this https://groups.google.com/d/msg/web2py/uGFQD0PBefQ/Zi-SPOLVSXIJ for encrypting data in a sqlite table. I need to search in one field with 'like' operator for buil a ajax list, i use this function: def ajaxlivesearch(): partialstr = request.vars.values()[0] query

[web2py] Re: Encrypt table and search in fields

2013-07-31 Thread Ivan Gazzola
I need to encrypt data (medical data!) in db because if I encode the fs when mounted this remains visible and for a web app the fs is always mounted. I would like to protect the data in case of access to the fs. Any tips? thx Ivan Il giorno mercoledì 31 luglio 2013 10:33:00 UTC+2, Massimo Di

[web2py] compute field insert/update

2013-04-25 Thread Ivan Šandrk
I'm using a compute field to set uid's for model instances. The problem is that the compute function gets called on INSERT and on each subsequent UPDATE operation. I don't want the UPDATE's to change this field - can I somehow detect where there's an INSERT or an UPDATE in progress? I thought

[web2py] Re: compute field insert/update

2013-04-25 Thread Ivan Šandrk
-callbacks On Thursday, April 25, 2013 5:47:30 PM UTC+2, Ivan Šandrk wrote: I'm using a compute field to set uid's for model instances. The problem is that the compute function gets called on INSERT and on each subsequent UPDATE operation. I don't want the UPDATE's to change this field

[web2py] Re: problem with TAG in module

2013-04-04 Thread Ivan Gazzola
Ok Il giorno giovedì 4 aprile 2013 00:10:02 UTC+2, Massimo Di Pierro ha scritto: import gluon should be from gluon import * On Wednesday, 3 April 2013 16:06:24 UTC-5, Ivan Gazzola wrote: I wrote this module my_util.py: #!/usr/bin/env python # coding: utf8 import gluon def

[web2py] problem with TAG in module

2013-04-03 Thread Ivan Gazzola
I wrote this module my_util.py: #!/usr/bin/env python # coding: utf8 import gluon def my_form(form, fields): table = TAG['']() for id, label, controls, help in fields: lab1=str(label) tmp_label=lab1.partition('') lab1=tmp_label[0]+tmp_label[1]+'b'+tmp_label[2]

[web2py] Form.process().accepted stops form (web2py + jquery mobile)???

2013-02-23 Thread Ivan Gazzola
I've the action nominativo, that works. When i add the if condition for checking form.process().accepted (is the code from to ) the form submit data but don't accept the variables. Any idea I need the conditional for redirection after form submission def nominativo():

[web2py] Re: Form.process().accepted stops form (web2py + jquery mobile)???

2013-02-23 Thread Ivan Gazzola
*().accepted: ... On Saturday, 23 February 2013 07:27:11 UTC-6, Ivan Gazzola wrote: I've the action nominativo, that works. When i add the if condition for checking form.process().accepted (is the code from to ) the form submit data but don't accept the variables. Any idea I need

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Ivan Gazzola
type. Delete the database and start again. I do not think there is anything wrong with your code. On Sunday, 27 January 2013 15:51:33 UTC-6, Ivan Gazzola wrote: Il giorno giovedì 24 gennaio 2013 18:56:59 UTC+1, Massimo Di Pierro ha scritto: db.Relation.name.widget

[web2py] Re: Autocomplete problem ...

2013-01-27 Thread Ivan Gazzola
Il giorno giovedì 24 gennaio 2013 18:56:59 UTC+1, Massimo Di Pierro ha scritto: db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field= db.Person.id http://db.person.id/) db.Relation.contact.widget=SQLFORM.widgetsre.autocomplete(request,db.Person,id_field=

[web2py] Autocomplete problem ...

2013-01-24 Thread Ivan Gazzola
I'm trying my first application in web2py. I've this model db.define_table('Person', Field('name'), format='%(name)s') db.define_table('Relation', Field('name',db.Person), ('contact',db.Person)) db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field=db.Person.id)

[web2py] Re: A Web2py CMS like Joomla ?

2012-10-29 Thread Ivan G
I am new to Python (leaving php) and new to web2py. I have tried to learn django, but the break of backwards compatibily made I leave it quickly, because was difficult to find expert people with the new versions and probably more backward compatibility breakings, so web2py seems a very good

[web2py] Re: help test codemirrorw

2012-10-17 Thread Ivan Brkanac
On osx chrome ctrl+f11 full screen is to big there is no end off editor on screen. Also on default view only about 40% is usable for editing rest is mostly waist, key bindings hase same size as usable editor, can this be changed somewhere ? Ivan On Sunday, September 9, 2012 6:26:40 AM UTC+2

[web2py] Language in outgoing URLs

2012-06-24 Thread Ivan Nikiforov
I am creating a multilingual application and use this recipe to put language in URLs. routers = dict( BASE = dict(default_application='myapp'), myapp = dict(languages=['en', 'it', 'jp'], default_language='en'), ) It works fine for incoming URLs but the URL function does not add language

[web2py] URl function and languages

2012-06-24 Thread Ivan Nikiforov
routers = dict( BASE = dict(default_application='myapp'), myapp = dict(languages=['en', 'it', 'jp'], default_language='en'), ) Enter code here... I am creating a multilingual application and use the above recipe to put language into URL. This works fine for incoming URLs but the URL

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2012-06-19 Thread Ivan
Same problem here! The notnull=True parameter doesn't append the NOT NULL clause for reference fields. The IS_IN_DB function activates the check at form-level while the notnull parameter should set the constraint at db-level.

[web2py] Thumbnails

2012-02-28 Thread Ivan Vilches Basaul
Any way for automatic thumbnails creation? Thanks Ivan Vilches Basaul

[web2py] Nobs questions about install web2py on webfaction and others...

2012-01-25 Thread Ivan Vilches Basaul
Hello guys i am new in python and programming web, i am studing web2py , i pay for a hosting on webfaction anyone have a guide for install it on ? my other question is about i am a little confused i was read about nginx and his amazing perforamance what i should use nginx or apache? are

Re: [web2py] Happy new year

2012-01-01 Thread Ivan Vilches Basaul
Happy new yearrr ! Iván Vilches Basaul El 01-01-2012, a las 4:26, Massimo Di Pierro massimo.dipie...@gmail.com escribió: Happy new year everybody!

Re: [web2py] Powertable remarks

2010-12-20 Thread Ivan Matveev
Thank you Bruno for this beautiful SQLTABLES drop in replacement. Joined Rows, virtual fields on Rows work! You saved my week. Looks great and I love client side sorting and searching. On small(hundreds of rows) its faster than server side.

Re: [web2py] grid

2010-12-11 Thread Ivan Matveev
Wold love to test it with joins.

Re: [web2py] administrator controller

2010-12-11 Thread Ivan Matveev
I saw one previously on this list but can't seem to find it right now. Was it plugin by Selecta? http://groups.google.com/group/web2py/browse_thread/thread/52014e4b0adf5888/013d69bb1fe9008c?lnk=gstq=tools+to+manage+users+%2F+groups+%2F+permissions#013d69bb1fe9008c

Re: [web2py] SQLTABLE with joined data, but without repeats?

2010-12-11 Thread Ivan Matveev
Is there an SQL query that gives the desired result?

Re: [web2py] Re: Changing links on SQLTABLE

2010-12-09 Thread Ivan Matveev
You can put anything in SQLTABLE by modifying Rows object with rows.setvirtualfields. See this post http://groups.google.com/group/web2py/browse_thread/thread/826a37f56c26d689

Re: [web2py] Errors when a table references itself (was Re: What does this mean?)

2010-12-09 Thread Ivan Matveev
Your code works on my 3 weeks old web2py and MySQL. I can insert/view the table with db admin.

Re: [web2py] Re: patch to make Rows.setvirtualfields work with SQLTABLE

2010-12-09 Thread Ivan Matveev
This is my working code: http://snipt.net/rochacbruno/virtual-fields-in-sqltabe Note the headers=None So need to patch the header definition to use the virtualfieldname, or better, How to define a label for a virtual field? I think you can try to add label property to your MyVirtualFields

Re: [web2py] problem with web2py and plugin_datatables

2010-12-03 Thread Ivan Matveev
Example of usage is like this: {{=plugin_datatable(db(db.shout.id0).select(),_class='datatable')}} I think plugin_datatable wants Rows object as a parameter, not a table created with SQLTABLE

Re: [web2py] Re: crud operations for joins?

2010-11-17 Thread Ivan Matveev
I have a 'central' table in my design called 'entity' which contains lots of data (including names, company, emails, phones, address, etc.) and I want many other tables to point to ONE entity instance, i.e. 'entity' as an _extension_ of records in many different tables. When you say 'joined

Re: [web2py] Re: crud operations for joins?

2010-11-17 Thread Ivan Matveev
In the example I provide (entity), specifically for web2py and relational databases, does it actually make sense to separate 'entity' to its own table and use 1:1 relationships from tables A/B/C, or is it recommended to just embed the 'entity' fields into tables A/B/C (without any

Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-15 Thread Ivan Matveev
The patch is in the text of this message: patch to make Rows.setvirtualfields work with SQLTABLE http://groups.google.com/group/web2py/browse_thread/thread/826a37f56c26d689/210036457d278cdc?lnk=gstq=patch+to+make+Rows.setvirtualfields+work+with+SQLTABLE#210036457d278cdc or e-mailing patched

Re: [web2py] Re: The primary key constraint on legacy tables

2010-11-15 Thread Ivan Matveev
Perhaps my statement is wrong. DAL works fine with keyed tables. When I started to make web2py interface to a legacy database I tried keyed tables because many tables in the db have composite primary keys. I kept bumping in documentation examples that describe how to do things with normal id

Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-15 Thread Ivan Matveev
Sorry for posting what I'v already posted, but it looks like my post on the patch to make SQLTABLE work with Rows object with added virtual fields was lost. I think the easiest solution to add a column to select result and view the result in SQLTABLE wold be something like: class ExtraFields:

[web2py] Re: Create TRs dinamically in a FORM

2010-11-15 Thread Ivan Matveev
Maybe WebGrid(http://web2pyslices.com/main/slices/take_slice/39) can help you? I didn't use it but it says that it lets you build a table that supports paging, sorting, editing and totals easily. Or you can put forms in a SQLTABLE column. How to add columns to SQLTABLE is being discussed in

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread Ivan Matveev
I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file.  To achieve that,  I need for example to: 1) Add columns to hold icons and links and extra stuff. 2) Customize the rows, e.g.  links which depend on content,  

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread Ivan Matveev
I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file.  To achieve that,  I need for example to: You can add any column to select result. The result can be passed to SQLTABLE. See:

Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread Ivan Matveev
 Will the patch be included in Web2py?  I hope Massimo likes it. So do I. Otherwise I will have to patch after every web2py update.

Re: [web2py] The primary key constraint on legacy tables

2010-11-13 Thread Ivan Matveev
2010/11/14 Rishu pareshverma...@gmail.com: Hi all, I have a project in which I am supposed to use mysql. The database already made up. I am facing an issue with the primary key check. Whensover i insert a duplicate value for the primary key i end up with a ticket rather than a graceful

[web2py] patch to make Rows.setvirtualfields work with SQLTABLE

2010-11-13 Thread Ivan Matveev
names) and you will not see it. WBR Ivan. ---Disclaimer : my understanding of web2py is not mature. For real thing ask Massimo. PS. ---Thank you Massimo. web2py is a great stuff. 1 month I'm learning python and web2py is the motivation. PPS. Can I use code or pre or other tags to post code

Re: [web2py] Re: A strange syntax error on updating a table row in a legacy db.

2010-10-14 Thread Ivan Matveev
Thank you Massimo, with KeyedTable I get the same errors. BUT if tables defined like this: db.define_table('cars',     Field('car_id','id'), #note 'id' type     Field('model_id','integer'),     migrate=False ) #note no primaykey everything works! I think it shell be int the docs in BIG

Re: [web2py] Re: 'DEMO_MODE' is not defined

2010-10-14 Thread Ivan Matveev
You can simply put DEMO_MODE=False in your db.py

Re: [web2py] Re: plugin legacy mysql: generates web2py code to access your mysql legacy db

2010-10-07 Thread Ivan Matveev
2010/10/7 DJ sebastianjaya...@gmail.com: The legacy database to Web2py conversion would be a great add-on. I get the following errors when I tried this script on a database with tables having primary key 'id' set to autoincrement. C:\Program Files (x86)\web2py\scriptsextract_mysql_models.py

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-06 Thread Ivan Matveev
Massimo, Denes, thank you for your answers. Before touching sql.py I have updated web2py to recent version(1.86.1) and found that now references in KeyedTable do work now if string notation is used like this: Field('model_id', 'reference car_models.model_id'), After this print(

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-03 Thread Ivan Matveev
Hi Denes, 2010/10/3 DenesL denes1...@yahoo.ca: Hi Ivan, mysql is not one of the supported DBs for keyed tables: only DB2, MSSQL, Ingres, and Informix have been added as per I looked at dal.py (web2py 1.83.2 2010-08-15). It has # list of drivers will be built on the fly # and lists only what

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-03 Thread Ivan Matveev
2010/10/3 mdipierro mdipie...@cs.depaul.edu: Since August we had many improvements in sql.py that were not reflected into dal.py. So shell I start hacking DAL or wait for improvements to be put in? web2py is still using sql.py and it will be a little while before we move to dal.py If I

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread Ivan Matveev
2010/10/2 Mariano Reingart reing...@gmail.com Did you try string notation for references? db.define_table('cars', Field('car_id','integer'), Field('model_id', reference car_models.model_id), Field('note','text'), primarykey=['car_id'], migrate=False ) Anyway, if you are

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread Ivan Matveev
2010/10/3 mdipierro mdipie...@cs.depaul.edu ... but SQLFORM and web2py crud will not work with sqlalchemy. one reasons we cannot do something like SQLAlchemy's reflect in web2py is that the database is not aware of how web2py should treat the field. For example a 'varchar' field could be a

[web2py] DAL, legacy keyed table, field references

2010-10-01 Thread Ivan Matveev
Hello All, I'm trying to make a web2py interface to a legacy db(mysql). The db is defined like this: CREATE TABLE `car_models` ( `model_id` int(10) unsigned NOT NULL auto_increment, `model_name` text NOT NULL, PRIMARY KEY (`model_id`) ) CREATE TABLE `cars` ( `car_id` int(10) unsigned

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-01 Thread Ivan Matveev
2010/10/1 mdipierro mdipie...@cs.depaul.edu keyed tables are only partially supported. Perhaps user Denes can say more about that. For now here is a quick hack that should work: Thank you for fast reply. db.define_table('cars', Field('car_id','integer'), Field('model_id',

[web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-03-01 Thread Ivan P
. As far as static file streaming, doescherokeeintercept web2py file serving? Is there a way to tellcherokeeto serve all requests to the static folder without even going through web2py? -Thadeus On Fri, Feb 5, 2010 at 4:45 AM, Ivan P ivanv...@gmail.com wrote: Sorry for the delayed

[web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-02-05 Thread Ivan P
, Adi aditya.sa...@gmail.com wrote: Hi Ivan, I followed this howto, and when I try to access the application I get an internal error thrown by web2py: Ticket issued: unknown Any idea how to read contents of this ticket to debug? On Jan 15, 3:14 am, Ivan P ivanv...@gmail.com wrote: Inspired

[web2py] Re: Cherokee problem

2010-01-21 Thread Ivan P
Johann, mdipierro is correct in saying that setting up web2py with cherokee, for example, is no different than setting up any other framework, there are not many options for framework-server integration. A couple of weeks ago I was also very frustrated with setting up a production server, but was

[web2py] Re: Cherokee problem

2010-01-21 Thread Ivan P
Although, I take my words back. My way is not the simplest. =) But it is not hard at all and is powerful. On Jan 20, 6:43 pm, Johann Spies johann.sp...@gmail.com wrote: As I am unable to get a solution to my problems serving web2py using apache alongside other sites I am trying out Cherokee -

[web2py] Re: duplicate column name error

2010-01-20 Thread Ivan P
20, 3:03 pm, Ivan P ivanv...@gmail.com wrote: I am encountering a strange error, and was wondering if anybody else has seen something like it. The code: auth.settings.table_user = db.define_table(     auth.settings.table_user_name,     Field('username', length=32, notnull=True, unique=True

[web2py] Auth default controller annoyance

2010-01-19 Thread Ivan P
This is fairly minor problem, but seems to go against the web2py philosophy as I see it. If after initializing the Auth object you would like to change the default controller, you must redefine a bunch of variables: self.settings.login_url, self.settings.logged_url, self.settings.download_url,

[web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-01-18 Thread Ivan P
completely on every request so there is no concurrency. I think we need a standard app for testing with various options: 1) db, no-db 2) 1,10,100 tables 3) view, no-view 4) compiled, not-compiler On Jan 17, 2:49 pm, Ivan P ivanv...@gmail.com wrote: Alex, Actually, this is my first

[web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-01-18 Thread Ivan P
that is. On Jan 18, 2:14 am, Ivan P ivanv...@gmail.com wrote: Hmmm, you are right. But, since I was loading the index page of the standard admin interface, that I have not compiled, I guess it is whatever the admin defaults are (does admin even use a db?). Right? On Jan 18, 12:15 am

[web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-01-18 Thread Ivan P
: This more like what I would expect. Is this bytecode compiled? It makes a difference. On Jan 18, 10:15 am, Ivan P ivanv...@gmail.com wrote: OK, I had some flaws in the last test that, I have realized, were affecting the performance. For example uwsgi was outputing a whole lot of data into gnome

  1   2   >