[web2py] response.stream

2012-10-18 Thread weheh
Is it possible to do a response.stream in the middle of an ajax callback? I want to give users a button, which if pressed, will tar up all their files and initiate a download. Something like this: TAG.BUTTON(..., _onclick=ajax(%s, [], ':eval'); % URL(c='mycontroller', f='mydownload')) Then

[web2py] Re: pythondiary

2012-10-18 Thread rif
I guess two out of the three cons would be eliminated by web2admin. Please take some time to review it and give it some visibility. joi, 18 octombrie 2012, 00:58:24 UTC+3, Massimo Di Pierro a scris: http://www.pythondiary.com/reviews/web2pyV2.0.html --

[web2py] fake_migrate help

2012-10-18 Thread lyn2py
Hello all, something went wrong with the database table files, and they were accidentally completely removed (the whole database folder). I need to rebuild all the database files, so I did: db = DAL('postgres://',fake_migrate_all=True,migrate_enabled=False) According to the manual, this

[web2py] Plugin_wiki, auth.wiki clarification and routing.

2012-10-18 Thread HittingSmoke
This is a sort of two part question, the second part being conditional on the answer to the first. 1. Is plugin_wiki deprecated for auth.wiki or am I misinterpreting what's going on? I can find some documentation on plugin_wiki but most current discussion seems to be on doing the same things

[web2py] Re: Query with postgres

2012-10-18 Thread Paolo
Hi Massimo, thanks for the suggestions, at this point I have to understand what to do: - use your last proposal but in this case the date is no longer a data object but three different columns, and this will lead to a more difficult logic - put a date field in the table definition, this may

Re: [web2py] Re: tags and speed

2012-10-18 Thread andrej burja
hi system: it is on linode 512, os ubuntu, server apache, database postgresql my initial design was using list:string, but than i saw example in the book (Application-Development-Cookbook) and i thought this is better purpose of that code: user testing reveals, that the best way to search the

[web2py] Re: response.stream

2012-10-18 Thread Leonel Câmara
I don't get it. Why do you need ajax for a download? Why not a simple link? If you want you can make it look like a button too. Quinta-feira, 18 de Outubro de 2012 7:09:09 UTC+1, weheh escreveu: Is it possible to do a response.stream in the middle of an ajax callback? I want to give users a

[web2py] Re: pythondiary

2012-10-18 Thread lyn2py
As far as I am using web2py, I personally don't find the admin interface cons accurate. I use it daily and I personally think it's working fine for my needs. If a develop a software for others to use, I definitely will not make the admin interface available to them. Instead, I will write

[web2py] Re: response.stream

2012-10-18 Thread Niphlod
the first thing is: when you navigate to mycontroller/mydownload (no ajax) can you get the file downloaded ? second thing missing from your code: if you want the content downloaded as an attachment, set the content-disposition header to attachment; filename=afilename.tar On Thursday, October

[web2py] calling a library of files in a form

