[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] 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) - https://code.googl

[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 ema

[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) - https://code.google.com/p/web2py/issues/list

[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 r

[web2py] Re: AppConfig and % interpolation

2016-09-27 Thread Ivan
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

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

2014-07-30 Thread Ivan
also would like a non-null foreign key reference, but like OP >>> experienced web2py will not create one (I'm 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 ma

[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 constrain

[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: 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 recompile all the compiled

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

2010-02-05 Thread Ivan P
, Adi 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 wrote: > > &g

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

2010-03-01 Thread Ivan P
directory, and it owns everything. With Apache I have to chown/mod the > > > files so that www-data can read them. > > > > I need to use a user account instead of www-data since mercurial is > > > involved. > > > > As far as static file streaming, doescherok

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

2010-03-01 Thread Ivan P
Make that rule "^/app/static" On Mar 2, 1:29 am, Ivan P wrote: > Could you elaborate? You want those two rules to point to a static > folder? > If that is the case, you would probably add a new regex rule with > something like "^/app/static$", and add a "st

[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 NOT

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

2010-10-01 Thread Ivan Matveev
2010/10/1 mdipierro > 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', > 'integer',requires=IS_IN

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

2010-10-02 Thread Ivan Matveev
2010/10/2 Mariano Reingart > > 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 using s

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

2010-10-02 Thread Ivan Matveev
>2010/10/3 mdipierro > > ... 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 'string', a > 'pas

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

2010-10-03 Thread Ivan Matveev
Hi Denes, >2010/10/3 DenesL : > 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 wh

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

2010-10-03 Thread Ivan Matveev
>2010/10/3 mdipierro : > 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 start hacking how do I

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( getattr(db.car_

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 : > 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\scripts>extract_mysql_models.py > bio:b...@nrcf > Tra

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

2010-10-11 Thread Ivan Matveev
Hi All! Dealing with a legacy db. the model: db.define_table('cars', Field('car_id','integer',writable=False), Field('model_id','integer'), primarykey=['car_id'], migrate=False ) If I go to appadmin and try to update any row in the table i get : SyntaxError: user is tampering w

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 le

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

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

2010-01-14 Thread Ivan P
Inspired by Phyo Arkar's howto on setting up web2py with Cherokee and FCGI I tried the setup, but was somewhat unsatisfied with the fcgi method and decided to try uWSGI. I am happy I did so, since it proved to be real easy and uWSGI is a real powerhouse and deserves attention of the whole python we

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

2010-01-17 Thread Ivan P
mdipierro: It works. Running http://localhost/admin/default/site all the CSS, images and scripts are loaded fine. On Jan 17, 11:13 pm, mdipierro wrote: > Have you tried if web2py file streaming works with cherokee? > > On Jan 14, 4:14 pm, Ivan P wrote: > > > Inspired by Phy

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

2010-01-17 Thread Ivan P
e requests served within a certain time (ms) 50%197 66%222 75%240 80%254 90%296 95%328 98%368 99%402 100%499 (longest request) Sure, I'll make it a slice. On Jan 17, 11:01 pm, Alex Fanjul wrote: > Many thanks for your tutorial Ivan, &g

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

2010-01-18 Thread Ivan P
tely 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 wrote:

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

2010-01-18 Thread Ivan P
s. > > On Jan 18, 2:14 am, Ivan P 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? > > &g

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

2010-01-18 Thread Ivan P
I would expect. Is this bytecode compiled? It > makes a difference. > > On Jan 18, 10:15 am, Ivan P 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 in

[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, etc.

[web2py] Re: Newbie Question: Intellisense for Web2Py?

2010-01-20 Thread Ivan P
While completion is nice, I think that what seems like a steep learning curve is actually not that much. You mostly use a few of the framework functions and variables, unless you adding something new to your project, like authentication or maybe a new table. So I'd say that you don't need it. And i

[web2py] "duplicate column name" error

2010-01-20 Thread Ivan P
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, requires = [IS_LENGTH(minsize=3), IS_NOT

[web2py] Re: "duplicate column name" error

2010-01-20 Thread Ivan P
name. On Jan 20, 3:03 pm, Ivan P 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'

[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 a

[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 wrote: > As I am unable to get a solution to my problems serving web2py using > apache alongside other sites I am trying out Cherokee - so far with no > succe

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

2010-11-13 Thread Ivan Matveev
2010/11/14 Rishu : > 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 handling. > Here's the db

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

2010-11-13 Thread Ivan Matveev
erwise 'some_table' will be added as a sub dict to Row object (IMHO this is wrong, the Row object shell be 1d always, the 'as' info shell be in column 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 or or other tags to post code on the list?

[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: http://groups.google.com/group/web2py/b

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] 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=gst&q=patch+to+make+Rows.setvirtualfields+work+with+SQLTABLE#210036457d278cdc or e-mailing patched sql

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 tables

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

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 sa

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 referen

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.id>0).select(),_class='datatable')}} I think plugin_datatable wants Rows object as a parameter, not a table created with SQLTABLE

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 MyVirtualFiel

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=gst&q=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] 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.

[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 t

[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 functi

[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) db.Relat

[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 ) > > db.Relation.contact.widget=SQLFORM.widgetsre.autocomplete(request,db.Person,id_field= > d

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Ivan Gazzola
qlite if you > change a field 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

[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(): re

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

2013-02-23 Thread Ivan Gazzola
> if form.*process*().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 >>

[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]+''+tmp_label[2]

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

[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] 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 opti

[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 a

[web2py] Re: compute field insert/update

2013-04-25 Thread Ivan Šandrk
ly a time saver. > > web2py.com/books/default/chapter/29/06#before-and-after-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

[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] request.args and special character

2016-05-24 Thread Ivan Gazzola
7;ve tried to find the 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 rece

[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: " foreign key constraint failed " This is my model: db.define_table('Nominativi', Field('nome',notnull=True, represent=lambda nome:nome.title()), Field('categoria',db.Categorie_Nominativi,d

[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 UT

[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

[web2py] Re: autofocus html5 attribute support?

2013-12-14 Thread Ivan Gazzola
I use in view: form.element('#id_field')['_autofocus']='' and i get: 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 retrieve the > value with key

[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), Field('datecreated','datetime',default=now,readable=

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

2013-12-17 Thread Ivan Gazzola
file. > > Anthony > > 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')]), >>

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

[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 upda

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

2014-01-16 Thread Ivan Gazzola
ntista=1240) it woks. 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 UT

[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
e" to "upload" thx Ivan Il giorno giovedì 16 gennaio 2014 15:17:24 UTC+1, Anthony ha scritto: > > I cannot reproduce the problem. Can you pack ttach an app the exhibits the > problem? > -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[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

[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 (D

[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] Re: Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
February 18, 2016 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/ex

[web2py] Re: Flash message if before_insert fail

2016-02-19 Thread Ivan Gazzola
t; > Got it ... > > > >- If you are 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

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

2018-10-12 Thread Ivan Mikovski
tom applications 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) - htt

[web2py] ondelete attribute missing in 2.17.2

2018-11-04 Thread Ivan Gazzola
quires=IS_EMPTY_OR(IS_IN_DB(db, 'Preventivi.id'))),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

[web2py] Re: ondelete attribute missing in 2.17.2

2018-11-04 Thread Ivan Gazzola
_IN_DB(db, > 'Preventivi.id')),ondelete='SET NULL') > > > > 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 "Prest

[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://web2p

[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] Problem with sessions2trash.py

2015-02-05 Thread Ivan Gazzola
#!/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 2>&1 done http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[web2py] Re: Problem with sessions2trash.py

2015-02-05 Thread Ivan Gazzola
February 2015 17:17:56 UTC-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.

[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 q

[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:1

[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', 'app.domain.com

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

2015-05-13 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] 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? >

[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://web2p

[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 of

  1   2   >