[web2py] transaction block

2010-10-14 Thread Manuele Pesenti
Hi *, I'm a new web2py user and I got this error for the second time: InternalError: current transaction is aborted, commands ignored until end of transaction block The problem is that this error still appear even after restoring the source code and restarting the web2py server the first ti

[web2py] multiselection widget with IS_LIST_OF validator

2010-10-18 Thread Manuele Pesenti
Hi *, I'm trying to use multiselection widget[1] with IS_LIST_OF validator in order to validate single choices but I got a strange error like this: SyntaxError: widget cannot determine options of no_table.from_tables here is the code I used in my controllers file where I want to define a form

[web2py] controler with external ref

2010-10-20 Thread Manuele Pesenti
Hi, I'm trying to set up a controler with a form that reproduce some fields of a db table I have in my models because I want to mix information that goes in db table with other fields I need. The problem is when I try to reproduce a field (the last one here under) that is an external reference

Re: [web2py] Re: Spatial Database Modeling

2010-11-03 Thread Manuele Pesenti
2010/11/2 mdipierro : > Most of that work was done on a very old web2py version. I never had > the time to merge with the most current version. I have the thesis and > I should go back study it. can I help you in some way? I'm interested in it... > > Massimo -- Manuele Pesenti

Re: [web2py] Re: Spatial Database Modeling

2010-11-03 Thread Manuele Pesenti
2010/11/2 mdipierro : > Most of that work was done on a very old web2py version. I never had > the time to merge with the most current version. I have the thesis and > I should go back study it. can I help you in some way? I'm interested in it... > > Massimo -- Manuele Pesenti

[web2py] cron quest

2010-12-27 Thread Manuele Pesenti
Hi *! I'm trying to set up a function in crontab, I'd like to run it daily or after run web2py so following the doc I write the crontab file as follows: #crontab @reboot * * * * root *cronfun/fetch_all_data @daily * * * * root *cronfun/fetch_all_data now running web2py it seams it h

Re: [web2py] Re: cron quest

2010-12-27 Thread Manuele Pesenti
Il 27/12/2010 17:58, mdipierro ha scritto: how do you start web2py? that was my doubt... I just run web2py from it's path where I downloaded it. Is it correct? thank you bye Manuele

Re: [web2py] Re: cron quest

2010-12-27 Thread Manuele Pesenti
Il 28/12/2010 08:18, mdipierro ha scritto: that is fine. Window, Mac, Linux? Which version? Which Python version? What command do you use python web2py.py ? I beg your pardon :) I'm using web2py Version 1.87.3 (2010-10-13 19:44:46) with Python 2.6.5 on Ubuntu 10.04.. and yes the commend I use

Re: [web2py] Re: unique constraint of multiple columns (at database level)

2010-12-29 Thread Manuele Pesenti
Il 28/12/2010 23:40, Luther Goh Lu Feng ha scritto: Is there a reason why you are not using Auth, if you aren't? http://www.web2py.com/book/default/chapter/08#Authentication Anyway, assuming that you truly want to add the unique constraint, then I am guessing that you could construct virtual fi

Re: [web2py] Re: unique constraint of multiple columns (at database level)

2011-01-05 Thread Manuele Pesenti
Trying quite the same solution I got a different error: Traceback (most recent call last): File "/home/manuele/Progetti/web2py/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/manuele/Progetti/web2py/applications/wrf_dbi/models/wrfdb.py"

Re: [web2py] Re: unique constraint of multiple columns (at database level)

