[web2py] Re: LOAD and cancel button.

2012-05-08 Thread Annet
Hi Anthony, Thanks for your reply and explanation. Problem solved. Best regards, Annet

[web2py] Get the Value of Contenteditable

2012-05-08 Thread Sanjeet Roy
Can any one explain how we get the value of the contenteditable in our controller ?

[web2py] Re: Unable to restart Web2py on Mac

2012-05-08 Thread Annet
Done: http://code.google.com/p/web2py/issues/detail?id=785&thanks=785&ts=1336540021 Best regards, Annet

Re: [web2py] new feature in trunk: better markmin

2012-05-08 Thread Massimo Di Pierro
You can use MARMIN(...,extra=dict(html=lambda x: x)) then you would embed with """ ``this is html``:html """ but kind of defies the purpose and you may want to sanitize(x) On Tuesday, 8 May 2012 14:48:42 UTC-5, Alan Etkin wrote: > > Seems like it's not possible to embed HTML in markmin. Isn't

[web2py] Re: set request function forn _env in run @ shell.py

2012-05-08 Thread Massimo Di Pierro
please open a google code issue. I need to test and do not want to forget. seems reasonable. On Tuesday, 8 May 2012 09:09:32 UTC-5, Carlos wrote: > > Hi, > > The request function is not being set when executing from shell: -S a/c/f > > I propose to include f=f when creating _env in run @ shell.p

[web2py] Re: Unable to restart Web2py on Mac

2012-05-08 Thread Massimo Di Pierro
can you please open a googlecode issue? On Monday, 7 May 2012 00:03:20 UTC-5, Annet wrote: > > I had the same problem in October 2010: > > > https://groups.google.com/forum/?fromgroups#!searchin/web2py/annet$20other$20process/web2py/Zc53Lx85g50/P1CJjLFJuUcJ > > Back then it was qualified as an OS

[web2py] Re: MySQL issues

2012-05-08 Thread Massimo Di Pierro
bigint types for ids perhaps? On Tuesday, 8 May 2012 07:04:35 UTC-5, Jim S wrote: > > Funny thing - After this happened, I re-built all my tables (allowing > web2py to do so) and after that everything worked ok for that database. 4 > of my other apps working off the same server did not work and

[web2py] Re: A little improvement on the admin language modules

2012-05-08 Thread Massimo Di Pierro
Please email me a patch or the changed files. Thanks Demetrio. On Tuesday, 8 May 2012 03:46:32 UTC-5, demetrio wrote: > > Hi everyone, > > I don't know if this is the best way to send proposals for improvements. > > I have seen that in the admin app, there is a button for search all the > T() i

[web2py] Creating complex APIs in web2py

2012-05-08 Thread Alec Taylor
Specifications: - Accessible via REST (XML, JSON) and SOAP with generation of a variety of different schemas from a centralised database - Each user of role "loc" gets a unique API key generated for them and full Create/Read/Update access on data originated from them - Each user of role "prov"—once

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

2012-05-08 Thread Anthony
> > I've looked deeper into this, and in web2py doc: > http://www.web2py.com/examples/static/epydoc/web2py.gluon.cache.CacheInRam-class.html, > > it mentions: This is implemented as global (per process, shared by all > threads) dictionary. A mutex-lock mechanism avoid conflicts. > > Does this

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

2012-05-08 Thread Anthony
> > user_data = cache.ram('user_data', lambda:dict(), time_expire=None) >> >> # add the data from this user, this should also update the cached dict? >> user_data[this_user_id] = submitted_data >> > > The above would not update the dict in the cache -- you'd have to do that > explicitly: > Scrat

[web2py] Re: error updating table with notnull=true

2012-05-08 Thread villas
Hi Derek Yes if you have a table with records, you first have to create the table without notnull=True. Then you insert something into the new field e.g. you could even make it blank by adding an empty string >>> db(db.table).update(your_newfield = '' ) Then you can replace notnull=True. Note

[web2py] Re: override smartgrid 'add' button

