Re: [web2py] Re: New Dal causing a problem

2012-05-07 Thread Johann Spies
Thanks. Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-07 Thread Annet
Hi Anthony, After adding the missing ')' I still got the same error I had to remove the comments, # hidden field and # , to get rid of the error. {{=response.function}} {{=form.custom.begin}} {{#}} {{=form.element('table')}} {{#}} {{=DIV(form.custom.end[1])}} {{#}} {{=form.custom.end[0]}

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-07 Thread Annet
Hi Anthony, Indeed, eyes like an eagle. After adding the missing ')', I still got the same error. I had to remove both comments # hidden field and # to get rid of the errors. In the generic.html view I now have: {{=form.custom.begin}} {{#}} {{=form.element('table')}} {{#}} {{=DIV(form.cust

[web2py] Cannot repair database - all options tried

2012-05-07 Thread Yarin
It all started with an a single column deletion on a single table in my db.py: (1025, u"Error on rename of './db_myapp/#sql-198_246f' to './db_myapp/note' (errno: 150)") Since then I've spent *hours* trying to reconstitute the database files in any way possible. An earlier issue I had reported

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread Anthony
> > Regarding the pros and cons of this approach (in comparison to David's > database approach), I wonder what are the potential pitfalls/risks of the > cache approach. For examples, but not limited to, > > 1. Is there any consistency issue for the data stored in web2py cache? > Yes, this could

Re: [web2py] Re: My home made ide

2012-05-07 Thread Ricardo Pedroso
On Sun, May 6, 2012 at 9:50 PM, villas wrote: > Thanks for this and I was interested to try it. > > FYI  I got this error:  AttributeError: 'MainPanel' object has no attribute > 'terminal' > > Maybe it was the software I was using. Windows XP SP3, Python 2.7 and wx 2.8 Indeed, I only tested in Li

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread cyan
> In general, the approach David suggests ( > https://groups.google.com/d/msg/web2py/4cBbis_B1i0/KkKnNwUw8lcJ) is > probably preferable, but below are answers to your questions... > > user_data = cache.ram('user_data', lambda:dict(), time_expire=None) >> >> # add the data from this user, this sh

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread cyan
> Databases are specially designed for keeping persistent data - so there is > your answer! :) > > I suggest: > >1. Write the data initially to a transitional Sqlite DB on disk. >2. Once all the data pieces have arrived, migrate the completed data >to your main DB and delete all

Re: [web2py] global name 'reponse' is not defined

2012-05-07 Thread Bruno Rocha
you have a typo. it is response insted of reponse http://zerp.ly/rochacbruno Em 07/05/2012 20:55, "Tony Ha" escreveu: > Hello, > Please help! > I am following the book "http://web2py.com/books"; on chapter overview, > doing the mywiki app. after append the def news(): codes into the default > co

[web2py] Re: global name 'reponse' is not defined

2012-05-07 Thread Anthony
Looks like you mis-typed "reponse" instead of "response" somewhere (perhaps "response.download" in the download() function of that example). Anthony On Monday, May 7, 2012 3:48:29 PM UTC-4, Tony Ha wrote: > > Hello, > Please help! > I am following the book "http://web2py.com/books"; on chapter o

[web2py] Re: broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread Massimo Di Pierro
Just fixed. On Monday, 7 May 2012 17:30:01 UTC-5, pbreit wrote: > > *558f6f5c72b7 *has a small typo missing a colon. Also, does break need a > semi-colon? > > for key in mongofields_dict.keys(): > if key == 'id' > withId = True > break; > > http://code.google.com/p/web2py/source/browse/gluon/dal

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Massimo Di Pierro
Please try again. On Monday, 7 May 2012 15:48:04 UTC-5, Francisco Costa wrote: > > missing a colon at the end of the line 4677 > > if key == 'id' > > > and now I get this error > > File "/opt/web2py/gluon/dal.py", line 8134, in select > return adapter.select(self.query,fields,attributes) >

[web2py] Re: broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread pbreit
*558f6f5c72b7 *has a small typo missing a colon. Also, does break need a semi-colon? for key in mongofields_dict.keys(): if key == 'id' withId = True break; http://code.google.com/p/web2py/source/browse/gluon/dal.py#4677

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread Anthony
In general, the approach David suggests (https://groups.google.com/d/msg/web2py/4cBbis_B1i0/KkKnNwUw8lcJ) is probably preferable, but below are answers to your questions... user_data = cache.ram('user_data', lambda:dict(), time_expire=None) > > # add the data from this user, this should also upd

[web2py] Re: Can drop downs in a form depend on each other?

2012-05-07 Thread Omi Chiba
I made a similar app before and you can find my slice post here. I hope it helps. On Monday, May 7, 2012 6:09:45 AM UTC-5, Stefan L wrote: > > Not sure I got the heading understandable, but this is what I want to

Re: [web2py] Display text in SELECT list

2012-05-07 Thread Richard Vézina
Sorry for the lazy example, I have to go, I can try to write the proper code if you didn't solve it tomorrow, just ask. Richard On Mon, May 7, 2012 at 5:36 PM, Richard Vézina wrote: > Ok, now I understand... > > You should allways use id instead of name or other field. Anyway I think > you can f

Re: [web2py] Display text in SELECT list

2012-05-07 Thread Richard Vézina
Ok, now I understand... You should allways use id instead of name or other field. Anyway I think you can figure it out from this example : dog name person_id person name stat_about_dog_and_person stat1 stat2 dog_name person_name If I want to get dog_name or person_name in stat_about_dog_and_pe

Re: [web2py] Display text in SELECT list

2012-05-07 Thread Jim Steil
Sorry, not sure I follow. In my example, helpdeskTech is a subset of auth_user. My 'ticket' has a helpdeskTechId (in the assignedTo field), not an id from the auth_user table. I want my select tag to display the auth_user name, but return the helpdeskTechId from the helpdeskTech table. May

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread cyan
> If you just need to store data for a single user across requests, you can > store it in the session (each user has a separate session). But if you need > to store data from multiple users and then process it all together, you can > store it in the cache: http://web2py.com/books/default/chapt

Re: [web2py] Display text in SELECT list

2012-05-07 Thread Richard Vézina
auth_user_rows = db().select(db.auth_user.id) make a set : auth_user_set = ((db.auth_user.id == rows.first().id)|(db.auth_user.id == rows.last().id)) IS_IN_DB(auth_user_set,...) Richard On Mon, May 7, 2012 at 4:37 PM, Jim Steil wrote: > Hi > > I am having trouble getting my list to display

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
missing a colon at the end of the line 4677 if key == 'id' and now I get this error File "/opt/web2py/gluon/dal.py", line 8134, in select return adapter.select(self.query,fields,attributes) File "/opt/web2py/gluon/dal.py", line 4711, in select return processor(rows,columns,False)

Re: [web2py] Re: quick SQL question

2012-05-07 Thread Larry G. Wapnitsky
that's essentially what I did in code. On 5/2/2012 2:14 PM, Richard Vézina wrote: You could try also this : a = [ row.ipaddress for row in db().select(db.ips.ipaddress) if row.ipaddress.split('.')[3] == '35' ] db(db.ips.ipaddress.belongs(tuple(a))).select(db.ips.ipaddress).first().ipaddress

Re: [web2py] Re: quick SQL question

2012-05-07 Thread Larry G. Wapnitsky
Not familiar with raw SQL. Fairly new to MySQL over the past year On 5/2/2012 1:49 PM, Richard Vézina wrote: Maybe raw SQL?? Richard On Wed, May 2, 2012 at 10:54 AM, Larry Wapnitsky > wrote: Here's the actual query: http://pastie.textmate.org/3848916

[web2py] Display text in SELECT list

2012-05-07 Thread Jim Steil
Hi I am having trouble getting my list to display the way I want it to. Given the following definition: --- helpdeskTech = db.define_table('helpdeskTech', Field('helpdeskTechId', 'id', readable=False), Field('helpdeskId', db.helpdesk, required=True, label='Helpdesk')

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Massimo Di Pierro
Thanks for your help and check on this. I just committed a fix in trunk that should address it. Please let me know. On Monday, 7 May 2012 15:19:40 UTC-5, Francisco Costa wrote: > > I think that the mongofields_dict.keys() don't match to the data in the > rows > > mongofields_dict: > id > name >

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
I think that the mongofields_dict.keys() don't match to the data in the rows mongofields_dict: id name age city rows: Toronto 66L 24652490551171733682233802752L John On Monday, May 7, 2012 8:42:33 PM UTC+1, Massimo Di Pierro wrote: > > Your linennumbers do not much the code in trunk. Please try

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Massimo Di Pierro
Your linennumbers do not much the code in trunk. Please try the code in trunk. Anyway, something goes wrong in the parse(self, rows, fields, colnames, blob_decode=True) function. I suspect mongo does not return the columns in the order web2py think it does. Can you print the input of the parse

[web2py] MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
So I have this: import sys import time from gluon.dal import DAL, Field mongo = DAL('mongodb://localhost:27017/tymr') mongo.define_table('user', Field('name', 'text'), Field('age', 'integer'), Field('city', 'string') ) def insert_users(): m

[web2py] Re: Pyodel: a web2pyable e-learning tool

2012-05-07 Thread Alan Etkin
Sorry, no screenshots yet, I'll try to post them later. Project tables (just a few of them): -course (by some lecturer, start and end) -work (student task) -hourglass(timed exam) Works and hourglasses (performed timed exams) are qualified by a qualified authority (teacher or manager) Currently

[web2py] Re: broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread Carlos
Thanks Massimo ! On Monday, May 7, 2012 12:17:45 PM UTC-5, Massimo Di Pierro wrote: > > You are right. reverted. > > On Monday, 7 May 2012 12:04:23 UTC-5, Carlos wrote: >> >> Ho Massimo, >> >> No idea about the docs, I just checked the code and programmed >> accordingly. >> >> Doesn't it make mo

[web2py] Re: broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread Massimo Di Pierro
You are right. reverted. On Monday, 7 May 2012 12:04:23 UTC-5, Carlos wrote: > > Ho Massimo, > > No idea about the docs, I just checked the code and programmed accordingly. > > Doesn't it make more sense to use link (as up to know) instead of name > (new change) since the condition is based on li

[web2py] Re: Pyodel: a web2pyable e-learning tool

2012-05-07 Thread Massimo Di Pierro
Could you post some screenshots? Something that would be useful to me (perhaps you have something like this) is a plugin that provides a gradebook with two interfaces: a spreadsheet like interface (perhaps using web2py/gluon/contrib/spreadsheet) and a insert grade form which can be embedded in

[web2py] Re: broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread Carlos
Ho Massimo, No idea about the docs, I just checked the code and programmed accordingly. Doesn't it make more sense to use link (as up to know) instead of name (new change) since the condition is based on link?: if isinstance(link,DIV): Otherwise how would I make MENU to use LI(link)?, maybe

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-07 Thread villas
Eyes like an hawk! :)

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread villas
Hi Cyan, Databases are specially designed for keeping persistent data - so there is your answer! :) I suggest: 1. Write the data initially to a transitional Sqlite DB on disk. 2. Once all the data pieces have arrived, migrate the completed data to your main DB and delete all the

[web2py] Pyodel: a web2pyable e-learning tool

2012-05-07 Thread Alan Etkin
Since my e-learning customer decided to build his own Moodle application for his teaching needs, and therefore I had that free time to think of something else, I was looking for a web2py tool to provide an enhanced alternative, pluggable, easily maintainable, Pythonic tool for newtworked educat

[web2py] Re: broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread Massimo Di Pierro
Is there any place in the docs that suggests this should work one way or another? If there is this should behave according to the docs. If there isn't, the new way makes more sense. Are other people using these feature (helpers in links in menu)? On Monday, 7 May 2012 09:38:15 UTC-5, Carlos wro

Re: [web2py] How to keep and manipulate data in memory with web2py

2012-05-07 Thread Jonathan Lundell
On May 7, 2012, at 11:05 AM, Anthony wrote: >> If you just need to store data for a single user across requests, you can >> store it in the session (each user has a separate session). But if you need >> to store data from multiple users and then process it all together, you can >> store it in th

Re: [web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread Anthony
> > If you just need to store data for a single user across requests, you can > store it in the session (each user has a separate session). But if you need > to store data from multiple users and then process it all together, you can > store it in the cache: http://web2py.com/books/default/chap

Re: [web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread cyan
> That might be just slightly unsafe, don't you think, if a piece of data > gets evicted before it's needed? I'd prefer to limit caching to data that > can be recreated when it's not found in the cache. > > An alternative might be a memory-based SQLite database, taking care not to > let it lea

Re: [web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread Jonathan Lundell
On May 7, 2012, at 10:35 AM, Anthony wrote: > If you just need to store data for a single user across requests, you can > store it in the session (each user has a separate session). But if you need > to store data from multiple users and then process it all together, you can > store it in the ca

[web2py] Re: How to keep and manipulate data in memory with web2py

2012-05-07 Thread Anthony
If you just need to store data for a single user across requests, you can store it in the session (each user has a separate session). But if you need to store data from multiple users and then process it all together, you can store it in the cache: http://web2py.com/books/default/chapter/29/4#ca

[web2py] How to keep and manipulate data in memory with web2py

2012-05-07 Thread cyan
Hi group, Is it possible for one to store incoming user data (e.g. those submitted by users on a page) in memory, manipulate them in memory, and send them back with web2py? Or do I need to external modules/libraries to do that? So far, it seems by default all user submitted data are written to

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-07 Thread Anthony
> > {{=DIV(form.custom.end[1] # hidden field}} > Missing ")"

[web2py] Re: Creating Pages in a Content Managment System using Generic view and template blocks

2012-05-07 Thread Anthony
When a request comes in for /myapp/mycontroller/myfunction, it gets routed to the myfunction() function in the mycontroller.py controller. In that case, by default the view is set to /views/mycontroller/myfunction.html. If web2py doesn't find that view, it will then use /views/generic.html, but

[web2py] Re: Using DB on Module (thread)

2012-05-07 Thread Anthony
> > *from gluon.sql import DAL, Field* > *db = DAL('mysql:mydatabase')* > > Done. But it seems to be empty, no tables remaining :( > Even if I select the auth_user table: "*KeyError: 'auth_user*'" > After defining the "db" object, you have to define the tables as well -- otherwise, it doesn't kn

[web2py] Creating Pages in a Content Managment System using Generic view and template blocks

2012-05-07 Thread Hassan Alnatour
Dear ALL, I want to create a Content management system that has the ability to create pages , now as i know when i want to create a page in web2py first i need the function and then i need the html page or else use the Generic.html for my pages , now any ideas of how to create pages using

[web2py] broke my apps > changeset # 8923901b77c5 (fixed github issue 4)

2012-05-07 Thread Carlos
Hi, One of the latest changes in trunk broke my app: changeset # 8923901b77c5 (fixed github issue 4) It changed from LI(link) to LI(name) in Menu.serialize @ html.py. Should I somehow make all necessary changes on my code or should this change be reverted?. Thanks, Carlos

[web2py] Re: {{=LOAD()}} and menu

2012-05-07 Thread Annet
Hi Alan and Anthony, Thanks for your replies. {{=_name}} > > Note, you had an extra ")" after the URL but before the target argument, which would have caused a Javascript syntax error. Also, the target should be 'component-pane', not 'component'. I've been staring at this for almost an hou

[web2py] Re: Using DB on Module (thread)

2012-05-07 Thread Samuel Mac
Ok Massimo. Ty *from gluon.sql import DAL, Field* *db = DAL('mysql:mydatabase')* Done. But it seems to be empty, no tables remaining :( Even if I select the auth_user table: "*KeyError: 'auth_user*'" Should i get other information from gluon? I thinked using 3 threads was the best way obtaining

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-07 Thread Annet
The table definition: db.define_table('Contact', Field('organization',length=128), Field('title',length=8), Field('givenName',length=32), Field('familyName',length=64,default='',notnull=True), Field('phone',length=16), Field('email',length=128,default='',notnull=True),

Re: [web2py] Re: Moving web2py app to other server

2012-05-07 Thread Richard Vézina
I would suggest to set the old version (copy everything the web2py/ folder) in your new machine. Then with the built in server you can start any version without "installation". So you can just try your app in a given version of web2py (let say the last update version) and see if everything still w

[web2py] Re: Auth form custom errors

2012-05-07 Thread Massimo Di Pierro
My bad >>> form = auth.login() >>> form['_action']=URL('somewhere') >>> print form >> print form.custom.begin open tag manually. Perhaps web2py can be improved in this respect. On Monday, 7 May 2012 06:32:44 UTC-5, Rhys wrote: > > Hey Massimo, > > The > > {{form=auth()}} > {{form['_acton'] = "

[web2py] Re: New Dal causing a problem

2012-05-07 Thread Massimo Di Pierro
Fixed in trunk. On Monday, 7 May 2012 07:46:29 UTC-5, Alan Etkin wrote: > > There's a problem in line 7182 of the new dal.py: > > Table.__getitem__() is testing if an object is instance of the Key class > (which only exists in the namespace if the appengine modules are present) > > On Monday, May

[web2py] Re: Gluon module changes

2012-05-07 Thread Massimo Di Pierro
Not sure I understand your question. You can propose inclusion of your script into web2py. You need to send me a contributor agreement and a copy of your script by email. You do not need to include your script in web2py to use it. You need to put it in the modules/ folder of the application the

[web2py] Re: Can drop downs in a form depend on each other?

2012-05-07 Thread Massimo Di Pierro
Consider the logic/workflow of this. When the user selects the first dropdown, the content of the second dropdown has to change. How does the server know that you have changed the first dropdown? You have not submitted the form yet! This must be handled client side using jQuery and perhaps ajax

[web2py] Re: Can drop downs in a form depend on each other?

2012-05-07 Thread Alan Etkin
Here is something that might help. http://dev.s-cubism.com/plugin_multiselect_widget It doesn't repopulates multiselect fields, but it is possible to add the behavior with jQuery and .load controllers Note: There is no info on code license on the page. El lunes, 7 de mayo de 2012 08:09:45 UTC-

[web2py] Re: Can drop downs in a form depend on each other?

2012-05-07 Thread Anthony
http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910 On Monday, May 7, 2012 7:09:45 AM UTC-4, Stefan L wrote: > > Not sure I got the heading understandable, but this is what I want to > achieve (actual values o

[web2py] Re: Using DB on Module (thread)

2012-05-07 Thread Massimo Di Pierro
You cannot have multiple threads share the same db. That conflicts with web2py thread pooling mechanism. Even if it did not, we do not know the db driver it thread safe. Each thread must have it's own db=DAL() connection. On Monday, 7 May 2012 05:21:17 UTC-5, Samuel Mac wrote: > > First of all,

[web2py] Re: Another misinformed article about web2py

2012-05-07 Thread Massimo Di Pierro
Exactly! On Monday, 7 May 2012 00:57:45 UTC-5, Gour wrote: > > On Sun, 6 May 2012 15:42:14 -0700 (PDT) > Massimo Di Pierro > wrote: > > > Yes this is a source of criticism mostly for people who do not > > understand why we do it (to enable hot install and uninstall of apps > > without confli

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-07 Thread Massimo Di Pierro
Please post the entire view and form definition. On Monday, 7 May 2012 00:37:42 UTC-5, Annet wrote: > > Massimo, > > I tried both solutions, they both result in the same error: > > Traceback (most recent call last): > File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py", line > 2

[web2py] Re: Possible problem with cron using python 2.7.3 and Ubuntu 12.04

2012-05-07 Thread Massimo Di Pierro
Looks like a bug with the python version what has been fixed in subsequent versions. On Sunday, 6 May 2012 22:40:11 UTC-5, Nick Noel wrote: > > Hello, > I find that I get the following error on startup: > > Starting hardcron... > please visit: > http://127.0.0.1:8000 > starting browser...

[web2py] Re: {{=LOAD()}} and menu

2012-05-07 Thread Anthony
> > onclick="web2py_component('{{=_link}}'),'component')">{{=_name}} > Should be: {{=_name}} Note, you had an extra ")" after the URL but before the target argument, which would have caused a Javascript syntax error. Also, the target should be 'component-pane', not 'component'. Ant

[web2py] Re: Auth form custom errors

2012-05-07 Thread Anthony
When you manipulate the form object after it has been created, form.custom.begin and form.custom.end are the only two things that are not affected. That is because they are both XML() objects and not regular HTML helper objects (they cannot be regular helper objects because they are not full HT

[web2py] Re: New Dal causing a problem

2012-05-07 Thread Alan Etkin
There's a problem in line 7182 of the new dal.py: Table.__getitem__() is testing if an object is instance of the Key class (which only exists in the namespace if the appengine modules are present) On Monday, May 7, 2012 5:49:09 AM UTC-3, Johann Spies wrote: > > After updating my web2py from the

[web2py] Re: Could not connect to host x.x.x.x

2012-05-07 Thread mmstud
Server provider had changed nameservers but didn't update them to my server. That caused the problem and its solved now. -Marko maanantai, 7. toukokuuta 2012 10.18.13 UTC+3 mmstud kirjoitti: > > Hi, > > just when I was thinking to move my app to other server, which should > happen in a month, I

[web2py] Re: {{=LOAD()}} and menu

2012-05-07 Thread Alan Etkin
The link looks right. Maybe you can debug the output of the for loop to see if there is any unexpected value on it. And you might want to look at the html source in the browser for checking that the link data is correct. On Monday, May 7, 2012 6:02:17 AM UTC-3, Annet wrote: > > When I generate a

Re: [web2py] Re: Auth form custom errors

2012-05-07 Thread Rhys
Sorry that was a typo in the response not the actual code, as I just tried it again and it still spat out nothing for the action. You have a keen eye David!! :) Cheers, Rhys On Monday, May 7, 2012 9:38:27 PM UTC+10, David J wrote: > > You have a typo "acton" > > Hey Massimo, >> >> The >> >> {{

[web2py] Possible problem with cron using python 2.7.3 and Ubuntu 12.04

2012-05-07 Thread Nick Noel
Hello, I find that I get the following error on startup: Starting hardcron... please visit: http://127.0.0.1:8000 starting browser... Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored Furthermore, I find that each time a cro

[web2py] Can drop downs in a form depend on each other?

2012-05-07 Thread Stefan L
Not sure I got the heading understandable, but this is what I want to achieve (actual values only for demonstration, the app is not about cars :-)): Given a table: db.define_table('cars', Field('maker','string'), Field('model', 'string'), Field('colour','string')) db.cars.maker.requires=IS_IN_S

Re: [web2py] Re: Auth form custom errors

2012-05-07 Thread David J
You have a typo "acton" On May 7, 2012 7:32 AM, "Rhys" wrote: > Hey Massimo, > > The > > {{form=auth()}} > {{form['_acton'] = "/user/login"}} > {{=form.custom.begin}} > > > spat out the html without the updated action > > > > > Cheers, > > Rhys > > > On Monday, May 7, 2012 12:52:20 AM UTC+10, Ma

[web2py] Re: DAL and existing tables

2012-05-07 Thread Rhys
Hey Guys, I'll give that a shot. Maybe I miss understood the migration part. Makes sense now after I read the chapter again. The fake_migrate=true recreates the meta data. Cheers, Rhys On Monday, May 7, 2012 8:22:05 PM UTC+10, villas wrote: > > If the table already physically exists in the DB

[web2py] Re: Auth form custom errors

2012-05-07 Thread Rhys
Hey Massimo, The {{form=auth()}} {{form['_acton'] = "/user/login"}} {{=form.custom.begin}} spat out the html without the updated action Cheers, Rhys On Monday, May 7, 2012 12:52:20 AM UTC+10, Massimo Di Pierro wrote: > > Interesting. When you say it did not work. What html did it generat

[web2py] Re: Gluon module changes

2012-05-07 Thread mmstud
So my next question is, if there is possibility to include my own scripts to new web2py, that I downloaded for mac. Its single file app and when I tried to see inside the package, I can't find gluon directory there. Is it possible or should I use source code and drop own scripts to gluon direct

[web2py] Re: Unit Testing

2012-05-07 Thread villas
Hi Rod, To add to your resources, I noticed on this site http://killer-web-development.com the author talks about using Selenium with web2py. Regards, David On Sunday, 6 May 2012 18:40:10 UTC+1, Rod Watkins wrote: > > Hi everyone, > > I am fairly new to web2py and python programming, but hav

Re: [web2py] Re: Candidate Employment Tracking Portal

2012-05-07 Thread Yogesh
Thanks david. I will check out the mentioned resources... Will update on the same once done. On Mon, May 7, 2012 at 4:17 PM, villas wrote: > Dear Yogesh > > Web2py is an excellent choice for the kind of web application you > describe. To be a proficient web developer takes quite a lot of effort

[web2py] Re: Candidate Employment Tracking Portal

2012-05-07 Thread villas
Dear Yogesh Web2py is an excellent choice for the kind of web application you describe. To be a proficient web developer takes quite a lot of effort but there are many resources that you can use -- see the "sticky" post by Anthony at the top of this group. I suggest that you start with the fi

[web2py] Re: Gluon module changes

2012-05-07 Thread mmstud
Sorry, it seems gluon.htmlextended was my own script... maanantai, 7. toukokuuta 2012 10.42.40 UTC+3 mmstud kirjoitti: > > Sorry to multiple posts recently. I'm trying to update web2py app, and my > next problem is, that gluon module seems to have updated so its not working > with my old app now

[web2py] Re: DAL and existing tables

2012-05-07 Thread villas
If the table already physically exists in the DB, then you need to make sure you have a correct .table file in the yourapp/databases folder. You do this by including the setting "fake_migrate=True" for each table. Or, you may do all tables at once by setting your main DAL connection to "fak

[web2py] Using DB on Module (thread)

2012-05-07 Thread Samuel Mac
First of all, I've been searching other google group theads and they help me doing all I wanted but now I'm stuck. I was looking for getting some hardware information from a computer using 3 threads. This threads save the info in the Database. To do that i follow the instructions founded in thi

[web2py] {{=LOAD()}} and menu

2012-05-07 Thread Annet
When I generate a menu like this: Home Openingtijden .. and in the view have this: {{=LOAD('addressbook','contact.load',args=session.id,ajax=True,target='component-pane')}} it works with out problem. However, when I replace the menu with: {{for _name,_active,_link in response.hub

Re: [web2py] Could not connect to host x.x.x.x

2012-05-07 Thread mmstud
No I didn't copy it yet at all. Its still on old server giving this error. And what comes to me, I haven't changed application or server settings for a month or even more. maanantai, 7. toukokuuta 2012 11.28.37 UTC+3 Khalil KHAMLICHI kirjoitti: > > how did you copy your application to new server

Re: [web2py] A good provider

2012-05-07 Thread Khalil KHAMLICHI
Thanks for sharing this with us, we really need such testimonial because even though we like to use web2py for all of our projects sometimes we are facing hosting challenges. On Sun, May 6, 2012 at 10:07 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > Hello list, > > If prefer to man

[web2py] New Dal causing a problem

2012-05-07 Thread Johann Spies
After updating my web2py from the trunc about two hours ago, the following happened when I tried to access an existing app: Database drivers available: pysqlite2, pymysql, psycopg2, pg8000, IMAP Traceback (most recent call last): File "/home/js/web2py/gluon/restricted.py", line 205, in restricte

Re: [web2py] DAL and existing tables

2012-05-07 Thread Johann Spies
On 7 May 2012 10:20, Rhys wrote: > > I've also put the flag migration=True in the define_table method. I read > the chapter in the book and still it doesn't seem to want to do it. > > I would try migrate = False # not 'migration' in this case otherwise DAL would try and recreate the table as

Re: [web2py] Could not connect to host x.x.x.x

2012-05-07 Thread Khalil KHAMLICHI
how did you copy your application to new server ? if you did as root check file permissions. On Mon, May 7, 2012 at 7:18 AM, mmstud wrote: > Hi, > > just when I was thinking to move my app to other server, which should > happen in a month, I countered this sudden problem. Current application is

[web2py] DAL and existing tables

2012-05-07 Thread Rhys
Hey Guys, I'm having trouble with DAL, as I already have existing tables in the database. I keep on getting the error: Table exists. How do I get around this so the DAL just accepts that the table is there and creates a new file in the database folder. It seems a bit restrictive when it comes t

[web2py] Gluon module changes

2012-05-07 Thread mmstud
Sorry to multiple posts recently. I'm trying to update web2py app, and my next problem is, that gluon module seems to have updated so its not working with my old app now. I'm importing with next lines: from gluon.htmlextended import TableForm, DivForm, INPUT, SubmitButton, ResetButton, InputBut

[web2py] Could not connect to host x.x.x.x

2012-05-07 Thread mmstud
Hi, just when I was thinking to move my app to other server, which should happen in a month, I countered this sudden problem. Current application is not responding for some unknown reason. I don't get any error logs or debug messages on console, so I'm struggled, what is the reason for this. Wh

[web2py] Re: Moving web2py app to other server

2012-05-07 Thread mmstud
Thanks for your answers, I just needed a little bit reassurance. So I'm going to set up a new server with python and web2py, should it be new version too, yes I think so, because application did transfer well to my local machine. I have a mysql database, that I'm using, which is not hard to rep