2011-01-05 Thread Manuele Pesenti
I beg your pardon... it works! the problem was that I used 'unique' as the field name that is a not valid name :) so it coud be a solution to manage uniques bye M. Il 05/01/2011 12:04, Manuele Pesenti ha scritto: Trying quite the same solution I got a different error: [omissi

Re: [web2py] Re: unique constraint of multiple columns (at database level)

2011-01-11 Thread Manuele Pesenti
Il 11/01/2011 10:05, dederocks ha scritto: Manuele, May I ask you how you did it? First of all consider to define a function that returns a unique result starting from your fields in the uniques list. If theese fields are all integer (such as id of external references) you can simply append th

Re: [web2py] Model for graph hierarchy (many-to-many ralationship)

2012-08-24 Thread Manuele Pesenti
te(*a, **b) > File "/srv/www/cub3.net/public_html/web2py/gluon/dal.py", line 1386, in > log_execute > ret = self.cursor.execute(*a, **b) > File > "/srv/www/cub3.net/public_html/web2py/gluon/contrib/pymysql/cursors.py", line > 108, in execute > self.errorhandler(self, exc, value) > File > "/srv/www/cub3.net/public_html/web2py/gluon/contrib/pymysql/connections.py", > line 184, in defaulterrorhandler > raise errorclass, errorvalue > InternalError: (1005, u"Can't create table 'rincon.page_link' (errno: 150)") > > > I am not able to see what is going wrong... any clue? > > -- > > > > -- Manuele Pesenti amicogodzi...@jabber.linux.it https://sites.google.com/site/manuelepesenti/ --

Re: [web2py] web2py 2.0 stats

2012-08-29 Thread Manuele Pesenti
Il 29/08/2012 05:35, Massimo Di Pierro ha scritto: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with web2py 1.99.2 (minified js count as one line). We may release it tomorrow. fico!!! M. -- --

[web2py] Re: web editor problems with 2.0.2

2012-08-30 Thread Manuele Pesenti
Il 30/08/2012 10:00, Manuele Pesenti ha scritto: Hi! I've just downloaded the new 2.0.2 stable release but it seams there are some problems when I try to edit files from the web text editor integrated. Anybody noticed similar problems? uhm... ok the problems seams limited to chromiu

[web2py] DAL backward compatibility problem?

2012-08-30 Thread Manuele Pesenti
hi! trying to migrate my application from web2py 1.99.7 to new stable release 2.0.2 I obtain this error: Traceback (most recent call last): File "/home/manuele/Dropbox/sviluppo/web2py-2.0.2/gluon/restricted.py", line 209, in restricted exec ccode in environment File "/home/manuele/D

Re: [web2py] Re: web editor problems with 2.0.2

2012-08-30 Thread Manuele Pesenti
Il 30/08/2012 14:18, Massimo Di Pierro ha scritto: What os and what version? Debian GNU/Linux 3.2.0-2-486 Cromium version 13.0.782.107 (Developer Build 94237 Linux) Built on Debian unstable, running on Debian wheezy/sid on the same pc works fine with firefox (14.0.1) hope to be of any help

[web2py] Re: DAL backward compatibility problem?

2012-08-30 Thread Manuele Pesenti
Il 30/08/2012 12:09, Manuele Pesenti ha scritto: and these are the two incriminated code lines: 51 f_max = db.plugin_lookout_connections.id.max() 52 id_max = db().select(f_max).first()[f_max] or 0 the problem is by-passed using the following one instead of the line 52 id_max = db

[web2py] w2p 2.0.2 problems with existing field with upper case name

2012-08-30 Thread Manuele Pesenti
another problem jumped out using new 2.0.2 release having tables with camel case field names. This is the traceback Traceback (most recent call last): File "/home/manuele/Dropbox/sviluppo/web2py-2.0.2/gluon/restricted.py", line 209, in restricted exec ccode in environment File "/home

[web2py] Re: w2p 2.0.2 problems with existing field with upper case name

2012-08-30 Thread Manuele Pesenti
Il 30/08/2012 15:22, Manuele Pesenti ha scritto: another problem jumped out using new 2.0.2 release having tables with camel case field names. This is the traceback Traceback (most recent call last): File "/home/manuele/Dropbox/sviluppo/web2py-2.0.2/gluon/restricted.py", li

Re: [web2py] Re: web editor problems with 2.0.2

2012-08-30 Thread Manuele Pesenti
Il 30/08/2012 15:24, Massimo Di Pierro ha scritto: Can you try replacing applications/admin/static/ace with the latest version from ace github? If it works, would you send me a patch? well in this way it's even worse... I have the same problem with firefox (and again with chromium) M. --

Re: [web2py] How to get geo location?

2012-09-26 Thread Manuele Pesenti
Il 26/09/2012 04:38, weheh ha scritto: I want to play around with geo location stuff. Is there a simple way to get the location of the user's browser when they access a controller/action within web2py? I'm not trying to convert an address to a geo location. I'm looking for lat/long info from th

Re: [web2py] How do you I use geo-spatial types in Web2py DAL?

2012-09-27 Thread Manuele Pesenti
Il 27/09/2012 05:02, Calvin ha scritto: Hi I am a big fan of Web2py and would like to use the DAL for capturing location specific information. I use MySQL as a back-end and would like to understand how I could define a table with MySQL's Spatial Extension data types into the DAL and hopefully

Re: [web2py] new feature in trunk: generic.map

2012-04-06 Thread Manuele Pesenti
+1 I think I'll propose generic_openlayers.map :-) Manuele Il 06/04/2012 01:54, Massimo Di Pierro ha scritto: Example: # model db.define_table('point', Field('name'), Field('latitude','double'), Field('longitude','double')) #controller def map(): retur

[web2py] IS_IN_DB with join

2012-04-06 Thread Manuele Pesenti
what are the possible record representation for the IS_IN_DB validator in this case? join = (db.auth_membership.group_id==db.auth_group.id)\ &(db.auth_membership.user_id==db.auth_user.id) requires=IS_IN_DB(db(join), 'auth_group.id') the string '%(auth_user.first_name)s' is not accepted as I ex

[web2py] nice to introduce new button in grid

2012-04-06 Thread Manuele Pesenti
can you suggest a nice looking solution for easly introduce new buttons in grid and smartgrid when I'm in edit mode? This are an example of a button to introduce: my_extra_element_1 = FORM(INPUT(_type="submit", _value=T('Share data')), _action=URL('share_data_with_users', args=table_id)) I wo

Re: [web2py] new feature in trunk: full auditing

2012-04-09 Thread Manuele Pesenti
Il 06/04/2012 01:11, Massimo Di Pierro ha scritto: Now you can. ;-) auth.enable_record_versioning(db, archive_db=other_db) Do you think could be usefull to choose the tables you want for versioning instead of every table in db? M.