2012-05-08 Thread villas
Hi Derek, Just use use the grid setting create=False to disable it. You can then add your own. Otherwise you could change the link with jQuery. Regards, David On Wednesday, 9 May 2012 01:12:47 UTC+1, Derek wrote: > > I'd like to change the link 'Add' in the smartgrid to use my 'register' > in

[web2py] override smartgrid 'add' button

2012-05-08 Thread Derek
I'd like to change the link 'Add' in the smartgrid to use my 'register' instead of the default 'new' function. So, to explain, I created a 'register' as shown here: http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables it's not actually a registration link, more like a 'crea

[web2py] Re: error updating table with notnull=true

2012-05-08 Thread Derek
So apparently this is caused because the migration creates this new column, (in my case "name__tmp") and adds the new constraints to it, but since it's doing it to a database with data in it, the new column defaults to having null values. Since the constraint is 'notnull' it fails to create it.

[web2py] Re: error updating table with notnull=true

2012-05-08 Thread Derek
Looks like the workaround is adding a "requires=IS_NOT_EMPTY()" so the field definition. On Tuesday, May 8, 2012 3:39:36 PM UTC-7, Derek wrote: > > ('42000', "[42000] [Microsoft][ODBC SQL > Server Driver][SQL Server]ALTER TABLE only allows columns to be added that > can contain nulls, or have

[web2py] error updating table with notnull=true

2012-05-08 Thread Derek
('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE only allows columns to be added that can contain nulls, or have a DEFAULT definition specified, or the column being added is an identity or timestamp column, or alternatively if none of the previous conditions are sa

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

2012-05-08 Thread cyan
> 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, thi

[web2py] Re: Unit Testing

2012-05-08 Thread howesc
while i would not call anything i have great tests or a wonderful example of testing, i have used doctests in controllers successfully. those are nice as the web2py environment is auto-setup for you. i'm working on using the unittest module to test my modules - those don't always need all the

Re: [web2py] datatable plugin customization

2012-05-08 Thread Richard Vézina
Good, feel free to ask for DTs... I also have to leave :) Richard On Tue, May 8, 2012 at 4:43 PM, Larry G. Wapnitsky wrote: > i'm about to leave my office. I'll send you a screenshot of what I"m > getting tomorrow. > > > > On 5/8/2012 4:42 PM, Richard Vézina wrote: > > What kind of table you n

Re: [web2py] Re: plugin wiki issues

2012-05-08 Thread villas
:-) On Tuesday, 8 May 2012 21:37:52 UTC+1, Larry Wapnitsky wrote: > > if I recreate the database from scratch, then re-import my data, it works > fine. > > On Tuesday, May 8, 2012 4:33:54 PM UTC-4, Larry Wapnitsky wrote: >> >> even tried it as rootno dice. >> >> >> On 5/8/2012 4:25 PM, villa

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim Steil
Oh, it's no problem, I'm all good now. I was just trying to let you guys know how I got in this mess in hopes that you could prevent it in the future for others. -Jim On 5/8/2012 3:41 PM, villas wrote: Hi Jim Sounds like a bit of a tangle. However, I think you should be ok. I would t

Re: [web2py] datatable plugin customization

2012-05-08 Thread Larry G. Wapnitsky
i'm about to leave my office. I'll send you a screenshot of what I"m getting tomorrow. On 5/8/2012 4:42 PM, Richard Vézina wrote: What kind of table you need, I can help you initialise DataTables, the other one I don't use them. I know how to setup jqgrid with plugin_wiki, but I didn't touch

Re: [web2py] datatable plugin customization