2012-10-18 Thread praveen krishna
I have two forms in two different functions which has a list of strings I want to want to query all the files in one form against other in another function what is the possible approach .For a single file I tried by using form = form_factory(Field('q', label='Query

[web2py] IS_NOT_IN_DB() and update SQLFORM.factory

2012-10-18 Thread Annet
I defined the following table: is_not_in_db=IS_NOT_IN_DB(db,'hub.name',error_message='name already in database') db.define_table('hub', Field(...), Field('name',default='',IS_NOT_EMPTY(),is_not_in_db],notnull=True,unique=True), ... migrate=False) ... and the following

[web2py] Re: web2py 2.1.1 is OUT!

2012-10-18 Thread Hassan Alnatour
Dear Massimo , Is the Session and login issues are fixed ? regards, On Thursday, October 18, 2012 12:30:33 AM UTC+3, Massimo Di Pierro wrote: The line is: from distutils import dir_util I think you need to install distutils separately. On Tuesday, 16 October 2012 09:14:47 UTC-5, apps

Re: [web2py] Re: pythondiary

2012-10-18 Thread Bruno Rocha
+1 web2admin is awesome! if we include query support it will be perfect to replace appadmin Em 18/10/2012 03:23, rif feric...@gmail.com escreveu: I guess two out of the three cons would be eliminated by web2admin. Please take some time to review it and give it some visibility. joi, 18

Re: [web2py] Re: pythondiary

2012-10-18 Thread rif
One query support coming up! joi, 18 octombrie 2012, 14:47:11 UTC+3, rochacbruno a scris: +1 web2admin is awesome! if we include query support it will be perfect to replace appadmin Em 18/10/2012 03:23, rif feri...@gmail.com javascript: escreveu: I guess two out of the three cons would be

[web2py] Re: Looking for a tutor

2012-10-18 Thread apps in tables
I recommend Rocha Bruno. https://plus.google.com/116110204708544946953/posts On Thursday, October 18, 2012 2:40:53 AM UTC+3, mikech wrote: I would be interested in hooking up with someone for some tutoring online for pay of course. Anyone interested? I'm in California so a similiar time

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread Massimo Di Pierro
Can i get the complete traceback? On Wednesday, 17 October 2012 22:59:43 UTC-5, Donatas Burba wrote: I have noticed another issue. With version 2.1.1 I can't use appy.pod anymore. It means I can generate only one pdf file, every other try gives me error (that I'm using python which can't

[web2py] Re: fake_migrate help

2012-10-18 Thread Massimo Di Pierro
You mean you do not see the .table files? Try: fake_migrate_all=True,migrate_enabled=True could be an error in the book. On Thursday, 18 October 2012 01:29:42 UTC-5, lyn2py wrote: Hello all, something went wrong with the database table files, and they were accidentally completely removed

Re: [web2py] Re: tags and speed

2012-10-18 Thread Massimo Di Pierro
I understand you want to select all possible tags. I suggest you create a table that stores all posible tags and when a new tag is created you insert a new record there. You can get all possible tags with a single select from this table. You can also cache that select. On Thursday, 18 October

[web2py] Re: web2py 2.1.1 is OUT!

2012-10-18 Thread Massimo Di Pierro
Session and CSV yes. What login problem are you referring to? On Thursday, 18 October 2012 05:51:30 UTC-5, Hassan Alnatour wrote: Dear Massimo , Is the Session , login , CSV import/Export issues are fixed ? regards, On Thursday, October 18, 2012 12:30:33 AM UTC+3, Massimo Di Pierro

Re: [web2py] Re: web2py 2.1.1 is OUT!

2012-10-18 Thread hasan alnator
Dear Massino , the login , i think it was a session problem , when you get applications from the old web2py to the 2.0.9 , the login blow up TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. Traceback (most recent call last):

Re: [web2py] Re: web2py 2.1.1 is OUT!

2012-10-18 Thread Massimo Di Pierro
I am pretty sure this is solved in 2.1.1. Massimo On Thursday, 18 October 2012 07:27:26 UTC-5, Hassan Alnatour wrote: Dear Massino , the login , i think it was a session problem , when you get applications from the old web2py to the 2.0.9 , the login blow up TRACEBACK 1. 2. 3.

Re: [web2py] Re: web2py 2.1.1 is OUT!

2012-10-18 Thread hasan alnator
Dear Massimo , That Is great , Thank you a lot ... Best Regards, On Thu, Oct 18, 2012 at 3:34 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I am pretty sure this is solved in 2.1.1. Massimo On Thursday, 18 October 2012 07:27:26 UTC-5, Hassan Alnatour wrote: Dear Massino ,

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread Massimo Di Pierro
Also, where is appy.pod installed? In python site-packages, in web2py site-packages, or in the app modules? On Wednesday, 17 October 2012 22:59:43 UTC-5, Donatas Burba wrote: I have noticed another issue. With version 2.1.1 I can't use appy.pod anymore. It means I can generate only one pdf

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread Donatas Burba
In the app modules 2012 m. spalis 18 d., ketvirtadienis 15:36:17 UTC+3, Massimo Di Pierro rašė: Also, where is appy.pod installed? In python site-packages, in web2py site-packages, or in the app modules? On Wednesday, 17 October 2012 22:59:43 UTC-5, Donatas Burba wrote: I have noticed

[web2py] Re: response.stream

2012-10-18 Thread weheh
Hi Niphlod - I modified my response.stream call to include the filename argument. When I call the controller, the file does get downloaded. However, when ajax calls the controller, the file isn't downloaded. @Leonel, a simple link, like A('download tar file', _href='%?attachment' %

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread Donatas Burba
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. Traceback (most recent call last): File /var/www/advokatai/gluon/restricted.py, line 209, in restricted exec ccode in environment File

[web2py] Re: response.stream

2012-10-18 Thread Niphlod
you can still use an href to the controller that returns finally your file, I don't see the problem (unless you want to fire something else, you can still animate the button in the middle). When you click on a link that returns an attachment you won't see the page change. If you want to use an

Re: [web2py] [FYI] Pyodel is now a plugin

2012-10-18 Thread Alan Etkin
El martes, 16 de octubre de 2012 18:12:46 UTC-3, Bill Thayer escribió:Hi Alan. I went through the registration process, got the Google sign in. Signed in with google too and then did not get re-directed back. AFAIK, there's no need to authenticate with a Google account to use the demo. Are

[web2py] Re: auth.wiki usage - Another Oracle DB Gotcha

2012-10-18 Thread Alan Etkin
DatabaseError: ORA-00904: WIKI_TAG.WIKI_PAGE: invalid identifier I found the connection error to be related to conflicts with field names, at least for some web Oracle related threads. The problem is that the names of the error output are table names instead. --

Re: [web2py] Re: web2py 2.1.1 is OUT!

2012-10-18 Thread Alec Taylor
Massimo: RE: *type 'exceptions.AttributeError' 'OracleAdapter' object has no attribute 'cursor'*? http://code.google.com/p/web2py/issues/detail?id=1085 On Thu, Oct 18, 2012 at 11:35 PM, hasan alnator halna...@gardeniatelco.comwrote: Dear Massimo , That Is great , Thank you a lot ... Best

[web2py] Re: Web2Py on OpenShift

2012-10-18 Thread apps in tables
Hi, Andew says: For the admin app to work you must put your password hash in parameters_8080.py in wsgi/web2py/. My Question: Which password? I mean that the password is defined upon the start of server, in openshift the server is started, so is it the password of the openshift account?

[web2py] Re: Web2Py on OpenShift

2012-10-18 Thread Andrew
Ashraf, I apologize, this is the first message I've received since you started posting to this thread. I think something with the group is malfunctioning. In anycase; Regarding which password, it's the web2py admin password hash. You can get this by starting a vanilla web2py instance with

[web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Don_X
hello web2py users, I am looking for specifics when it comes to creating additional tables within a sub-directory of MODELS ! I am making significant progress on my app ! and I know that I will certainly have an overhead issue because in my db.py file I have about 20 tables defined and some

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Richard Vézina
New feature lazy_table doesn't help? I would go with lazy_table before use sub-directory since if you use sub-directory depending of your app design your code will be less DRY. You need to have the same function in controller sub-directory for each table. So if all your table use the same

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Don_X
Richard .. at this stage ! ... the controller file for each sub directory table files are not the issue ... for now ... the tables are not getting created at all ! ... what I did to start fresh 1) i delete the database files in the database directory 2) delete the session files in the session