Re: [web2py] wb2py with existing database

2012-04-11 Thread Manuele Pesenti
Hoping to get some interest... http://www.web2pyslices.com/slice/show/1491/plugin-lookout https://github.com/manuelep/plugin_lookout some new feature added such as possibility to limit data access to some user groups and to import data from xls file. I hope to receive some comment about othe

Re: [web2py] lambda v: v.strftime('%d/%m/%Y')

2012-04-16 Thread Manuele Pesenti
Il 16/04/2012 10:25, Annet ha scritto: In db.py I defined a table: db.define_table('Node', Field('createdOn',type='datetime',writable=False,readable=False), migrate=False) db.Node.createdOn.default=request.now db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d 
%H:%M:%S'))) Now, wh

[web2py] compute formula with query

2012-04-23 Thread Manuele Pesenti
This field definition seams to be a problem for postgres but not for sqlite. Can somebody tell me why? Field('connection_name', required=True, compute=lambda row: db.plugin_lookout_connections[row['connection_id']].alias) This is the error I get using postgres: Traceback (most recent call la

Re: [web2py] compute formula with query

2012-04-23 Thread Manuele Pesenti
Il 23/04/2012 16:01, Richard Vézina ha scritto: Is "row['connection_id']" an id field? off course... this is the complete model for the table: db.define_table('plugin_lookout_tables', Field('table_name', label=T('Table name'), required=True, ondelete='CASCADE' ), Field('tab

Re: [web2py] combine Autocomplete widget and SELECT_OR_ADD_OPTION widget

2012-04-26 Thread Manuele Pesenti
Il 26/04/2012 02:12, Brian M ha scritto: Cool Richard! I haven't done much with that widget since initially creating it. I thought that there was someone who was creating an improved version a few months ago but can't for the life of me find it anywhere. :( Feel free to send me a patch and I

Re: [web2py] tutorial

2012-05-15 Thread Manuele Pesenti
Il 15/05/2012 14:56, Gerald Klein ha scritto: *def index():* *session.counter = (session.counter or 0) + 1* *return dict(message="hello", session.counter)* the right code for building a dictionary is the one suggested by Richard, in

Re: [web2py] time event

2012-05-21 Thread Manuele Pesenti
Il 21/05/2012 14:14, Hassan Alnatour ha scritto: Dear ALL, How can let my web2py application send an email every day at 12 pm ?? try read this... http://web2py.com/books/default/chapter/29/4?search=scheduler cheers M. Best regards,

Re: [web2py] time event

2012-05-21 Thread Manuele Pesenti
Il 21/05/2012 14:23, hasan alnator ha scritto: But this is experimental !! i need somthing done before what about http://web2py.com/books/default/chapter/29/4?search=cron#Cron ? M.

[web2py] custom SuggestLatLonWidget

2012-05-23 Thread Manuele Pesenti
I don't know if it could be difficult to implement it... I know that I need more js and jQuery knowledge to do it myself... I'd like to write a custom text widget that when I introduce a blank space after a word (supposed to be a name of a city, country, etc.) it uses the geocode function to su

Re: [web2py] json2excel

2012-05-23 Thread Manuele Pesenti
Il 22/05/2012 22:49, Richard Vézina ha scritto: Hello, Export to excel from json could make simpler the exportation of a excel file from web2py ?? well for manageing excell file I found that this library can help a lot... openpyxl.reader.excel if you are interested let's look for it in pypi

Re: [web2py] Reading documentation... question about example

2012-06-12 Thread Manuele Pesenti
Il 12/06/2012 08:45, xor ha scritto: http://web2py.com/books/default/chapter/29/3#Let%27s-count On this link there is an example that tests the existence of a variable by just doing this: if not session.counter: I don't understand this. In python to test the existence of a variable I need to c

[web2py] europython in Florence

2012-06-14 Thread Manuele Pesenti
https://ep2012.europython.eu/p3/ep2012/whos-coming is anybody planning to come? Manuele

Re: [web2py] Python 3 is catching up to us...

2012-06-20 Thread Manuele Pesenti
Il 21/06/2012 07:30, Jason (spot) Brower ha scritto: Not a big deal still at this point but wanted to point out: http://www.noobslab.com/2012/06/ubuntu-1210-quantal-quetzal-alpha-1-is.html Python 2 will not be in Ubuntu by default anymore. BR, Jason well I agree but you're in the same situation i

[web2py] external link in menu with target option

2012-06-25 Thread Manuele Pesenti
What if I want to put a voice in the menu that link a page external to my application that I want to open in a new tab? thanks in advance Manuele --

[web2py] URL vs http_referer

2012-06-28 Thread Manuele Pesenti
how could it be that this controller returns two different values for url1 and url2 if I visit the page through https? Is it correct? I was lookig a way to distinguish in my app the protocoll used for browsing. def test(): url1 = URL(host=True, scheme=True) # -> http://... url2 = reques

[web2py] scheduler test

2013-03-01 Thread Manuele Pesenti
Hi! It seams not every times I'm able to setup properly the scheduler to run a simple function every (for example) 10 seconds. This is how I run the framework: $ ./web2py -a secretpass -k appname This is the task I have inserted (here exported in csv format) scheduler_task.id,scheduler_task.

[web2py] Re: scheduler test

2013-03-01 Thread Manuele Pesenti
Il 01/03/13 15:14, Manuele Pesenti ha scritto: Hi! It seams not every times I'm able to setup properly the scheduler to run a simple function every (for example) 10 seconds. This is how I run the framework: $ ./web2py -a secretpass -k appname ok, the trick was to use the right opt

Re: [web2py] Re: web2py is moving

2013-03-02 Thread Manuele Pesenti
Il 02/03/13 03:32, Massimo Di Pierro ha scritto: It is back online. Sorry for the disruption but yesterday we moved to PythonAnywhere and routes broke. it looks off line again now... invalid request M. -- --- You received this message because you are subscribed to the Google Groups

[web2py] anyserver and scheduler

2013-03-15 Thread Manuele Pesenti
Hi, how can I run web2py using the anyserver script running even the the scheduler? Is it possible? thank you very mutch Cheers Manuele -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receivin

Re: [web2py] Re: anyserver and scheduler

2013-03-16 Thread Manuele Pesenti
Il 15/03/13 20:22, Niphlod ha scritto: > no. the scheduler is supposed to run OUTSIDE the "watch" of a > webserver, of any kind. ok, many thanks Niphlod Cheers M. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this gr

Re: [web2py] How do you I use geo-spatial types in Web2py DAL?

2012-10-02 Thread Manuele Pesenti
Il 02/10/2012 04:48, Massimo Di Pierro ha scritto: I believe the spatial DAL only supports postgresql/postGIS and sqlite/spatialite. It does not support mysql. well... I forgot to specify that I have tested with postgis... you can look inside the dal.py file wich are the db drive that support

[web2py] virtual field sum

2012-10-08 Thread Manuele Pesenti
Could it be possible to query for the sum of a (new style) virtual field directly? Thankyou very mutch Manuele --

Re: [web2py] Re: virtual field sum

2012-10-08 Thread Manuele Pesenti
Il 08/10/2012 16:18, Massimo Di Pierro ha scritto: No. Virtual fields are only created after the data is retrieved. You can create a calculated hidden field instead of a virtual field and use that. thanks a lot! M. --

[web2py] IS_IN_DB vs IS_IN_SET

2012-10-15 Thread Manuele Pesenti
Dear all, I have a form builded using the SQLFORM.factory method with just one field. This is the code: #mset = db(source_table).select(source_table.municipio, orderby=source_table.municipio, distinct=True) field = Field('municipio', requires=IS_EMPTY_OR(IS_IN_DB(db, '%s.municipio' %

Re: [web2py] Another DAL question

2012-10-15 Thread Manuele Pesenti
Il 15/10/2012 11:19, lyn2py ha scritto: The field (*db.bins.tags_id*) has contents of a list:reference type, i.e. *|1|2|6|8|* I need to get it into a list (i.e. *[1,2,6,8]*) to be used in a DAL .select(). How should I do this? My code: | rows = db(db.bins.id>1).select( left=db.notes.

Re: [web2py] Another DAL question

2012-10-15 Thread Manuele Pesenti
Il 15/10/2012 16:40, lyn2py ha scritto: > My code: > | > rows = db(db.bins.id >1).select( > left=db.notes.on( > (db.notes.tags_id.contains((*db.bins.tags_id*).split('|')) ) > ) > | > what about: | rows = db(db.bins.id>1).select( left=db.notes.on( (db.bins

Re: [web2py] Re: IS_IN_DB vs IS_IN_SET

2012-10-15 Thread Manuele Pesenti
Il 15/10/2012 16:07, Alan Etkin ha scritto: If possible, I would separate the roman numbers and the town name in the model: db.define_table('town', Field('name', default='Portella Della Ginestra'), Field('roman', ...)) That would solve the line break problem and you could just refer to the

[web2py] problems rendering a tab using SQLFORM.grid

2012-10-29 Thread Manuele Pesenti
Hi! I'm trying to render this following query with a grid: tab = orderby = [tab[f] for f in ('municipio', 'quartiere', )] + [~tab['den_tot']] fields = [tab[f] for f in ('municipio', 'quartiere', 'desvia', 'den_tot', 'den_predatori', 'den_dann', 'den_confl', )] query = db(db.vista).select(

[web2py] password verification

2012-11-19 Thread Manuele Pesenti
Hi! I'd like to ask how a password is verified? I've noticed that cloning my project in a parallel one with a different name that use the same db connection (to postgres) the same user cannot be recognized from the new application. What's the right way to do this operation? Thanks a lot

Re: [web2py] web2pyslices has a redirect loop

2012-11-22 Thread Manuele Pesenti
Il 22/11/12 10:42, Johann Spies ha scritto: I cannot open http://www.web2pyslices.com. I have tried in Firefox, Opera and Chrome and get the following error: This webpage has a redirect loop I confirm Cheers M. Regards Johann -- Because experiencing your loyal love is better than l

[web2py] dashboard using bootstrap

2012-11-29 Thread Manuele Pesenti
Hi! I would like to build some dashboard pages using bootstrap scaffolding utilities. The dashboard has to contain graph (I use highcharts) and tables... Is there something more I need for bootstrap except what I find in web2py static js libs? Thankyou very mutch Manuele --

Re: [web2py] Re: How to use the "insert" method of python list in web2py

2012-11-29 Thread Manuele Pesenti
Il 29/11/12 10:49, Joe Barnhart ha scritto: Hmmm... That would give "3" since Python 2.x keeps the calculation as integer (it won't coerce it to a float). He could do a=int(a)/100.0 But that puts it into a floating point value, and rounding sometimes gives surprising and unexpected results

Re: [web2py] dashboard using bootstrap

2012-11-29 Thread Manuele Pesenti
Il 29/11/12 17:24, Richard Vézina ha scritto: http://www.highcharts.com/ Is pretty nice! Do you know something similar that is open source? Richard At the moment I haven't found nothing enough good... I'll be glad if someone can notify me :) M. --

[web2py] Re: dashboard using bootstrap

2012-12-03 Thread Manuele Pesenti
Il 29/11/12 10:58, Manuele Pesenti ha scritto: Is there something more I need for bootstrap except what I find in web2py static js libs? Thankyou very mutch Manuele ok... now what about the real question? thankyou M. --

Re: [web2py] Re: dashboard using bootstrap

2012-12-04 Thread Manuele Pesenti
Il 03/12/12 16:37, Richard Vézina ha scritto: I am not sure I understand your question. web2py bootstrap.js contain all the boostrap.js into one file. So you don't need to import anything else from bootstrap to create any bootstrap "effect" (just make sure you don't try to use something avail

Re: [web2py] Re: dashboard using bootstrap

2012-12-06 Thread Manuele Pesenti
thank you very mutch Paolo, that's what I needed... I was just confused by the behaviour of a theme based on an old version of web2py It works perfectly :) M. Il 04/12/12 15:10, Paolo Caruccio ha scritto: For flot: put in yourapp/static/js jquery.flot.js and jquery.flot.resize.js (f

[web2py] count distinct

2012-12-13 Thread Manuele Pesenti
Hi! trying this simple query I got this error: ipdb> db(query)._count(distinct=fields) "SELECT count(DISTINCT vista.municipio, vista.quartiere, vista.desvia, vista.den_tot, vista.den_predatori, vista.den_confl, vista.den_dann) FROM vista WHERE ((vista.id > 0) AND (vista.quartiere = '22: S. Mart

Re: [web2py] Re: count distinct

2012-12-17 Thread Manuele Pesenti
Il 14/12/12 02:49, Andrew W ha scritto: Does your dbms support count(distinct ) ? What happens if you only put one column in COUNT(DISTINCT vista.municipio) ? thank you Andrew and Niphold, using just one field for the distinct option works fine... I just thought a little bit better what I

[web2py] json service

2012-12-20 Thread Manuele Pesenti
trying to expose this simple controller I got the subsequent error... does anybody understand why? the query runs perfectly inserted manually in a ipdb console... @service.json def mRender(): #import ipdb; ipdb.set_trace() query = (db.plugin_lookout_fields.table_id==source_table_id)

Re: [web2py] Re: json service

2012-12-21 Thread Manuele Pesenti
Il 20/12/12 20:11, Massimo Di Pierro ha scritto: yes. You are not supposed to return an iterable (in your case a list). web2py thinks you want to do streaming and will start looping over the iterable. This should change in web3py not we cannot change it in web2py. Massimo Thanks Massimo, so

Re: [web2py] Strikethrough with MARKMIN

2011-12-28 Thread Manuele Pesenti
Il 28/12/2011 07:08, lyn2py ha scritto: How do I strikethrough some text using MARKMIN? It's not available in the book, but I noticed that MARKMIN has a strikethrough attribute. use the source... young Skywalker! :) M. Thanks!

Re: [web2py] Happy new year

2012-01-01 Thread Manuele Pesenti
Un felice anno a tutti! :) Manuele Il 01/01/2012 08:26, Massimo Di Pierro ha scritto: Happy new year everybody!

[web2py] postgres schema

2012-01-03 Thread Manuele Pesenti
Hi *, is it possible even to work with postgres schemas different than public? I guess schema are a specific peculiarity of postgres. thanks Manuele

Re: [web2py] postgres schema

2012-01-03 Thread Manuele Pesenti
Il 03/01/2012 12:54, Johann Spies ha scritto: I could so far not get that to work. I don't think DAL's design makes provision for that. You should be able to do it outside DAL - using executesql. Regards Johann till I don't work with tables with the same name in different schema I found

Re: [web2py] For trick

2012-01-16 Thread Manuele Pesenti
Il 16/01/2012 14:02, Web2Py Freak ha scritto: Dear all , i am geting some images from the database and viewing them in the page i am using a for loop for the images and i want to have a after every 4 images ,, how can i do somthing like this ?? consider to use enumerate and test if the define

[web2py] addtoany problem

2012-01-25 Thread Manuele Pesenti
hi! It seams that if the site www.addtoany.com is unreachable like today web2py stops to load their interface at the menu level. It's enough to disable my network to turn my local app to work fine again. I think it could be a problem when you have a public application (I guess) with a default

Re: [web2py] addtoany problem

2012-01-26 Thread Manuele Pesenti
Il 25/01/2012 10:33, Bruno Rocha ha scritto: You can try the LazyLoader http://www.itthinx.com/plugins/lazy-widget-loader/ maybe it could be adopted directly from web2py? M.

[web2py] table service component help

2012-01-30 Thread Manuele Pesenti
Hi! I would like to realize a little component for my web2py app to load some data I got in arrays (lists or dictionaries) in tables , in this way, always coherent throug the site. I thought to use the jQuery dataTable class but a little after I thought that it would be nice to use the same st

Re: [web2py] Re: table service component help

2012-01-30 Thread Manuele Pesenti
Il 30/01/2012 13:50, Alan Etkin ha scritto: The .grid data input is a query. I think that the css style is defined inside the SQLFORM class grid() method http://web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html#SQLFORM.grid You could create the table in the way you posted and add

[web2py] validator for valid SQL table name

2012-02-03 Thread Manuele Pesenti
Hi! Can you suggest me how can I write a validator for sql table names? I mean... I have a plugin that let me define tables and fields through the web interface saving their name and parameters in the db itself. So I have a "meta" table for the tables I want to define. I'm looking for a good v

Re: [web2py] validator for valid SQL table name

2012-02-03 Thread Manuele Pesenti
Il 03/02/2012 11:03, Bruno Rocha ha scritto: look the code in dal.py referencing check_reserved, you can copy patterns and dicts from there in to your validator. Hi Bruno, thanks for the replay... I've already tryed to look inside dal.py but it was not so clear how to translate it's behaviour

[web2py] bug ticket for IS_IN_DB validator

2012-02-04 Thread Manuele Pesenti
I opened this ticket http://code.google.com/p/web2py/issues/detail?id=647&q=is_in_db does anobody else found similar problems in using IS_IN_DB validator with option multiple=True that is the default for 'list:reference' type fields? cheers Manuele

Re: [web2py] Re: bug ticket for IS_IN_DB validator

2012-02-05 Thread Manuele Pesenti
Il 05/02/2012 03:16, DenesL ha scritto: In the issue report you say: What steps will reproduce the problem? 1. create a table (for example: db.define.table('mytab', Field('foo'))) ... IS_IN_DB(db, 'mytab.id', '%(foo)s', multiple=True)(value) but IS_IN_DB(..., multiple=True) should be u

Re: [web2py] validator for valid SQL table name

2012-02-05 Thread Manuele Pesenti
Il 03/02/2012 11:03, Bruno Rocha ha scritto: look the code in dal.py referencing check_reserved, you can copy patterns and dicts from there in to your validator. http://zerp.ly/rochacbruno ok thanks again Bruno, I solved defining this subsequent custom validator with some cut&paste code fr

Re: [web2py] Re: geo-capabilities for DAL

2012-02-05 Thread Manuele Pesenti
Il 04/02/2012 16:30, Massimo Di Pierro ha scritto: We are working on this and you should expect it as one of the next web2pu features. veeery good news :) thanks! M.

Re: [web2py] validator for valid SQL table name

2012-02-05 Thread Manuele Pesenti
Il 05/02/2012 15:58, Manuele Pesenti ha scritto: ok thanks again Bruno, I solved defining this subsequent custom validator with some cut&paste code from dal.py as suggested: I beg your pardon too many bugs in my previous code and not enough test... that's a better solution: i

[web2py] grid and smartgrid issue

2012-02-07 Thread Manuele Pesenti
Hi, I've just reported another issue... and I want to ask to the list if you agree with it. http://code.google.com/p/web2py/issues/detail?id=651 essentially I found that the two options for deletion has a different behavior. It seams that the function passed to ondelete is never performed an

Re: [web2py] query on a JOIN

2012-02-09 Thread Manuele Pesenti
Il 09/02/2012 12:33, shartha ha scritto: how can you write a query that only returns the dogs that Alex has? you can add your filter condition to the join condition usch as: rows = db((db.person.id==db.dog.owner)&(db.person.id==1)).select() If I understand the quest... M.

[web2py] Re: Issue 651: strange events behaviors for grid and smartgrid

2012-02-10 Thread Manuele Pesenti
I post here this discussion because I'm not yet subscribed to the developers list and this regards the documentation... Il 09/02/2012 18:55, Massimo Di Pierro ha scritto: this is a good point. The problem is how to fix it. sqlhtml does not take a ondelete (perhaps it should, and grid should pa

Re: [web2py] Re: Issue 651: strange events behaviors for grid and smartgrid

2012-02-11 Thread Manuele Pesenti
Il 10/02/2012 18:38, Massimo Di Pierro ha scritto: SQLFORM.grid has ondelete, SQLFORM(...).accept(...) does not. The book is correct. The problem is that grid uses ondelete when doing ajax delete but not when using SQLFORM(...).accept(...) my misunderstanding... sorry :) thanks Manuele

Re: [web2py] How to Change the date format

2012-02-12 Thread Manuele Pesenti
Il 13/02/2012 08:40, Sanjeet Kumar ha scritto: Hi to all, I want to change the date format during the insertion in database default is YYY-MM-DD but i want to insert in database by using the DD- MM- and Month should be in the 'jan' format . Please help me have a look here http://web2py.co

[web2py] javascript/openlayers example in web2py

2012-02-18 Thread Manuele Pesenti
ciao! I hope not to be too mutch out of topic... this time I have a question related to javascript and it's integration with web2py. Here under you'll find the only way I found to run this simple openlayers example http://openlayers.org/dev/examples/osm.html * controllers/plugin_map.py def

Re: [web2py] Re: javascript/openlayers example in web2py

2012-02-18 Thread Manuele Pesenti
Il 18/02/2012 20:32, Anthony ha scritto: If you're using jQuery, maybe you can just move the init() function contents into: $(function () { var map, layer; map = new OpenLayers.Map('map'); layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); map.addLayer(layer); map.setCente

Re: [web2py] Re: javascript/openlayers example in web2py

2012-02-18 Thread Manuele Pesenti
Il 18/02/2012 22:16, Manuele Pesenti ha scritto: hello Antony, thanks for your replay... I've just tryed your solution but without success... do I have to explicity call the function after the definition you suggest? jQuery lib is loaded in the page... cheers Manuele I beg your p

Re: [web2py] SQLFORM and scientific notation support.

2012-03-05 Thread Manuele Pesenti
Il 05/03/2012 11:18, Kimmo ha scritto: Hi, I have an update SQLFORM for db record which includes double type fields. I noticed that the form does not permit values for example "1e6". Letter "e" is automatically removed when it's typed in. Behaviour is understandable but is there a way to get sci

Re: [web2py] Re: SQLFORM and scientific notation support.

2012-03-07 Thread Manuele Pesenti
Il 07/03/2012 10:01, Kimmo ha scritto: I made a (ugly hack) custom widget for all the Fields that have double type. Now E notation and normal double values work perfectly (edit / save / viewing). How do i set this widget as a default widget for all the Fields that have double type in my model? I

[web2py] autocompleteWidget improvement

2012-03-14 Thread Manuele Pesenti
Hi, I have opened a ticket to propose an improvement of tha AutocompleteWidget http://code.google.com/p/web2py/issues/detail?id=716&thanks=716&ts=1331743652 What's the way to define it in my application without mod

Re: [web2py] Re: autocompleteWidget improvement

2012-03-14 Thread Manuele Pesenti
Il 14/03/2012 18:09, Alan Etkin ha scritto: You can create a widget function that creates the original widget and returns it modified: def mycustomwidget(): new_widget = SQLFORM.widgets.autocomplete(request, db.category.name, limitby=(0,10), min_length=2) ... # modify the helper r

Re: [web2py] Re: autocompleteWidget improvement

2012-03-15 Thread Manuele Pesenti
Il 14/03/2012 23:25, Alan Etkin ha scritto: I bet if you declared the widget custom class in the model, you wouldn have this request object issue. Is there any particular need to use a module instead of normal model code? I'll try to cut and paste the widget definition from the module to the mod

[web2py] very basic recipe for spatial data support

2012-03-20 Thread Manuele Pesenti
for who are interested I posted a very easy and short recipe for a very basic geometry support in web2py http://www.web2pyslices.com/slice/show/1487/a-gis-recipe hope to be of any help or inspiration bye Manuele

Re: [web2py] Re: very basic recipe for spatial data support

2012-03-20 Thread Manuele Pesenti
Il 20/03/2012 14:09, Massimo Di Pierro ha scritto: You may want to make it clear in the recipe that DAL has GEO support and your recipe does not use the new API. That is ok if you are not using postgresql or mssql. Oh! I missed somethig... where can I read about this new feature? M.

Re: [web2py] Re: very basic recipe for spatial data support

2012-03-20 Thread Manuele Pesenti
Il 20/03/2012 14:09, Massimo Di Pierro ha scritto: You may want to make it clear in the recipe that DAL has GEO support and your recipe does not use the new API. That is ok if you are not using postgresql or mssql. Thanks Massimo, I'll test it very soon :) in the meanwhile I've corrected my r

Re: [web2py] Spatial / GIS support in DAL

2012-03-20 Thread Manuele Pesenti
Hi DanesL, many compliments for the very interesting work... I would like to ask if is it possible to insert some spatial data in the exadecimal format? I think it could be more OO in the code to manage object like the one I can get from the ppygis library from whom it seams you cannot simply g

  1   2   3   4   5   6   >