[web2py] Odg.: Re: Odg.: Re: Odg.: Re: 1.95.1 - Field delete_this_record does not belong to the table

2011-05-09 Thread andrej burja
i'm sorry. my mistake here is the whole thing: in db.py + db.define_table('racun', Field('stevilka_racuna','integer',label='številka računa'), Field('datum_racuna','date',label='datum računa'), Field('datum_dobave','date',label='datum

[web2py] Re: using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread niknok
Anthony, sorry for the typo. I meant calling onvalidation=, and not onaccept That is the behavior I'm expecting, since I've seen that work like so before. Here's a stripped-down version of the function: def cnv(): c_hash=request.args(0) form=SQLFORM.factory( Field('card_number','s

[web2py] Re: drop down box content depends of another drop box

2011-05-09 Thread niknok
search "cascading select" or "cascading dropdowns" On May 10, 1:24 pm, pepe_eloy wrote: > Hello! > > How can I fill a drop box widget with content depends of another drop > box? I'll explain better: I have 3 tables: > > db.define_table('categoria', >                 SQLField('nombre', notnull=Tru

[web2py] Re: How to get the current domain in routes.py?

2011-05-09 Thread Dan
Hi Massimo, thanks a lot for your quick reply. I need the domain/hostname in the second part of routes_in. I can't hard code the domain name because of out build system. routes_in have to use the current domain or some kind of wildcard. Is there any way? Thanks again. On May 10, 3:57 am, Massim

[web2py] drop down box content depends of another drop box

2011-05-09 Thread pepe_eloy
Hello! How can I fill a drop box widget with content depends of another drop box? I'll explain better: I have 3 tables: db.define_table('categoria', SQLField('nombre', notnull=True), format='%(nombre)s') db.define_table('subcategoria', SQLField('ca

[web2py] Re: using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread Anthony
On Monday, May 9, 2011 10:59:46 PM UTC-4, pbreit wrote: > > Do filters work with SQLFORM.factory? I'm not sure CRYPT returns an > encrypted string so much as it causes the string to be encrypted when > SQLFORM puts it in the DB. I could be wrong. When I create a SQLFORM.factory with a require

[web2py] Re: using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread Anthony
On Monday, May 9, 2011 10:32:13 PM UTC-4, niknok wrote: > > I was trying to process it inside onvalidation= ... Note sure I understand. Can you show your full code (including where/how you are finding form.vars.card_number unencrypted)?

[web2py] Can't migrate on Postgres

2011-05-09 Thread pbreit
I can't seem to get any of my model changes to migrate to Postgres. I've tried various combinations of turning migrate and fake_migrate on and off. Deleting and re-adding Fields(). I'm not sure what else to try or where to look. I still have no idea what the .table or sql.log files do. Should I

[web2py] Re: using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread pbreit
Do filters work with SQLFORM.factory? I'm not sure CRYPT returns an encrypted string so much as it causes the string to be encrypted when SQLFORM puts it in the DB. I could be wrong.

[web2py] Re: update is not saved in the database??

2011-05-09 Thread niknok
Yes, guys thanks. I realized that that was the culprit this morning. Hard to decode with beer fogging your thoughts... :P Reverted to the original and all is working again. I forgot I was testing that line from a code in the book. On May 9, 11:01 pm, Anthony wrote: > On Monday, May 9, 2011 10:45

