Re: [web2py] Re: routest_onerror don't work after deploy

2012-12-13 Thread Chris
On Thursday, December 13, 2012 12:11:06 AM UTC-5, Jonathan Lundell wrote: > > ... > What are we really trying to accomplish here? Ordinarily, static requests > a) won't be handled by web2py at all; they'll be intercepted by the server, > and b) they'll be references to resources embedded in a h

[web2py] How to select(count<1, groupby=db.person) or how to find persons with no dogs/less than x dogs.

2012-12-13 Thread François Delpierre
So, for instance : db().select(db.person.name, db.person.id.count(), groupby=db.person.id, left=db.dog.on(db.person.id==db.dog.person_id)) will give me the person, and the number of dogs that this person has. But I only want to get persons with no dogs. Regards, --

Re: [web2py] Re: Auth.wiki() classes in tags

2012-12-13 Thread Andrew W
Also, with Images I can do left , right, center. Can I do something like a css clear / clear: both ? On Friday, December 14, 2012 6:35:11 AM UTC+13, viniciusban wrote: > > I need to identify images by its location. When they're inside a > table, it's easier because I can attach a class to the ta

[web2py] Re: count distinct

2012-12-13 Thread Andrew W
Does your dbms support count(distinct ) ? What happens if you only put one column in COUNT(DISTINCT vista.municipio) ? On Friday, December 14, 2012 1:13:32 PM UTC+13, Niphlod wrote: > > it may help knowing what are you trying to count (e.g. write down the > plain sql syntax you'd like to fire

Re: [web2py] Re: Auth.wiki() documentation

2012-12-13 Thread Andrew W
Hi Alan, I have been checking out auth.wiki to see what can be done, in particular how to get different page layouts within the one "index" controller and view. Would you wrap something like this example (from the slice) in an if clause ? Or, I imagine you could use this scenario for boilerplat

[web2py] Re: count distinct

2012-12-13 Thread Niphlod
it may help knowing what are you trying to count (e.g. write down the plain sql syntax you'd like to fire, or explain with a sample table what resultset you expect) On Friday, December 14, 2012 1:01:37 AM UTC+1, Manuele wrote: > > Hi! > trying this simple query I got this error: > > ipdb> db(q

[web2py] latest trunk: 2.3.0 (2012-12-13 12:53:52) rc - name tb is not defined

2012-12-13 Thread Adi
Just tried to use database administration on existing tables... 1. 2. 3. 4. 5. 6. 7. Traceback (most recent call last): File "/Users/adnan/web2py209/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/Users/adnan/web2py209/applications/dev_thanemobile/views/a

[web2py] Re: Web2py scheduler timeout

2012-12-13 Thread Niphlod
unless your tasks have a very narrow period they shouldn't go on timeout on SQLite (remember to commit if acting on the tables within a task). W2P_TVSeries uses 500-600 tasks with a "watcher" task coordinating those and it doesn't block. "Upgrading" to Mysql or PostgreSQL will fix the issue if t

[web2py] count distinct

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

[web2py] lot's of X's in error responses

2012-12-13 Thread howesc
in http.py there exists this block: if isinstance(body, str): if len(body) < 512 and \ headers['Content-Type'].startswith('text/html'): body += '' % ('x' * 512) # trick IE when i'm using request.restful i don't necessarily

Re: [web2py] Re: Auth.wiki() documentation

2012-12-13 Thread Vinicius Assef
Thank you, Alan. Really useful. On Thu, Dec 13, 2012 at 7:15 PM, Alan Etkin wrote: > El jueves, 13 de diciembre de 2012 11:42:02 UTC-3, viniciusban escribió: >> >> Agree in part, Massimo. >> >> This feature is very good. Really! >> > > I have posted a slice about auth.wiki here. It covers a co

Re: [web2py] Re: Auth.wiki() documentation

2012-12-13 Thread Alan Etkin
El jueves, 13 de diciembre de 2012 11:42:02 UTC-3, viniciusban escribió: > > Agree in part, Massimo. > > This feature is very good. Really! > > I have posted a slice about auth.wiki here. It covers a couple of features not docum

[web2py] Cannot set string field to None

2012-12-13 Thread Florian Letsch
I have a few additional fields set on my db_auth table, mainly in order to implement a simple invite system: auth.settings.extra_fields['auth_user']= [ Field('invite_sent', 'datetime', default=None), # None for activated users Field('invite_key')] When the invite has been accepted, I want

[web2py] Re: Web2py scheduler timeout

2012-12-13 Thread Mike D
I have only this one task. I am certainly going to change the retry_failed and hopefully that will be a sufficient solution. I actually tried your other solution a while ago and that "monitoring" task actually ended up in a TIMEOUT state as well. Sad face. Any idea on that one? Do you think tha

[web2py] Re: XML response

2012-12-13 Thread Niphlod
you can set it BEFORE returning anything with response.view (e.g. for a function needing views/randomfolder/index.xml it would be response.view = 'randomfolder/index.xml') On Thursday, December 13, 2012 5:39:54 PM UTC+1, Charis wrote: > > I have managed to setup an xml response through index.xml

[web2py] Re: Web2py scheduler timeout

2012-12-13 Thread Niphlod
All my statements were made under the assumption that the scheduler_run table showed absolutely no trace of the TIMOUTted task. In any case, running the scheduler on SQLite is "safe" only for 1 or 2 workers and not with a zillion of tasks. Concurrency was never a friend of SQLite. BTW, at thi

[web2py] Re: Enhancement idea: Field addition for "help" information

2012-12-13 Thread Joe Barnhart
But adding the attributes to the Field object doesn't help -- I do not get the Field when the SQLFORM is built using the "formstyle" function. Since it has no access to Field it can't see the extra attributes -- its only access is the tuples passed from SQLFORM. But I agree the DIV() helper is

Re: [web2py] Re: web2py 2.3.1?

2012-12-13 Thread Vasile Ermicioi
yes, now it works --

[web2py] Re: Web2py scheduler timeout

2012-12-13 Thread Mike D
I am using SQLite. The TIMEOUT record in the scheduler_run table eventually shows up. I can't be sure when since it normally happens over night. I don't know how to raise a timeout but if you tell me I can try that. That would help narrow down the issue because if the DB is locked I would not s

Re: [web2py] Re: How to "fix" CRYPT differences between Windows and Linux?

2012-12-13 Thread JoeCodeswell
Dear Jonathan, Thanks for the reply. You said "... shouldn't be necessary to use the same (or no) salt on different installations for passwords to work correctly ..." That set me to make an experimental app, to test the passwords, pwt. Here are my notes from that experiment which compares pwt w

Re: [web2py] Re: Auth.wiki() classes in tags

2012-12-13 Thread Vinicius Assef
I need to identify images by its location. When they're inside a table, it's easier because I can attach a class to the table. I'll refine it a bit more. I just watched a talk about responsive web design with some ideias I think will help me. BTW, is there a way to type HTML tags inside my Markmi

[web2py] Re: web2py 2.3.1?

2012-12-13 Thread Massimo Di Pierro
Thanks for checking this. I guess when I testing it was picking pycrypto and not gluon.contrib.aes. I think it is fixed in trunk. Can you please double check? On Thursday, 13 December 2012 11:18:26 UTC-6, Vasile Ermicioi wrote: > > looks like signed cookies based session is broken > > I get this

[web2py] Re: Enhancement idea: Field addition for "help" information

2012-12-13 Thread Joe Barnhart
You open my eyes, Anthony. Your ideas are excellent and I can put them to use without needing any structural change in web2py. I had not considered the fact that the comment field can contain HTML itself. I now have a lot to think about! -- Joe B. On Wednesday, December 12, 2012 10:07:40 PM

[web2py] Re: Enhancement idea: Field addition for "help" information

2012-12-13 Thread Massimo Di Pierro
Mind that nothing prevents you form doing this: db.define_table('mytable',Field('myfield')) db.mytable.myfield.label = 'myfield name' db.mytable.myfield.comment = 'comment about the field' db.mytable.myfield.help = 'help about the field' db.mytable.myfield.popup = 'popup info about the field' etc

[web2py] Re: web2py 2.3.1?

2012-12-13 Thread Vasile Ermicioi
looks like signed cookies based session is broken I get this error, 3. 4. 5. 6. 7. 8. 9. 10. 11. Traceback (most recent call last): File "D:\dev\web2py-trunk\gluon\main.py", line 576, in wsgibase session._try_store_in_cookie_or_file(request, response) File "D:\dev\web2py-trunk\gluon\gl

[web2py] Re: Enhancement idea: Field addition for "help" information

2012-12-13 Thread Joe Barnhart
The website I am replacing has a "third tier" of info -- it has the field label, the field comment, AND a popup (which can be more than one paragraph). If I just store the extensive help in the comment field, I will lose the comment itself. Anthony has opened my eyes regarding the comment fie

[web2py] Re: IS_IN_DB Referencing Label

2012-12-13 Thread Kostas M
Thanks a lot Anthony! I think this should go to the book's documentation. --

Re: [web2py] Re: Auth.wiki() classes in tags

2012-12-13 Thread Massimo Di Pierro
I agree with that and think it is a good idea. You can make the CSS device dependent but that is outside the markup language scope. Perhaps I am missing something. On Thursday, 13 December 2012 08:51:35 UTC-6, viniciusban wrote: > > Yes, you're right, Massimo. > > So, let's try to solve this k

[web2py] Re: XML response

2012-12-13 Thread Charis
I have managed to setup an xml response through index.xml. How do I set the default view for only the particular controller to be the index.xml file instead of the index.html? Thank you, Charis On Thursday, 13 December 2012 15:22:47 UTC, Niphlod wrote: > > Plenty of ways: > - you code a c

[web2py] Re: include more than one page

2012-12-13 Thread Anthony
Make sure navbar.html does not include {{extend 'layout.html'}} -- it doesn't need to extend layout.html because the main view for the page does that -- it simply needs to be included in the layout. Anthony On Thursday, December 13, 2012 9:40:32 AM UTC-5, BlueShadow wrote: > > well I was a litt

[web2py] Re: IS_IN_DB Referencing Label

2012-12-13 Thread Anthony
The label can be a callable: label=lambda r: db.auth_user(r.member).username Anthony On Thursday, December 13, 2012 11:13:43 AM UTC-5, Kostas M wrote: > > I have a table Lab_members: > db.define_table('lab_members', > Field('member',db.auth_user, > represen

[web2py] IS_IN_DB Referencing Label

2012-12-13 Thread Kostas M
I have a table Lab_members: db.define_table('lab_members', Field('member',db.auth_user, represent=lambda member,row: str(member.username) ), ) and now I create a second table, having a Field: Field('

[web2py] Re: XML response

2012-12-13 Thread Niphlod
Plenty of ways: - you code a controller/function.xml template in the views folder - you leverage the generic.xml view just ending your address in .xml - you return the xml directly from the controller (return something instead of return dict(something=something)) The point is mainly "what k

Re: [web2py] Re: Auth.wiki() classes in tags

2012-12-13 Thread Vinicius Assef
Yes, you're right, Massimo. So, let's try to solve this kind of situation I'm facing right now: I have a page with images that must be seen among different devices (pc, tablet and smartphone). I can fix image length inside its tag (in markmin), but its size will vary, proportionally, according to

Re: [web2py] Re: Auth.wiki() reporting 401 unauthorized

2012-12-13 Thread Vinicius Assef
Thank you for clarifying. I think it's important to mention that in docs. On Thu, Dec 13, 2012 at 12:36 PM, Massimo Di Pierro wrote: > The fist registered use is auth_editor automatically but you login with a > previous user (created before enabling auth_wiki) you have to use appadmin > to make

Re: [web2py] Re: Auth.wiki() documentation

2012-12-13 Thread Vinicius Assef
Agree in part, Massimo. This feature is very good. Really! We'll change documentation scenario soon. :-) On Thu, Dec 13, 2012 at 12:35 PM, Massimo Di Pierro wrote: > The docs is not there yet. A good reason not to congratulate yet. :-( > > > On Thursday, 13 December 2012 04:53:31 UTC-6, vinic

[web2py] Re: include more than one page

2012-12-13 Thread BlueShadow
well I was a littlebit to quick web2py gives me an error message : RuntimeError: maximum recursion depth exceeded in cmp do I have to do something other than extend layout in my Navbar? On Thursday, December 13, 2012 3:29:31 PM UTC+1, BlueShadow wrote: > > thanks anthony yo are awesome > > On

[web2py] Re: Auth.wiki() classes in tags

2012-12-13 Thread Massimo Di Pierro
I do not doubt this would be useful but do we want to transform the wiki syntax in a markup language? I think of the purpose of the wiki syntax is make sure the user has no freedom in messing up style info. If the user can set the class of tags they can break the page presentation. On Thursday,

[web2py] XML response

2012-12-13 Thread Charis
Hi all, I would like to ask how I can generate an XML response to the views instead of html (index.xml instead of index.html) Thank you, Charis --

[web2py] Re: Auth.wiki() reporting 401 unauthorized

2012-12-13 Thread Massimo Di Pierro
The fist registered use is auth_editor automatically but you login with a previous user (created before enabling auth_wiki) you have to use appadmin to make the user editor. On Thursday, 13 December 2012 07:16:59 UTC-6, viniciusban wrote: > > SOLVED. > > I registered a new user but, for some re

[web2py] Re: Auth.wiki() documentation

2012-12-13 Thread Massimo Di Pierro
The docs is not there yet. A good reason not to congratulate yet. :-( On Thursday, 13 December 2012 04:53:31 UTC-6, viniciusban wrote: > > I want to congratulate who implemented the Auth.wiki() feature. It's > really amazing and powerful. \o/ > > Where's its documentation? I'm folowing plugin_wi

[web2py] Re: Starting WEB2Py over network

2012-12-13 Thread Massimo Di Pierro
I am not sure I fully understand your quesiton/questions. if you only want to expose one application you can use damin and disable the other ones. You choose a host machine and you run it there from ip 0.0.0.0 and port 80. Other machines in the network can access it at http:///yourapp assuming

[web2py] Re: Store and retrieve dictionary from database

2012-12-13 Thread Massimo Di Pierro
It is in the online book. I will make a 5th ed pdf and printed asap. On Thursday, 13 December 2012 00:09:34 UTC-6, Andriy wrote: > > Thank you. Its very easy and it works! I knew I should read online version > of the book as it is more updated. This is the case. I was reading through > web2py_ma

[web2py] Re: Enhancement idea: Field addition for "help" information

2012-12-13 Thread Massimo Di Pierro
I am not not convinced we need both comment and help. I think one can simply strore the commend in help (without being a dict) and use jQuery to turn the visualization of the comment (help) into a popup. On Thursday, 13 December 2012 00:07:40 UTC-6, Anthony wrote: > > One option is to build it i

Re: [web2py] Re: question about web2py VERSION number

2012-12-13 Thread Massimo Di Pierro
Usually 2.X.0 are release candidates. 2.X.1 is the first stable release and 2.X.Y are bug fixes stable releases. 2.2.1 is an exception since we did not release any bug fixes. This is because 2.2.1 was release soon after 2.1.something and itself contained many bug fixes. On Wednesday, 12 Decembe

[web2py] Re: include more than one page

2012-12-13 Thread BlueShadow
thanks anthony yo are awesome On Thursday, December 13, 2012 2:43:39 PM UTC+1, Anthony wrote: > > {{include 'path/to/navbar.html'}} > > Note, the path is relative to the /views folder. > > Anthony > > On Thursday, December 13, 2012 8:25:56 AM UTC-5, BlueShadow wrote: >> >> Hi, >> I like to include

[web2py] Re: can't open my database Administration anymore

2012-12-13 Thread BlueShadow
for some reason some of the posts here are missing. Well I figured it out. The Problem was that I declared a variable twice in the layout.html once for the right and once for the left sidebar. which was no problem when viewing the website but when I opened the Databaseadministration the errow po

[web2py] Re: Reason(s) why mod_wsgi is not installed be hosting companies?

2012-12-13 Thread Massimo Di Pierro
fcgi should work but try upload and download of large files. That's the only thing I would be uncertain about because I do I am not sure how they work with fcgi. On Wednesday, 12 December 2012 22:36:11 UTC-6, rh wrote: > > On Wed, 12 Dec 2012 18:49:10 -0800 (PST) > Massimo Di Pierro > > wrote:

[web2py] OpenShift supports web2py

2012-12-13 Thread Massimo Di Pierro
https://openshift.redhat.com/community/get-started/python --

[web2py] Ldap + Web2py Dev

2012-12-13 Thread PyUser
Hello All How can I check whether my Web2py application is successfully able to connect to an ldap server??? --

[web2py] Re: Store and retrieve dictionary from database

2012-12-13 Thread Andriy
Thank you. Its very easy and it works! I knew I should read online version of the book as it is more updated. This is the case. I was reading through web2py_manual_4th.1.pdf and filter_in - filter_out is not mentioned there. --

[web2py] Re: include more than one page

2012-12-13 Thread Anthony
{{include 'path/to/navbar.html'}} Note, the path is relative to the /views folder. Anthony On Thursday, December 13, 2012 8:25:56 AM UTC-5, BlueShadow wrote: > > Hi, > I like to include more than one page in my layout is that possible? > > The reason for it: > My Navbar is getting really big and

[web2py] include more than one page

2012-12-13 Thread BlueShadow
Hi, I like to include more than one page in my layout is that possible? The reason for it: My Navbar is getting really big and I like to put it in a diffrent file. So other solotions would be also appriciated. --

[web2py] Auth.wiki() classes in tags

2012-12-13 Thread Vinicius Assef
According to plugin_wiki documentation, I can personalize classes just in and . How about allowing images and link classes, too? Maybe lists, too. I thought in something like attributes in web2py helpers: DIV(_class="myclass"). In images, it would be: [[myimage attachment:3.png center 200px _cla

[web2py] Re: Auth.wiki() reporting 401 unauthorized

2012-12-13 Thread Vinicius Assef
SOLVED. I registered a new user but, for some reason, Auth.wiki() didn't authorized me in "wiki_editor" group. I'll try to reproduce this in localhost. On Thu, Dec 13, 2012 at 9:58 AM, Vinicius Assef wrote: > Again, about auth.wiki(). > > It's woking like a charm in localhost, but I'm gettin

Re: [web2py] Re:Auth.wiki()

2012-12-13 Thread Vinicius Assef
http://web2py.com/books/default/chapter/29/12#plugin_wiki On Thu, Dec 13, 2012 at 10:42 AM, Teddy Nyambe wrote: > And the documentation? I want to build a site based on web2py... > > On Dec 13, 2012 2:18 PM, "Vinicius Assef" wrote: >> >> Auth.wiki() is the plugin_wiiki embedded into Auth. >> >>

Re: [web2py] Re:Auth.wiki()

2012-12-13 Thread Teddy Nyambe
And the documentation? I want to build a site based on web2py... On Dec 13, 2012 2:18 PM, "Vinicius Assef" wrote: > > Auth.wiki() is the plugin_wiiki embedded into Auth. > > > > On Thu, Dec 13, 2012 at 10:12 AM, Teddy Nyambe wrote: > > What is Auth.wiki() there is little or no document on it. >

Re: [web2py] Re:Auth.wiki()

2012-12-13 Thread Vinicius Assef
Auth.wiki() is the plugin_wiiki embedded into Auth. On Thu, Dec 13, 2012 at 10:12 AM, Teddy Nyambe wrote: > What is Auth.wiki() there is little or no document on it. > > Sent from my iPad > > -- > > > --

[web2py] Re:Auth.wiki()

2012-12-13 Thread Teddy Nyambe
What is Auth.wiki() there is little or no document on it. Sent from my iPad --

[web2py] Auth.wiki() reporting 401 unauthorized

2012-12-13 Thread Vinicius Assef
Again, about auth.wiki(). It's woking like a charm in localhost, but I'm getting error 401 UNAUTHORIZED in my test environment. I didn't write a specific view for it, but I allowed generic views to any host, in db.py. Is there another configuration I must adjust to auth.wiki() run in a real serv

[web2py] Custom Button not working as intended, on SQLFORM.grid

2012-12-13 Thread Ashish Yadav
Hello, I am new to Web2Py so please guide me on this. I have a file modules/xyz.py where I've created a custom button on SQLFORM.grid as - def list_all(self): links = [lambda row: TAG.a('+', _class="btn", _href=URL(self.allow_delete(), vars=dict(id=row.id)))] self.context.grid = S

[web2py] Re: Web2py scheduler timeout

2012-12-13 Thread Niphlod
are you using sqlite ? It's possible that the timeout is reached because database is locked and the scheduler_run record (that you confirm is missing) can't be inserted. Also, just to be sure, did you try raising the timeout? If I cannot fix it I will have to find a different solution for dire

Re: [web2py] Re: Default value for reference type

2012-12-13 Thread kostas mouts
Thank you for the clarification! --

[web2py] Starting WEB2Py over network

2012-12-13 Thread Seelife
Hi Folks, If this is a basic question, my apologies. I have an App Ive built in web2py. Ican run on my local computer or place the whole web2py installation on a shared network disc, access web2py.exe and start up the browser & open my app and all works fine. But here are the questions : How do