Re: [web2py] [FYI] Pyodel is now a plugin

2012-10-18 Thread Bill Thayer
Just tried it again. Logged in with my email and password then it took me to a blank page with one line on top that says to sign in with google password. On Thursday, October 18, 2012 8:23:58 AM UTC-5, Alan Etkin wrote: El martes, 16 de octubre de 2012 18:12:46 UTC-3, Bill Thayer escribió:Hi

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Richard Vézina
I don't understand you last sentence... Even if you move your db into sub folder the need to be defined with db.table_define(...)?! Also, maybe you just had set migrate_enabled=False in your db connection string?? Richard On Thu, Oct 18, 2012 at 11:22 AM, Don_X don.clerm...@gmail.com wrote:

[web2py] Re: auth.wiki usage - Another Oracle DB Gotcha

2012-10-18 Thread Bill Thayer
Oh. So that's why a reference field should not be named the same as the table it's referencing. In this case I didn't make the name but generally I do that all the time. Didn't realize that it makes error messages clearer. Duh. -Bill --

Re: [web2py] [FYI] Pyodel is now a plugin

2012-10-18 Thread Alan Etkin
El jueves, 18 de octubre de 2012 12:29:17 UTC-3, Bill Thayer escribió:Just tried it again. Logged in with my email and password then it took me to a blank page with one line on top that says to sign in with google password. I must admit this is some kind of app issue. However, I have

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Don_X
in 0.db I have : settings.migrate = True in db.py I have db.define_table('auth_user', Field (.,Field(), ... Field... bla bla bla .

[web2py] Re: How to access the auth tables in appadmin?

2012-10-18 Thread mikech
Thanks Bill. What I'm trying to find out is how do I access the tables involved with security. Do I need to create views, or is there already some associated with the appadmin? On Wednesday, October 17, 2012 7:55:02 PM UTC-7, Bill Thayer wrote: Try this: In db.py: from gluon.tools import

[web2py] Re: Web2Py on OpenShift

2012-10-18 Thread apps in tables
Thank you Andrew... There is no need for apology. The most thing i like about web2py is the community...very supportive. After adding the hashed password, the admin works fine. Now, to the github issues Regards, Ashraf On Thursday, October 18, 2012 5:18:32 PM UTC+3, Andrew wrote:

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Marin Pranjić
On Thu, Oct 18, 2012 at 4:20 PM, Don_X don.clerm...@gmail.com wrote: hello web2py users, I get the error : class '_mysql_exceptions.OperationalError' (1005, Can't create table ...bla bla bla .. It's hard to say without any code but from your error, I guess problem is with foreign

[web2py] Re: Error on OpenShift deploy

2012-10-18 Thread apps in tables
Hi, I had a similar issue. try: https://groups.google.com/forum/?fromgroups=#!topic/web2py/DJvC9FMNohE Regards, Ashraf On Wednesday, October 17, 2012 10:11:32 PM UTC+3, Relsi Hur wrote: Hello, I try to deploy a app int the OpenShift using this option in the admin, but I have a error.

[web2py] auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I want to read the content of a wiki page into my view: views/mycontroller/mypage.html using: {{=auth.wiki(my-wiki-slug') }} auth.wiki is on a function in: controllers/default.py If the wiki page is found then it works OK. If the wiki page is not found, then it redirects to:

[web2py] Cron task help

2012-10-18 Thread Mike Anson
I would like to have posted my question right here but with I was unable to post it perhaps due to character count of the question being +800 So I posted it on Stackoverflowhttp://stackoverflow.com/questions/12960138/web2py-cron-task-debug . Any help would be greatly appreciated. --

[web2py] Re: How to access the auth tables in appadmin?

2012-10-18 Thread Bill Thayer
Sounds like those auth_ tables are not defined. If you already have those lines in your db.py then the tables should be listed in your apadmin. If so then you just follow the instructions in my other post. https://groups.google.com/d/msg/web2py/AEBFWeS8YSA/2LWC4NqdaiAJ to get the permissions

[web2py] Re: How to access the auth tables in appadmin?

2012-10-18 Thread mikech
Hi Bill don't want to take up much of your time. I've verified that the auth_* tables are defined using a sqllite2009 pro. I've included a screen shot attached. And I've also included a screenshot of the appadmin page which shows just 2 files image and comment. This is consistent with the

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I guess we don't need {{=auth.wiki('slug')}} to read a wiki page into a view because we can just use LOAD(). So maybe we should just deprecate it (if it was ever official). --

[web2py] REF: Active Directory with group support

2012-10-18 Thread Teddy Nyambe
I have a problem with group support with web2py. The following basic AD configuration works fine: from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods = [ldap_auth(mode='ad', server='xxx.xxx.xxx.xxx', # IP Address base_dn='dc=example,dc=co,dc=zm')] # Base

[web2py] SQLFORM.grid 2.1.1 backward compatibility issue

2012-10-18 Thread weheh
I have a datetime field I want to represent differently using a lambda function. Instead of datetime, I want a timedelta. This was not a problem with version 1.99.x but is a problem with 2.1.1 because grid tries to do a row.year, which throws this ticket: Traceback (most recent call last):

[web2py] Re: unable to submit auth forms

2012-10-18 Thread Rohan Malhotra
On Thursday, 18 October 2012 02:51:52 UTC+5:30, Massimo Di Pierro wrote: What is the code? Is this something that worked before? using a custom form? On Wednesday, 17 October 2012 09:17:57 UTC-5, Rohan Malhotra wrote: Version 2.1.1 (2012-10-15 12:44:40) stable Hi, I am not able to

[web2py] Loading modules fails - web2py 2.1.1(and earlier) / python 2.7.1 / Mac OS X

2012-10-18 Thread Luciano Laporta Podazza
Hello, first of all thank you Massimo and you people for this awesome framework! I'm in love with it! :D I've tried to load some facebook modules and none of them works, at least on Mac OS. This is what I did: 1. Get facebook api from one of these repos:

[web2py] Form, with Dropbox and distinct values from db.

2012-10-18 Thread Jason Jeremias
So I'm trying out Web2py, I'm a complet newbie. I've been using python to write CGI for years, I have python cgi that I use to display data from mysql db. Its pretty simple and I thought I'd trying to recreate it using web2py. Basically its a simple html form that has a drop box and a

Re: [web2py] buttons=['submit','reset','cancel'] and INPUT helpers

2012-10-18 Thread Richard Vézina
Hello Annet, Don't know if it relevant, but Massimo add this recently : https://groups.google.com/d/msg/web2py/X5RCYHpckh0/Ut3ijuxiLqAJ from = SQLFORM(...) form.add_button(Cancel,URL(r=request,f='new_contact')) You can do that to : form.add_button(T('Cancel'), javascript:void(history.go(-1)))

[web2py] Re: Cron task help

2012-10-18 Thread Massimo Di Pierro
Since web2py 2.1. you need -Y to enable cron, it is now disabled by default. On Thursday, 18 October 2012 12:18:07 UTC-5, Mike Anson wrote: I would like to have posted my question right here but with I was unable to post it perhaps due to character count of the question being +800 So I

[web2py] Re: How to access the auth tables in appadmin?

2012-10-18 Thread Massimo Di Pierro
Is it possible you have two db = DAL(...) in your code (perhaps in different model files)? On Thursday, 18 October 2012 12:36:00 UTC-5, mikech wrote: Hi Bill don't want to take up much of your time. I've verified that the auth_* tables are defined using a sqllite2009 pro. I've included a

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread Massimo Di Pierro
Can I see your controller? On Thursday, 18 October 2012 12:11:21 UTC-5, villas wrote: I want to read the content of a wiki page into my view: views/mycontroller/mypage.html using: {{=auth.wiki(my-wiki-slug') }} auth.wiki is on a function in: controllers/default.py If the wiki page is

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Don_X
Let me try to keep it simple .. because I don't want to pollute this thread with many tables and fields OK ... initially everything was working OK ! I had 3 models files like the followings : 0.py, db.py menu.py in 0.dy I had : from gluon.storage import Storage settings = Storage()

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Marin Pranjić
If MySQL reports an error number 1005 from a CREATE TABLE statement, and the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed. Similarly, if an ALTER TABLE fails and it refers to error 150, that means a foreign key

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Niphlod
Let's make it one step futher in being explicit in explanations. There are no much specifics to discuss about conditional models because it's easy to understand the flow logic. assuming you have controllers/default.py controllers/test.py controllers/foo.py controllers/bar.py models/db.py

[web2py] Re: How to access the auth tables in appadmin?

2012-10-18 Thread mikech
I uninstalled the images app and reinstalled it using the wizard rather than the new simple app option. The auth tables show up now. So, it depends on how the app is setup Mike On Thursday, October 18, 2012 10:59:02 AM UTC-7, Massimo Di Pierro wrote: Is it possible you have two db = DAL(...)

[web2py] Re: Problems compiling

2012-10-18 Thread rick817
Hi all, I've finally had the chance to track down the source of the problem. The simple explanation is that gluon/compileapp.py attempts to compile all the files in the project's view directory regardless of whether they are: a) .html files b) part of the current project I

[web2py] Is this possible?

2012-10-18 Thread Richard
Hello, Is it possible to do that? db.define_table(... Field(... label=T(dblabels_en[db.table._tablename+db.table.field.name]) I can do db.define_table(...) db.table.field.lable=T(dblabels_en[db.table._tablename+db.table.field.name]) Inside table model definition table is not yet define

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Don_X
Thank you gentlemen for your input ! Niphlod .. i understood the flow logic from the start .. even before I tried it, that is why I tried it ! ... what kept my attention is the response above yours ! The flow logic was easy to comprehend ! ... but : It seems From Marin's answer, the tables

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Richard Vézina
I think you just need to make sure that each model you refer get defined before it get refer. Since web2py parse model files in alphanumeric you have to make sure the model file that contain your table definition is at the right place. I am not sure how web2py parse the sub-folder, it may parse

Re: [web2py] I am looking for specifics : how to db.define_table in sub directories in the MODELS directory !

2012-10-18 Thread Niphlod
so you were missing the table logic creation. There are two methods: db.define_table('test1', Field('foo') ) db.define_table('test2', Field('bar', db.test1) ) or db.define_table('test2', Field('bar', 'reference test1') ) So. 1st method needs db.test1 defined in the environment.

Re: [web2py] Re: tags and speed

2012-10-18 Thread andrej burja
hi for all possible tags i use: all_tags = db().select(db.t_tag.f_name,distinct=True) in database i have first table games with filds title, age, group, instruction and i have also two other tables: tags and equipment and when i show the data, i'm using Datatables (with general search and

Re: [web2py] Is this possible?

2012-10-18 Thread Niphlod
you are asking to python to evaluate a variable that doesn't exists. It seems that you know the tablename and fields in advance (because dblabels_en is somewhat filled already) so why can't you just tablename = 'test1' db.define_table(tablename, Field('foo', label=T(dblabels_en[%s_foo %

[web2py] Re: Problems compiling

2012-10-18 Thread Niphlod
You're right, but you're asking that web2py knows in advance all the possible combinations of your view fragments your app uses and what your app doesn't. I'd say we can only make the error message clearer, but we can't know what is to be considered trash or not in your views folder On

[web2py] Re: Problems compiling

2012-10-18 Thread Niphlod
If Massimo agrees, I opened an issue an posted a patch here http://code.google.com/p/web2py/issues/detail?id=1101 --

Re: [web2py] Is this possible?

2012-10-18 Thread Richard Vézina
I still gettype 'exceptions.AttributeError' 'DAL' object has no attribute 'table1' You right that I didn't need call db.table._tablename and db.table.field.name... I was just trying something else before then I forget I didn't need to call those attributes. Anyway, I think it is not possible

[web2py] Re: cron not work in 2.0.9

2012-10-18 Thread Márcio
I upgraded to version 2.1.1 and still did not work. Any idea? In version 1.99.7 works perfect. Em quinta-feira, 11 de outubro de 2012 18h48min21s UTC-3, Massimo Di Pierro escreveu: Sorry this took forever. This is now fixed. On Tuesday, 2 October 2012 21:51:46 UTC-5, Márcio wrote: Massimo,

[web2py] is there a way to do something like that (tooltip and label)

2012-10-18 Thread Richard
Hello, I would like to append a tooltip beside labels, something like that : db.table.field.label = T(dblabels[concat]), A(I(_class='icon-info-sign'), _href=##, _id=example1, _rel=popover, **{'_data-content': 'Help comment here!', '_data-original-title': 'Help comment title...'}) Not

Re: [web2py] is there a way to do something like that (tooltip and label)

2012-10-18 Thread Bruno Rocha
Try this: db.table.field.label = *CAT(*T(dblabels[concat]), A(I(_class='icon-info-sign'), _href=##, _id=example1, _rel=popover, **{'_data-content': 'Help comment here!', '_data-original-title': 'Help comment title...'})*)* --

[web2py] Re: Problems compiling

2012-10-18 Thread rick817
On Thursday, October 18, 2012 10:06:03 PM UTC+1, Niphlod wrote: If Massimo agrees, I opened an issue an posted a patch here http://code.google.com/p/web2py/issues/detail?id=1101 Thanks for opening the issue Niphlod. While I realise that not all files defining views will end in .html I

Re: [web2py] Is this possible?

2012-10-18 Thread Niphlod
you are calling db.table1 somewhere. In my code there is no db.table1 at alljust tried, works. Readable example tablename = 'test1' labels = dict(test1_foo='test1label') db.define_table(tablename, Field('foo', label=labels[%s_foo % tablename]) ) BTW: you'd be better off separating

[web2py] auth.wiki documentation?

2012-10-18 Thread HittingSmoke
I'm trying to build a simple blog with web2py. I see auth.wiki and plugin_wiki are two different entities which as far as I can tell fulfill much the same functions. Is there any advanced documentation on auth.wiki similar to the plugin_wiki chapter in the book? --

[web2py] Subdomain routing with plugin_wiki

2012-10-18 Thread HittingSmoke
I tried installing plugin_wiki for a simple blog app and I can't get it to work with subdomain routing. I had routes.py setup to direct blog.domain.com to my app 'blog'. When I installed plugin_wiki in the blog app I couldn't access it though. Whenever I tried to load

Re: [web2py] Re: tags and speed

2012-10-18 Thread Niphlod
old mean bad thing about normalized vs denormalized model. Don't know what you read in the cookbok, but here's the thing. You have a game pacman that is tagged as arcade, and a game invaders tagged as horror First things first: you may want to change horror to needs parent around later in the

[web2py] Re: How to access the auth tables in appadmin?

2012-10-18 Thread Massimo Di Pierro
I think you simply had some additional model files that override the db variable. On Thursday, 18 October 2012 14:36:15 UTC-5, mikech wrote: I uninstalled the images app and reinstalled it using the wizard rather than the new simple app option. The auth tables show up now. So, it depends

[web2py] Re: Auth Wiki functionality?

2012-10-18 Thread villas
Hi Bill If you are considering creating table relationships with auth.wiki, I think you should design and implement your own ideas. In the end you will not have spent any more time, but the difference is that you will thoroughly understand all your own code and be able to fix and extend it

[web2py] Re: cron not work in 2.0.9

2012-10-18 Thread Massimo Di Pierro
In 2.1.1 you need to use the -Y option since cron is off by default. On Thursday, 18 October 2012 16:11:55 UTC-5, Márcio wrote: I upgraded to version 2.1.1 and still did not work. Any idea? In version 1.99.7 works perfect. Em quinta-feira, 11 de outubro de 2012 18h48min21s UTC-3, Massimo Di

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I already posted a longer answer, which appears to have disappeared. However, my controller was simply something like def article(): auth.wiki() BTW if I start a commandline session like this: python web2py.py -S myapp -M db.tables Then none of my auth.wiki tables are defined. Can I

[web2py] Wiki Body CLOB class 'cx_Oracle.DatabaseError' ORA-01704: string literal too long?

2012-10-18 Thread Bill Thayer
Using the auth.wiki I am defining my menu. When I hit submit I get the error below. The menu I wrote in is currently long I guess but it couldn't be more than 4000 bytes (oracle CLOB length) could it? Perhaps it's the HTML that gets stored in the DB?...That's what I suspected then I

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread Bill Thayer
This is in my db.py. Allen told me to add the second line after calling auth.define_tables auth.define_tables(username=True, signature=False, migrate=True,fake_migrate =True) auth.wiki(resolve=False) the second line calls the wiki() function to create the tables. Regards, Bill --

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread Bill Thayer
Back on the original topic. When I click on a menu item I also get re-directed back to the _create page. Is this a permission thing perhaps? Now that I mention it, isn't there supposed to be a field to select the permission level for the page? --

[web2py] Re: auth.wiki() '_create' doesn't redirect properly

2012-10-18 Thread villas
I tried it and that defined the tables. Thanks Bill! On Friday, October 19, 2012 1:24:45 AM UTC+1, Bill Thayer wrote: This is in my db.py. Allen told me to add the second line after calling auth.define_tables auth.define_tables(username=True, signature=False,

[web2py] Re: response.stream

2012-10-18 Thread weheh
This thread seems to have the answer: https://groups.google.com/forum/?fromgroups=#!searchin/web2py/content$20disposition/web2py/61vbQQ6_-vk/zqfK4qCXxdEJ The key is to use _onclick='window.open(%s);' % URL(...download script ...) This works OK, but, to be blunt, it's fugly the way it performs

[web2py] Re: IS_NOT_IN_DB() and update SQLFORM.factory

2012-10-18 Thread villas
The validators do not seem correct. Maybe try them separately: Field('name',default='',notnull=True,unique=True), Then after the table defined... is_not_in_db=IS_NOT_IN_DB(db,'hub.name',error_message='name already in database') db.hub.name.requires= [IS_NOT_EMPTY(),is_not_in_db] On

[web2py] Has anyone seen any difference with response.flash since upgrading to 2.1.1?

2012-10-18 Thread weheh
Has anyone seen any difference with response.flash since upgrading to 2.1.1? --

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread weheh
I am now seeing this issue again on 2.1.1. I'm getting True from is_tracking_changes() but a change in one of my modules isn't showing in the browser. On Tuesday, October 16, 2012 4:15:42 AM UTC+8, David Marko wrote: I have a module in my app that i was working on extensively today. I

[web2py] Is this possible: html link with ajax response?

2012-10-18 Thread weheh
I want to follow a link AND get a response from an ajax request. Something like this: A('link text', _href=URL(...), _onclick='alert(test); jQuery(somediv).html(foobar).show();') Is that possible? --