[web2py] Re: using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread niknok
I was trying to process it inside onvalidation= ... On May 9, 10:53 pm, Anthony wrote: > On Monday, May 9, 2011 10:37:02 AM UTC-4, niknok wrote: > > > I tried: > > >     form=SQLFORM.factory( > >         Field('card_number','string' > >                 ,label='Enter a card number to verify' > >  

[web2py] Re: plugins for plugin_wiki

2011-05-09 Thread Massimo Di Pierro
Please post them. I am interested in including them in plugin_wiki. On May 9, 4:59 pm, Pablo Angulo wrote: >   Hello! >   I have written two extra plugins for plugin-wiki, one for using Gallery: > > http://galleria.aino.se/ > > and another for using videojs (html5 video with flash fallback): > >

[web2py] Re: multiprocessing

2011-05-09 Thread Massimo Di Pierro
it can be done but what problem are you trying to solve? there are lots counterindications. For start you introduce a serious DoS vulnerability. queue your tasks in a database table and have a background process deal with them. On May 9, 3:58 pm, frasse wrote: > Hi > Do you guys know what is rea

[web2py] plugins for plugin_wiki

2011-05-09 Thread Pablo Angulo
Hello! I have written two extra plugins for plugin-wiki, one for using Gallery: http://galleria.aino.se/ and another for using videojs (html5 video with flash fallback): http://videojs.com/ Are you interested? Then how should I ship them: isolated or as a patch to plugin_wiki? They are ve

[web2py] Re: CODE, syntax higlighting and missing spaces

2011-05-09 Thread pang
On 9 mayo, 11:29, rixder wrote: > Solved... > I've added: > div.comment table tbody tr td pre { >     white-space: pre !important; > > } > I don't know if this is related, but I had the same problem using the code widget in plugin_wiki `` ... ``:code and solved it removing two lines from base.cs

[web2py] multiprocessing

2011-05-09 Thread frasse
Hi Do you guys know what is really happening if I use multiprocessing code in side controller. http://docs.python.org/library/multiprocessing.html I plan to install the application finally in web2py with wsgi - apache . What type of risk I am taking? It is really giving me a headache to try to un

[web2py] Re: can not update table that has multi-select widget

2011-05-09 Thread Massimo Di Pierro
Please post the relevant code so we can reproduce the problem. On May 9, 5:47 pm, mart wrote: > Hi > > seems, I can not update table that has multi-select widgetas one of > the fields unless that is specifically updated... . I'm using the > audit trail code and multi-select widget, both  from web

[web2py] Re: How to get the current domain in routes.py?

2011-05-09 Thread Massimo Di Pierro
It depends. You can do http://web2py.com/book/default/chapter/04?search=routes#Pattern-Based-System routes_in = ( ('140\.191\.\d+\.\d+:https://www.web2py.com:POST /(?P.*)\.php', '/test/default/index?vars=\g'), ) You can have regex in pattern for hostname On May 9, 3:45 pm, Dan wrote: > Hi, >

[web2py] Re: Problem with Select OPtion

2011-05-09 Thread Anthony
On Monday, May 9, 2011 6:22:12 PM UTC-4, luifran wrote: > > This work fine: > def combo(): > usuarios=db(db.auth_user.registration_key=='pending').select() > form = (SELECT([OPTION(usuarios[0].username, > _value=usuarios[0].id) for texto in > usuarios],_name='combo')) > retur

[web2py] Re: Problem with Select OPtion

2011-05-09 Thread pbreit
I usually see it like this: "form = FORM(SELECT..." http://web2py.com/book/default/chapter/07#FORM

[web2py] can not update table that has multi-select widget

2011-05-09 Thread mart
Hi seems, I can not update table that has multi-select widgetas one of the fields unless that is specifically updated... . I'm using the audit trail code and multi-select widget, both from web2pyslices. Anybody know of a work around? My only idea is to have a selectable "update/no_update" to tog

[web2py] Problem with Select OPtion

2011-05-09 Thread luifran
This work fine: def combo(): usuarios=db(db.auth_user.registration_key=='pending').select() form = (SELECT([OPTION(usuarios[0].username, _value=usuarios[0].id) for texto in usuarios],_name='combo')) return dict(form=form) This not work fine, does not appear the form: def combo():

[web2py] Re: Web2py and message queue's

2011-05-09 Thread mattgorecki
Instead of using a database table as an intermediary you should take a look at using an actual message queue. I'm personally using BeanstalkD with the BeanstalkC python module. When a new message is created, you could create a bit of JSON that contains the message and the list of recipients. The

[web2py] How to get the current domain in routes.py?

2011-05-09 Thread Dan
Hi, is there any way to get the current domain in routes.py? The request object is not defined in routes.py. The reason for this is that I want to build some links over https with routes_out. Since you have to give a full URL as the second parameter I need to prepend the domain. Thanks a lot for

[web2py] Re: new code editor?

2011-05-09 Thread Massimo Di Pierro
turns out codemirror is broken for me under chrome. The cursor gets stuck 100% of the times. On May 8, 6:21 pm, Massimo Di Pierro wrote: > If you send me a patch with search/replace/full-screen/save buttons + > {ctrl}+S, I will include codemirror. > You need trunk since stable codemirror has no p

[web2py] No CSS on linux server after upgrade to 1.95.1

2011-05-09 Thread raven
I have not used web2py for a while, so I am upgrading to the latest version 1.95.1 Everything seems OK on Windows. But there are formatting problems on my linux server. It looks to me like CSS is not working. For example, http://66.199.140.183:8000/examples shows plain text on a white backgroun

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Jonathan Lundell
On May 9, 2011, at 12:57 PM, Bruno Rocha wrote: > On Mon, May 9, 2011 at 3:46 PM, Martín Mulone wrote: > current.db = DAL(..) > > The db doesn't belongs to app? > > current.app.db = DAL(...) > Yes, I think that's better.

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Bruno Rocha
On Mon, May 9, 2011 at 3:46 PM, Martín Mulone wrote: > current.db = DAL(..) > The db doesn't belongs to app? current.app.db = DAL(...)

[web2py] Re: Wiki Plugin and meta-code with new DB

2011-05-09 Thread Oscar
It is the traceback info: Traceback (most recent call last): File "/Users/ra/Documents/Desarrollo/web2py/gluon/restricted.py", line 181, in restricted exec ccode in environment File "/Users/ra/Documents/Desarrollo/wiki/applications/init/views/ plugin_wiki/page.html", line 111, in File "

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Martín Mulone
I started to rewrite powerpack :S to make use of this. Just to clarify, this is ok?, this is something that I don't want to change again :P: current.app = Storage() current.app.settings = Storage() #settings of the current app current.db = DAL(..) current.app.auth = Auth(..) current.app.plugins =

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Jonathan Lundell
On May 9, 2011, at 9:50 AM, Massimo Di Pierro wrote: > > Assuming current.app ... > > why > current.plugins > instead of > current.app.plugins That would be better, I suppose. > > but yes to > > current.app.auth > > I think we need a policy before we decide on a case by case basis but > I h

[web2py] Re: Error-message from the GoogleAppEngineLauncher

2011-05-09 Thread Martin Weissenboeck
Solved: http://groups.google.com/group/google-appengine-python/browse_thread/thread/87d838f61490f003/b71581d3e142694e 2011/5/8 Martin Weissenboeck > Hi, > I want to try web2py together with the GAE. > > At first I have installed GoogleAppEngine-1.4.3.msi and I got the > following log-file (Googl

[web2py] Re: Odg.: Re: Odg.: Re: 1.95.1 - Field delete_this_record does not belong to the table

2011-05-09 Thread Massimo Di Pierro
I am puzzled. This does not seem to be consistent with your error: Traceback (most recent call last): File "...\gluon\restricted.py", line 181, in restricted exec ccode in environment File ".../controllers/izobrazevanje.py", line 98, in File "...\gluon\globals.py", line 133, in sel

[web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Massimo Di Pierro
Assuming current.app ... why current.plugins instead of current.app.plugins but yes to current.app.auth I think we need a policy before we decide on a case by case basis but I have not given much thought to the matter. On May 9, 9:07 am, Jonathan Lundell wrote: > On May 9, 2011, at 6:52 AM, M

[web2py] Wiki Plugin and meta-code with new DB

2011-05-09 Thread Oscar
Hi, I have an app at production environment wit migrate_enabled set to False, so I´m creating some new tables from meta-code page from the Wiki, it doesn't return any error when i save the code, so after add a create Widget for this new table I´m having errors. So, I having these errors because t

[web2py] Odg.: Re: Odg.: Re: 1.95.1 - Field delete_this_record does not belong to the table

2011-05-09 Thread andrej burja
vars: datum_dobave: 2011-04-03 datum_racuna: 2011-04-03 id: 1 opomba: placnik: 2 sklic: 1 sporocilo_kupcu: stevilka_racuna: 1 zapadlost: get_vars is empty

[web2py] Re: Recaptcha and registration

2011-05-09 Thread reyelts
That solved it. Thanks!

[web2py] Re: update is not saved in the database??

2011-05-09 Thread Anthony
On Monday, May 9, 2011 10:45:36 AM UTC-4, niknok wrote: > > I have these lines that is supposed to update a record but it doesn't: > > db.card.validated.writable=True > db.card.modified_by.writable=True > > db.card(db.card.alnum==c_hash).update(validated=True,modified_by=auth.user.id

[web2py] Re: using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread Anthony
On Monday, May 9, 2011 10:37:02 AM UTC-4, niknok wrote: > > I tried: > > form=SQLFORM.factory( > Field('card_number','string' > ,label='Enter a card number to verify' > ,requires=CRYPT(auth.settings.hmac_key)) > > But instead I found form.vars.card_numb

[web2py] Re: update is not saved in the database??

2011-05-09 Thread pbreit
I've never seen "db.card(db". Does that work? I usually see "db(db.card..."

[web2py] Re: represented fields and jqgrid

2011-05-09 Thread niknok
pbreit, config is a Storage() object and member_status a Dictionary, and the python get() function. Ross, you're right. That's how I'm using it. I went back to re-check my definition file and everything appears to be in order. Note that it's only in jqgrid that it's not showing up, it works corre

[web2py] update is not saved in the database??

2011-05-09 Thread niknok
I have these lines that is supposed to update a record but it doesn't: db.card.validated.writable=True db.card.modified_by.writable=True db.card(db.card.alnum==c_hash).update(validated=True,modified_by=auth.user.id) Is there anything I missed? I tried to include a manual db.commit()

[web2py] using CRYPT in SQLFORM.factory doesn't work?

2011-05-09 Thread niknok
I tried: form=SQLFORM.factory( Field('card_number','string' ,label='Enter a card number to verify' ,requires=CRYPT(auth.settings.hmac_key)) But instead I found form.vars.card_number unencrypted. This is on w2p v1.94.5. /r Nik

Re: [web2py] sessions2trash.py improved

2011-05-09 Thread Anthony
On Monday, May 9, 2011 10:15:33 AM UTC-4, rochacbruno wrote: > > You should send a copy of this directly to Massimo's email and include > 'patch' in subject.. It's already in trunk.

[web2py] Re: Webgrid options

2011-05-09 Thread luifran
I did, deleting 'add_links' to grid.enabled_rows On 29 abr, 11:11, luifran wrote: > I'm usingWebGrid, but sometimes I just want to use it to > show records, not to edit, delete,view,add ... > With this line: grid.action_links = [ ],I remove > edit, delete, and view but not add records. > Can I re

Re: [web2py] sessions2trash.py improved

2011-05-09 Thread Bruno Rocha
You should send a copy of this directly to Massimo's email and include 'patch' in subject.. On Fri, May 6, 2011 at 4:27 PM, Jim Karsten wrote: > Ross Peoples and I created a new version of sessions2trash.py. Features > include: > >- Deletes expired sessions files only based on sessions act

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Jonathan Lundell
On May 9, 2011, at 6:52 AM, Massimo Di Pierro wrote: > > I agree. But should be call it application? Fir of all the settings > are request level, not app level. And it may create confusion between > > current.application > current.request.application > > how about one of the following: > current

[web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Massimo Di Pierro
I agree. But should be call it application? Fir of all the settings are request level, not app level. And it may create confusion between current.application current.request.application how about one of the following: current.info current.settings current.parameters current.storage and we set it

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Jonathan Lundell
On May 9, 2011, at 6:24 AM, Massimo Di Pierro wrote: > >> Jonathan actually mentioned having a current.application Storage that would >> store things like auth and db that are created in models. I would REALLY >> like to see this. I still need to have my z_import_modules.py in order to to >> set t

[web2py] Re: the same table for many customer-companies

2011-05-09 Thread Anthony
On Monday, May 9, 2011 5:34:28 AM UTC-4, james c. wrote: > > accounts = my_customers_name + '_collections_' + str(auth.user_id) > db.define_table( accounts , > Field('name')) > #which created the expected accounts tables in the db folder. > > # This approach falls apar

[web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Massimo Di Pierro
On May 9, 7:41 am, Ross Peoples wrote: > Just wanted to give an update: > > I moved one of my projects with about 10 modules over to the new import > method, and so far it's working perfectly. I should also mention that the > new method has greatly simplified the way I write modules. I used to h

[web2py] Re: CODE, syntax higlighting and missing spaces

2011-05-09 Thread Massimo Di Pierro
In trunk, please check it. On May 9, 4:29 am, rixder wrote: > Solved... > I've added: > div.comment table tbody tr td pre { >     white-space: pre !important; > > } > > I think it should be in inline styles in CODE helper. > Best Regards. > > On 9 Maj, 10:35, rixder wrote: > > > > > > > > > I h

[web2py] Re: Autocomplete widget on same table

2011-05-09 Thread Massimo Di Pierro
The widget take as argument the table itself which is not yet defined. you have to do it in two steps: db.define_table('doccenter', Field('doc_nr', type='string', length=50, requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr'), ) db.doccenter.doc_nr.widget =SQ

[web2py] Re: Audit for all tables, independent of CRUD; and transaction rollback.

2011-05-09 Thread Ross Peoples
I don't know if there would be a good way to do this with any DAL/ORM. The best and most reliable way to handle this (and I hate to say it) might be using triggers in your database server. So that any change would trigger an audit action by the SQL server, which would write the change to an audi

[web2py] Re: strange problem connecting to the database - help!

2011-05-09 Thread canna
Thank you all for your help!! turn out the problem was in the psycopg2 module! when I tried: import psycopg2 dir(psycopg2) I got only 4-5 functions, and no 'connect' function! re-installed pstcopg2 and re-launched web2py and it worked like magic! now when I do dir(psycopg2) I get all the funct

[web2py] Re: strange problem connecting to the database - help!

2011-05-09 Thread Ross Peoples
You should also make sure your pg_hba.conf is set up to accept remote connections and that your user account can log in from remote connections. I once had a development PostgreSQL server that had its config reverted to factory settings one day for no apparent reason. I banged my head against t

Re: [web2py] Re: some new cool stuff in trunk under testing

2011-05-09 Thread Ross Peoples
Just wanted to give an update: I moved one of my projects with about 10 modules over to the new import method, and so far it's working perfectly. I should also mention that the new method has greatly simplified the way I write modules. I used to have a z_import_modules.py model that should run

[web2py] Re: Web2py and message queue's

2011-05-09 Thread villas
I once set something up with this kind of functionality. Simplified concept was: 1. Two tables, e.g.: Messages: subject, body MessQueue: to_id, from_id, message_id, dest, stat, sent_on note: dest is either an email address or mobile tel no. 2. A message is created and multiple recipients

[web2py] Re: strange problem connecting to the database - help!

2011-05-09 Thread villas
Long shot, and I know it's obvious (like the old help desk starting question - 'is it plugged in?'), but are you sure that the port is available?... with my DB connection probs I always start with telnet to the host/ port and make sure something connects. I often discover that the problem is wit

[web2py] Re: sessions2trash.py improved

2011-05-09 Thread Ross Peoples
Glad to see this made it into the trunk!

[web2py] Re: Problem with Mail.Attachment

2011-05-09 Thread Ross Peoples
Thanks Massimo!

Re: [web2py] strange problem connecting to the database - help!

2011-05-09 Thread Johann Spies
> please help!! any suggestion will be very appreciated! > > Have you checked whether the Postgresql-server accepts your connections? Test it with psql with the same database, user and password you have used in Web2py. Regards Johann -- May grace and peace be yours in abundance through the ful

[web2py] strange problem connecting to the database - help!

2011-05-09 Thread canna
hi everybody I need your help! I have a problem that is tormenting me and driving me to madness, my application suddenly stopped working, and gives me this error (changed names and passwords for security reasons): -

[web2py] the same table for many customer-companies

2011-05-09 Thread james c.
My web app will be used by different companies. Defining roles and permissions for the application works well for one company. With more companies there are problems. Defining application table in db.py seems to make the table available to all the companies. This demands permissions defined at rec

[web2py] Re: CODE, syntax higlighting and missing spaces

2011-05-09 Thread rixder
Solved... I've added: div.comment table tbody tr td pre { white-space: pre !important; } I think it should be in inline styles in CODE helper. Best Regards. On 9 Maj, 10:35, rixder wrote: > I have comments form with ckeditor and custom button "Paste python > code". > Pasted (or typed) code

Re: [web2py] PowerTable editable callback

2011-05-09 Thread Tiago Moutinho
Hi Bruno, Is there any possibility to edit only one column? cumps, Tiago

[web2py] CODE, syntax higlighting and missing spaces

2011-05-09 Thread rixder
I have comments form with ckeditor and custom button "Paste python code". Pasted (or typed) code is sending to server via Ajax POST and from server is returned html code: def code_py(): raw = request.vars['content'] return CODE(raw, language='python').xml() The returned html is inserted to

[web2py] Re: A requested feature...

2011-05-09 Thread Marcel Luethi
As far as I understand their "hub" is only a front-end to Amazon's EC2: "Deploy in seconds 45+ free server apps to Amazon EC2". And it's free as well. From their web site: - Your TurnKey Hub account is free - Pay Amazon directly for the cloud resources you use - No setup, cancellation or monthly f

[web2py] Autocomplete widget on same table

2011-05-09 Thread Johann Spies
I get a "KeyError: 'doccenter' " when I add an autocomplete widget in the following situation: db.define_table('doccenter', Field('doc_nr', type='string', length=50, requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr'), widget =SQLFORM.widgets.autocomplete(

[web2py] deployment problem on CentOS 5.5, Python 2.7, with Apache + mod_wsgi

2011-05-09 Thread ivytony
I follow this guide http://www.web2py.com/book/default/chapter/11, trying to set up web2py on my test VPS server, however, I got problem when trying to start it by running ./web2py.fedora.sh start in web2py/ scripts folder via SSH. Below is the error message: Starting Web2py Daemon (web2pyd): [roo