2012-05-08 Thread Richard Vézina
What kind of table you need, I can help you initialise DataTables, the other one I don't use them. I know how to setup jqgrid with plugin_wiki, but I didn't touch it since a long time and to me it was so difficult to configure so I abandonned it. With DataTables, I definitely help set it up. Richa

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread villas
Hi Jim Sounds like a bit of a tangle. However, I think you should be ok. I would try this: 1. Use your DB management tool to change the keys on the newly added table to BIGINT (make sure Foreign Key references and any triggers are consistent too. 2. Backup your existing *.table f

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Richard Vézina
Also, if you just don't want to use auth_group and auth_membership, you can just add a flag to auth_user if you define your own custom auth_user and then refer to this flag to create your set for IS_IN_DB... Richard On Tue, May 8, 2012 at 4:38 PM, Richard Vézina wrote: > Since virtual field are

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Richard Vézina
Since virtual field are calculated each query I don't think you can refer to them in IS_IN_DB as a table field... Could be a solution if it works. Richard On Tue, May 8, 2012 at 2:10 PM, Jim Steil wrote: > Anyone know if I can use a virtual field in my IS_IN_DB validator? > > -Jim > > > O

Re: [web2py] Re: plugin wiki issues

2012-05-08 Thread Larry Wapnitsky
if I recreate the database from scratch, then re-import my data, it works fine. On Tuesday, May 8, 2012 4:33:54 PM UTC-4, Larry Wapnitsky wrote: > > even tried it as rootno dice. > > > On 5/8/2012 4:25 PM, villas wrote: > > Hi Larry, it sounds like your DB is not configured properly for y

Re: [web2py] datatable plugin customization

2012-05-08 Thread Larry G. Wapnitsky
I tried those, but documentation seems to be missing as well. On 5/8/2012 4:35 PM, Richard Vézina wrote: ho, I think those plugin could be quite outdated... If you really need a table plugin, look to Datatables or PowerTable (or PowerGrid : http://labs.blouweb.com/PowerGrid/) form Bruno. Th

Re: [web2py] datatable plugin customization

2012-05-08 Thread Richard Vézina
ho, I think those plugin could be quite outdated... If you really need a table plugin, look to Datatables or PowerTable (or PowerGrid : http://labs.blouweb.com/PowerGrid/) form Bruno. There is also a plugin_wiki jqgrid coming pre-wrapped within web2py. Richard On Tue, May 8, 2012 at 3:36 PM, La

Re: [web2py] Re: plugin wiki issues

2012-05-08 Thread Larry G. Wapnitsky
even tried it as rootno dice. On 5/8/2012 4:25 PM, villas wrote: Hi Larry, it sounds like your DB is not configured properly for your username. I don't use MySql but maybe this prob sounds familiar to those that do. Anyone? Sorry I can't think of anything more D On Tuesday, 8 May

Re: [web2py] Re: plugin wiki issues

2012-05-08 Thread Larry G. Wapnitsky
nix that last comment...didn't have the plugin loaded. did not work On 5/8/2012 4:25 PM, villas wrote: Hi Larry, it sounds like your DB is not configured properly for your username. I don't use MySql but maybe this prob sounds familiar to those that do. Anyone? Sorry I can't think of anyt

Re: [web2py] Re: plugin wiki issues

2012-05-08 Thread Larry G. Wapnitsky
and it just worked on my test db server with the exact same config.. On 5/8/2012 4:25 PM, villas wrote: Hi Larry, it sounds like your DB is not configured properly for your username. I don't use MySql but maybe this prob sounds familiar to those that do. Anyone? Sorry I can't think of anyt

Re: [web2py] Re: plugin wiki issues

2012-05-08 Thread Larry G. Wapnitsky
It's been working up to this point...not sure why it won't work now... On 5/8/2012 4:25 PM, villas wrote: Hi Larry, it sounds like your DB is not configured properly for your username. I don't use MySql but maybe this prob sounds familiar to those that do. Anyone? Sorry I can't think of any

[web2py] Re: plugin wiki issues

2012-05-08 Thread villas
Hi Larry, it sounds like your DB is not configured properly for your username. I don't use MySql but maybe this prob sounds familiar to those that do. Anyone? Sorry I can't think of anything more D On Tuesday, 8 May 2012 21:16:50 UTC+1, Larry Wapnitsky wrote: > > A new, test app worked

[web2py] Re: plugin wiki issues

2012-05-08 Thread Larry Wapnitsky
restarted web2py. no dice. died immediately when accessing any page (1005, u"Can't create table 'rbl.plugin_wiki_page' (errno: 150)") On Tuesday, May 8, 2012 4:16:50 PM UTC-4, Larry Wapnitsky wrote: > > A new, test app worked with no problems. > > Here is my DAL DB connection string: db = DAL

[web2py] Re: plugin wiki issues

2012-05-08 Thread Larry Wapnitsky
A new, test app worked with no problems. Here is my DAL DB connection string: db = DAL('mysql://user:passw...@dbserer.company.com/dbname') I was getting "can't create table" errors until I added "grant" rights to the remote "user" account. Now, the page just spins... On Tuesday, May 8, 2012

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim Steil
In looking back, I think this is what got me. 1. When bigint_id=True became the default, my apps broke and I'm not sure why 2. To fix it, I created a blank db and let things auto-migrate to create new 3. I dumped the data from the original and imported to my new db 4. Then I recreated my o

[web2py] Re: plugin wiki issues

2012-05-08 Thread villas
I guess it still didn't work then. At this point [scratching head]: Consider upgrading your web2py. Create a brand new app to test the most basic DB function is there. Delete contents of the databases folder. Change the DAL connection string in db.py Put a simple table def in the db.py Run your a

Re: [web2py] new feature in trunk: better markmin

2012-05-08 Thread Alan Etkin
Seems like it's not possible to embed HTML in markmin. Isn't it? How about allowing a user to do: >> print MARKMIN("[[[Spam]]]") Spam I think that this would be useful for dual markmin/html wisiwig editors too.

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread villas
Hi Jim Yes, some of this discussion has been going on the developer list and I made a post there to try and sum up the current situation. I will re-post this summary here: 1. If you explicitly set bigint_id=True all references will use BIGINT keys. 2. Otherwise, it will continue to use INTs

[web2py] Re: Using AJAX with web2py tutorials

2012-05-08 Thread Anthony
Start with http://web2py.com/books/default/chapter/29/11#The-ajax-function and http://web2py.com/books/default/chapter/29/12#Components. On Tuesday, May 8, 2012 3:32:18 PM UTC-4, Jake wrote: > > Hi group, > > AJAX seems to be pretty popular with web2py. Are there any tutorials you'd > recommend

Re: [web2py] datatable plugin customization

2012-05-08 Thread Larry Wapnitsky
Also, I found the "truncate" switch, which is helping me, but my table is appearing on the right. Is there a list of the available "switches" for datatable? On Tuesday, May 8, 2012 11:58:28 AM UTC-4, Richard wrote: > > Which plugin... Also if you use chrome rigth click and inspect element can

[web2py] Using AJAX with web2py tutorials

2012-05-08 Thread Jake Richter
Hi group, AJAX seems to be pretty popular with web2py. Are there any tutorials you'd recommend to get started with AJAX? -- Jake

[web2py] Re: Javascript file in static folder not refreshed

2012-05-08 Thread Derek
That would fix it for the one system - but if you have site that is used by many, are you going to have everyone empty their cache? Isn't there a way to set the cache headers? On Tuesday, May 8, 2012 10:34:30 AM UTC-7, Anthony wrote: > > It's probably being cached by the browser, so you may need

[web2py] Re: Restart web2py from command line

2012-05-08 Thread Yarin
Ctl-c is working for me now, thanks. I was dealing with some database hangs yesterday where Ctl-c wasn't doing anything, but not gonna worry about that now.. On Tuesday, May 8, 2012 12:21:19 PM UTC-4, pbreit wrote: > > I've never had a problem on OSX with ctrl-c.

Re: [web2py] Re: drop down menu custom filter

2012-05-08 Thread Khalil KHAMLICHI
Thanks for your help, I looked at the book and it says : The first argument of IS_NOT_IN_DB can be a database connection or a Set. > In the latter case, you would be checking only the set defined by the Set. > I did not know that it could be a sSET too Thanks again. On Tue, May 8, 2012 at 12:5

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Jim Steil
Anyone know if I can use a virtual field in my IS_IN_DB validator? -Jim On 5/8/2012 12:48 PM, Jim Steil wrote: Richard First off, thanks for all the help, I certainly appreciate it. I'm trying to work with the second suggestion below, but am having trouble as you suspected with getting t

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Jim Steil
Richard First off, thanks for all the help, I certainly appreciate it. I'm trying to work with the second suggestion below, but am having trouble as you suspected with getting the row.id. I'm shying away from the auth_group idea because I prefer to enforce within the db that the users on tha

[web2py] Re: Javascript file in static folder not refreshed

2012-05-08 Thread monotasker
Yes, that was it. Thanks. Ian On Tuesday, May 8, 2012 1:34:30 PM UTC-4, Anthony wrote: > > It's probably being cached by the browser, so you may need to clear the > browser cache (simply refreshing the page won't do it). > > Anthony > > On Tuesday, May 8, 2012 1:11:51 PM UTC-4, monotasker wrote:

[web2py] Re: Display text in SELECT list

2012-05-08 Thread Cliff
Try this: # this join limits the auth_user result set to those users who are also in the tech table query = (db.helpdeskTech.userid=db.auth_user.id) # IS_NULL_OR is deprecated ticket.assignedTo.requires = IS_EMPTY_OR( IS_IN_DB(db(query), 'auth_user.id', '%(first_name)s %(last_name)s' ) O

[web2py] Re: Javascript file in static folder not refreshed

2012-05-08 Thread Anthony
It's probably being cached by the browser, so you may need to clear the browser cache (simply refreshing the page won't do it). Anthony On Tuesday, May 8, 2012 1:11:51 PM UTC-4, monotasker wrote: > > I'm working on a js file that resides in appname/static/js/ but for some > reason it seems to b

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim Steil
Well, that explains things quite nicely. I guess that is what I get for working with trunk all the time. This also explains what was happening to me the post I referenced below. -Jim On 5/8/2012 11:48 AM, Carlos wrote: Hi Jim, The default now is bigint_id=False, so try to pass bigint_id

[web2py] Javascript file in static folder not refreshed

2012-05-08 Thread monotasker
I'm working on a js file that resides in appname/static/js/ but for some reason it seems to be cached. When I refresh the browser (even if I restart the local web2py server) the page continues to load an old version. I develop largely with custom modules, and those files are refreshing just fin

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Carlos
Hi Jim, The default now is bigint_id=False, so try to pass bigint_id=True in the connection string. Carlos On Tuesday, May 8, 2012 11:40:44 AM UTC-5, Jim S wrote: > > My problem is the opposite. All of my tables now have BIGINT for the id > columns. The SQL generated today is now creati

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim Steil
My problem is the opposite. All of my tables now have BIGINT for the id columns. The SQL generated today is now creating them with INT columns and the reference fields are also being created with INT. When I changed the SQL (using an outside SQL tool) from using INTs to BIGINTs it all worked

[web2py] Re: Restart web2py from command line

2012-05-08 Thread pbreit
I've never had a problem on OSX with ctrl-c.

Re: [web2py] datatable plugin customization

2012-05-08 Thread Larry Wapnitsky
plugin_datatable from web2py.com/plugins On Tuesday, May 8, 2012 11:58:28 AM UTC-4, Richard wrote: > > Which plugin... Also if you use chrome rigth click and inspect element can > make it pretty easy to find a style and change the properties. > > Richard > > > I'm not a CSS guy (still learning),

[web2py] Re: plugin wiki issues

2012-05-08 Thread Larry Wapnitsky
In order: Yes Yes No existing tables Files don't exist migration settings removed Only error message from running web2py that way: WARNING:web2py:import IPython error; use default python shell On Tuesday, May 8, 2012 10:50:38 AM UTC-4, villas wrote: > > Hmm keep trying... > > Check you ha

Re: [web2py] datatable plugin customization

2012-05-08 Thread Richard Vézina
Which plugin... Also if you use chrome rigth click and inspect element can make it pretty easy to find a style and change the properties. Richard On Tue, May 8, 2012 at 11:46 AM, Larry Wapnitsky wrote: > I'm not a CSS guy (still learning), but need to be able to change the > default column widt

[web2py] datatable plugin customization

2012-05-08 Thread Larry Wapnitsky
I'm not a CSS guy (still learning), but need to be able to change the default column widths in the datatable plugin. Guidance? Thanks, Larry

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Richard Vézina
Jim, Try this : bigint_id=False in connection string I think... https://groups.google.com/forum/?fromgroups#!topic/web2py-developers/DrCFEnZIYt4 Also, I think with trunk your entire database models is now consider bigint. It maybe not what you want. Richard On Tue, May 8, 2012 at 10:53 AM, Ji

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

2012-05-08 Thread Alec Taylor
Nice project concept. Contact me when you're a little further down the line and I'll create an analytics module for it with some nice AJAX graphs and charts

[web2py] CRUD example from chapter 29 not working

2012-05-08 Thread Alec Taylor
Hi web2py peeps, I've just come from the world of Django to web2py in order to leverage PySimpleSOAP integration for APIs alongside your JSON, XMLRPC and RESTful XML support. So I began going through your docs, noted a few problems (typos and the like) here and there, but mostly clear sailing.

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

2012-05-08 Thread Samuel Mac
If I define de DAL in __init__ and make a query in the constructor (just for trying), it works. But it doesn't on the run method, I can not make any query outside the constructor. *Solved:* I have to define the DAL in the run method again. I dont know why but now it works. def run(self):

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

2012-05-08 Thread Alan Etkin
> > Could you post some screenshots? I have uploaded screenshots here: http://code.google.com/p/pyodel/wiki/DevelopmentScreenshots gradebook and insert student qualifications form are listed for implementation (no components available so far)

[web2py] Re: grid/smartgrid: pass parameters to form

2012-05-08 Thread teemu
Sorry, I didn't check the latest sources from the trunk. I was just reading documentation that I was able to find from net (e.g. web2py book). From the latest source tree I found that this functionality has already been implemented. There are formargs, viewargs, createargs and editargs paramet

[web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim S
I upgraded to this trunk right when it came out. I upgrade trunk again yesterday (5/7/2012) and created a new table today with a reference field to an old table. Here is the SQL that was generated (MySQL). CREATE TABLE ticketActivity( ticketActivityId INT AUTO_INCREMENT NOT NULL, ticket

[web2py] Re: plugin wiki issues

2012-05-08 Thread villas
Hmm keep trying... Check you have appropriate read/write permissions from your host. Connect with your DB management tool and create a test table to make sure your DB server etc is running. Take one single table definition, let's call it 'yourexample'. Make sure there is no yourexample.tabl

Re: [web2py] accessing admin via ssh fails with:- "admin disabled because unable to access password file"

2012-05-08 Thread Bill Thayer
Thank you Mario. I had the password file for the secure port but inside no password. I copied the password from my development machine and it worked. Don't understand it but your post gave me a clue where to look. Thanks! On Sunday, February 12, 2012 6:11:12 AM UTC-6, Mariano Reingart wrote: > >

[web2py] set request function forn _env in run @ shell.py

2012-05-08 Thread Carlos
Hi, The request function is not being set when executing from shell: -S a/c/f I propose to include f=f when creating _env in run @ shell.py: _env = env(a, c=c, f=f, import_models=import_models) I'm using latest web2py trunk. Thanks, Carlos

[web2py] web2py rocket error Unhandled Error when serving connection

2012-05-08 Thread Ynap
I need other computers in my network to access to my website, I ran web2py with my ip address, for example: python web2py -a xxx -i 192.168.1.70 -p 8000. I can access to my site on 192.168.1.70:8000 in browser on my computer, however I cannot access on another computer in my network. The clie

[web2py] Re: plugin wiki issues

2012-05-08 Thread Larry Wapnitsky
David- No dice. Still getting the same errors. It does not want to create the tables in my MySQL database. I've made sure the settings are as you stated. These are things I've already done, but just got into the office today and retried them. On Friday, May 4, 2012 5:49:46 PM UTC-4, villas

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Richard Vézina
Ok, I think I understand... You create a kind of materialized view with helpdeskTech??? If you only need a "subset" of auth_user, you can create a auth_group for this. I mean, you create a auth_group "tech" and you assign user to this group then you will be able to make a set of those users like

[web2py] Re: MongoDB Adapter error in select

2012-05-08 Thread kokoyo
Hello, i got this error when tried pymongo and web2py: On Linux: cannot import name son . rows = self.dbset(field == value, ignore_common_filters = self.ignore_common_filters).select(limitby=(0, 1)) File "/home/kokoyo/webapps/w2p/web2py/gluon/dal.py", line 8134, in select return ad

[web2py] Re: LOAD and cancel button.

2012-05-08 Thread Anthony
> > > form[0][-1][1].append(INPUT(_type="button",_value="Cancel",_onclick="'web2py_component("%s","component-pane")'%URL('indexContent')")) > You don't need to add your own quotes around web2py_component(...) -- when web2py HTML helpers are serialized to HTML, all element attributes are au

Re: [web2py] Using translator in custom module

2012-05-08 Thread Bruno Rocha
from gluon import current class MyClass(object): def __init__(self): self.T = current.T def mymethod(self): return self.T("anything") On Tue, May 8, 2012 at 2:08 AM, rudy cortes wrote: > hello everyone > Im writting a custom module in the module dir. i am able to import

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

2012-05-08 Thread Anthony
> > I've added this line in my code: > > db = DAL('mysql://mydatabase', > folder='applications/gestion/databases',auto_import > =True) > > But the result was the same I got at the beginig: > > raise errorclass, errorvalue > InterfaceError: (0, '') > Are you saying if you take away the f

[web2py] Re: drop down menu custom filter

2012-05-08 Thread Anthony
On Tuesday, May 8, 2012 6:48:34 AM UTC-4, Khalil KHAMLICHI wrote: > > I generate a drop down menu with this line of code >> >> db.files.project.requires = IS_IN_DB(db, 'projects.id', '%(project)s', >> zero='...') > > > how do I add a filter like : (db.projects.deleted==False) to filter out > t

[web2py] Re: grid/smartgrid: pass parameters to form

2012-05-08 Thread Anthony
+1 Maybe we could do it via **kwargs. Anthony On Tuesday, May 8, 2012 8:38:23 AM UTC-4, teemu wrote: > > Hi, > > Is it possible to pass more parameters to form constructor (SQLFORM) when > using grids or smartgrids? I would like to pass parameters like: showid, > separator, submit_button, dele

[web2py] Using translator in custom module

2012-05-08 Thread rudy cortes
hello everyone Im writting a custom module in the module dir. i am able to import it but when I try to use the Translator T() the page errors out because T is not defined. what do I need to import to use T in a custom module?

[web2py] grid/smartgrid: pass parameters to form

2012-05-08 Thread teemu
Hi, Is it possible to pass more parameters to form constructor (SQLFORM) when using grids or smartgrids? I would like to pass parameters like: showid, separator, submit_button, delete_label etc. Basically I would like have more control what forms will look like. Currently only ignore_rw and f

[web2py] Re: Restart web2py from command line

2012-05-08 Thread Yarin
Apparently this won't be possible in OSX. See your answer here https://groups.google.com/d/msg/web2py/Zc53Lx85g50/Ei6QJLN7JoQJ On Sunday, May 6, 2012 6:44:19 PM UTC-4, Massimo Di Pierro wrote: > > We can add a restart option. Anybody wants to try a patch about this? The > pid is stored in https

[web2py] Re: Unable to restart Web2py on Mac

2012-05-08 Thread Yarin
Thanks Annet- Looks like this is what we're dealing with On Monday, May 7, 2012 1:03:20 AM UTC-4, Annet wrote: > > I had the same problem in October 2010: > > > https://groups.google.com/forum/?fromgroups#!searchin/web2py/annet$20other$20process/web2py/Zc53Lx85g50/P1CJjLFJuUcJ > > Back then it was

[web2py] Re: Cannot repair database - all options tried

2012-05-08 Thread Yarin
*Update on this:* I've figured out the original cause of the corruption and it's very simple to reproduce: When pointing to an InnoDB MySQL server, dropping a foreign key column in db.py will cause a SQL error because of the foreign key constraint MySQL automatically sets up. This is not web2py

[web2py] Re: MySQL issues

2012-05-08 Thread Jim S
Funny thing - After this happened, I re-built all my tables (allowing web2py to do so) and after that everything worked ok for that database. 4 of my other apps working off the same server did not work and I didn't have time to recreate the DBs. Well yesterday I updated from trunk again and a

[web2py] Re: MongoDB Adapter error in select

2012-05-08 Thread Francisco Costa
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,fields,colnames,False) File "/opt/web2py/gluon/dal.py", line 1681, in parse

[web2py] Re: DAL and schema

2012-05-08 Thread Johann Spies
Apologies. Here is the remainder of my reply: In models/db.py (the process hangs in the last line of this code.: from applications.toets.modules.mydal import * db.define_table('auth_user', Field('id','id', represent=lambda id:SPAN(id,' ',A('view',_href=URL(

[web2py] drop down menu custom filter

2012-05-08 Thread Khalil KHAMLICHI
I generate a drop down menu with this line of code > > db.files.project.requires = IS_IN_DB(db, 'projects.id', '%(project)s', > zero='...') how do I add a filter like : (db.projects.deleted==False) to filter out the records displayed by the drop down menu ? thanks in advance.

[web2py] Re: DAL and schema

2012-05-08 Thread Johann Spies
On Thursday, 5 April 2012 15:02:49 UTC+2, adesst wrote: > > @johann, have you tried MyDAL to connect and follow the how to? > https://github.com/adesst/web2py > > > I have tried MyDAL without success today. My code: In models/0.py: from applications.toets.modules.mydal import * settings = Storag

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

2012-05-08 Thread Samuel Mac
I've added this line in my code: db = DAL('mysql://mydatabase', folder='applications/gestion/databases',auto_import =True) But the result was the same I got at the beginig: raise errorclass, errorvalue InterfaceError: (0, '') El lunes, 7 de mayo de 2012 12:21:17 UTC+2, Samuel Mac es

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

2012-05-08 Thread villas
In my opinion, using a DB is easier, more logical, transparent and makes your data more accessible. The function that is used to process the data on arrival can check whether all pieces of data are present. If so, then after saving the last piece it can then go on to migrate them to your ma

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

2012-05-08 Thread stefaan
The screenshot in the book was made using firefox, which automatically styles rss feeds such as the one you pasted and displays it in a nice way to the user. Other browsers don't have this automatic styling of rss feeds, and for those you should probably get some rss reader plugin to display the

[web2py] Re: Unit Testing

2012-05-08 Thread Kimmo
I'm also trying to get unit tests working on web2py by following the slices, but so far I've not been able to make them run properly. I'd like to see some clear examples and maybe some real projects with unit tests on web2py, to see how it's done in practice. On Sunday, 6 May 2012 20:40:10 UTC

[web2py] LOAD and cancel button.

2012-05-08 Thread Annet
In a view I have the following button: Delete In the form I normally add the following cancel button: def addCancelButton(form): form[0][-1][1].append(INPUT(_type="button",_value="Cancel",_onclick="javascript:history.go(-1);")) return None Since this form is within a page that loads it

[web2py] A little improvement on the admin language modules

2012-05-08 Thread Daniel González Zaballos
Hi everyone, I don't know if this is the best way to send proposals for improvements. I have seen that in the admin app, there is a button for search all the T() in the application, but it doesn't search in the modules dir. I don't know if this is intended. In my company, we are building an

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

2012-05-08 Thread Tony Ha
Hello Anthony and Rochabruno, Thanks for the help!. Yes it is a typo. So there is a typo in the on-line book "http://web2py.com/books";, which I cut and paste to follow the book. Now there is no error when I point the browser to "http://127.0.0.1:8000/ mywiki/default/news.rss", but what I get ba

Re: [web2py] Cannot repair database - all options tried

2012-05-08 Thread Michele Comitini
I would add to make a backup copy of the databases folder under your app. then delete the databases folder content, put db(, fake_migrate_all=True) python web2py.py -M -S [you can exit from the python shell then] If you keep having troubles you must have some problem in the table related to f

Re: [web2py] Cannot repair database - all options tried

2012-05-08 Thread Johann Spies
On 8 May 2012 07:17, Yarin wrote: > > I understand that the db definitions may be corrupted from time to time, > even though in this case I see no reason why they should have been. But my > real concern is that *there's no process I can fall back on to rebuild > the definitions from scratch*. Ple