Re: [web2py] Re: is_impersonating() as boolean in menu

2012-08-02 Thread Massimo Di Pierro
Clearly there is a problem with that function. If auth is defined, I'd expect >>> a=dict() >>> 'x' in a False >>> a=dict(x=1) >>> 'x' in a True >>> The problem I have is that it fails when the user is not logged in. Perhaps this is the related to your problem? I have a possible fix in trunk. P

Re: [web2py] Re: is_impersonating() as boolean in menu

2012-08-02 Thread Martin Weissenboeck
Interesting results (Version 2.00.0 (2012-08-02 21:51:02) dev) >From tools.py: def is_impersonating(self): return 'impersonator' in current.session.auth The return value of is_impersonating is not False or True but None or the whole current.session.auth as string. A change in tools.p

[web2py] Re: Web2py book 4th edition, online

2012-08-02 Thread Massimo Di Pierro
I did not do any edits but some users did. I am not sure about the entity of the changes because I have not reviewed them. On Friday, 3 August 2012 00:24:39 UTC-5, Andrew wrote: > > Hi Massimo, > The 4th edition book has been on the web for a while. Just wondering if > there have been any incr

[web2py] Web2py book 4th edition, online

2012-08-02 Thread Andrew
Hi Massimo, The 4th edition book has been on the web for a while. Just wondering if there have been any incremental updates to the online version, while it is still called "4th edition" ? --

Re: [web2py] Re: unordered list in markmin and no bullets

2012-08-02 Thread Martin Weissenboeck
Thank you: tested - it works. 2012/7/31 Massimo Di Pierro > I just changed this in trunk. > > > On Thursday, July 26, 2012 10:59:35 AM UTC-5, mweissen wrote: >> >> I have tried the "buletted list" (unorder list) of markmin: >> >> - one >> - two >> - three >> >> These lines look like >> >> one >

Re: [web2py] RESTful services with curl and/or python

2012-08-02 Thread Bruno Rocha
you can also post this in web2pyslices.com http://zerp.ly/rochacbruno Em 02/08/2012 13:30, "Dirk Krause" escreveu: > Hi, > > I tried to pull together the different sources for restful services, > including various hints in this group and of course the excellent web2py > documentation. If this is

[web2py] Re: Markmin patch with nested lists

2012-08-02 Thread Massimo Di Pierro
You do not need the patch. Markrmin in trunk has been rewritten. Supports nested lists and more. On Tuesday, 31 July 2012 07:19:50 UTC-5, Dirk Krause wrote: > > Hi, > > I am trying to apply this patch: > > http://code.google.com/p/web2py/issues/attachmentText?id=524&aid=5240002000&name=markmin_ne

[web2py] Re: RESTful services with curl and/or python

2012-08-02 Thread Massimo Di Pierro
You post would go, almost verbatim, in the web2py docs and the web examples. On Thursday, 2 August 2012 11:26:09 UTC-5, Dirk Krause wrote: > > Hi, > > I tried to pull together the different sources for restful services, > including various hints in this group and of course the excellent web2py >

Re: [web2py] uWSGI and routes.py

2012-08-02 Thread Massimo Di Pierro
Please tell us more so we can address the issue. On Thursday, 2 August 2012 11:55:52 UTC-5, Marek Mollin wrote: > > For me it had. > I can look into it. Something with languages. > > I just honour time and decided to go with stable admin as it fixed issues. > > W dniu czwartek, 2 sierpnia 2012 17:

[web2py] Re: how to include profile photo from Janrain in auth_user?

2012-08-02 Thread Elcimar
A bit late but it was just yesterday that I tried to do it. Figured out how: 1. Edited web2py/gluon/contrib/login_methods/rpx_account.py added: *from gluon.globals import current** * 2. Added the following to the RPXAccount class just after *last_name = profile.get("name",dn).get("famil

[web2py] Re: Subclass FORM?

2012-08-02 Thread Anthony
> > def __init__(self): > super(Document, self).__init__(self) > Don't pass self to __init__() -- should be: super(Document, self).__init__() Anthony --

[web2py] Re: Subclass FORM?

2012-08-02 Thread Massimo Di Pierro
I do not know. Please open a ticket about this. On Thursday, 2 August 2012 14:16:45 UTC-5, Toby Shepard wrote: > > I tried doing this: > > > def index(): > > doc = Document() > > return doc > > class Document(FORM): > > def __init__(self): > super(Document, self).__in

Re: [web2py] Re: Offline apps

2012-08-02 Thread apps in tables
Hi, How is the offline application with web2py? Regards, Ashraf --

[web2py] Re: LEFT JOIN query issues

2012-08-02 Thread Limedrop
This gets me every now and then... In python it should be "==" rather than "=" left=db.mr_link.on(db.mr_link.recipID==db.recipient.id)) On Friday, August 3, 2012 8:08:38 AM UTC+12, Larry Wapnitsky wrote: > > I'm trying to take the following MySQL query > > SELECT recipient.emailAddress > FROM

Re: [web2py] Re: Trying to implement a full-page calendar

2012-08-02 Thread fhinojosa
Cindy, Were you able to find a resolution to your calendar issue? I'm also looking for some flexible calendar options. Thanks Frank On Saturday, May 5, 2012 10:31:01 AM UTC-5, Cindy Michalowski wrote: > > Thanks so much for the suggestions! I'll check these out and follow up > with anything th

[web2py] LEFT JOIN query issues

2012-08-02 Thread Larry Wapnitsky
I'm trying to take the following MySQL query SELECT recipient.emailAddress FROM recipient LEFT JOIN mr_link ON recipient.id = mr_link.recipID and turn it into a DAL query, but I keep running into 'keyword' issues My code is as such: rows = db().select(db.recipient.emailAddress, db.mr_link

Re: [web2py] URL strategy for single application

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 12:34 PM, Bruno Rocha wrote: > routes.py > > routers = dict( > BASE = dict( > default_application = 'myapp', > default_controller = 'mycontroller', > default_function = 'function1', > controllers

Re: [web2py] URL strategy for single application

2012-08-02 Thread Bruno Rocha
routes.py routers = dict( BASE = dict( default_application = 'myapp', default_controller = 'mycontroller', default_function = 'function1', controllers = ['default', 'mycontroller', 'etc'], functions = ['fun

Re: [web2py] Re: Question about a section of the book.

2012-08-02 Thread Niphlod
formname='something' serializes within the form a hidden input, so web2py can distinguish what form is being submitted. If the submitted values were to be serialized as urlencoded, just to explain, for the first form would be name=value&formname=form_one and for the second name=value&formnam

Re: [web2py] Generate json

2012-08-02 Thread Niphlod
hem just to point that out both javascript and python don't provide a method for standard dicts to be serialized with some predefined order in respect of the keys. There are ways to "display" the dict in an ordered matter BUT the object itself, being a dictionary, has no notion of "displ

[web2py] Subclass FORM?

2012-08-02 Thread Toby Shepard
I tried doing this: def index(): doc = Document() return doc class Document(FORM): def __init__(self): super(Document, self).__init__(self) self.append('A message') But when I run it I get this huge ticket with an error about recursion. I wouldn't have thought

[web2py] URL strategy for single application

2012-08-02 Thread Daniel Gonzalez
Hi, I am running web2py with mod_wsgi behind apache. I have a single web2py application. I would like to do the following URL mapping: http://www.example.com/function1 -> myapp/mycontroller/function1 Where myapp is my application, which is only one. I do not have lots of functions, so maybe I c

Re: [web2py] Re: Question about a section of the book.

2012-08-02 Thread Toby Shepard
On 08/02/2012 11:35 AM, Massimo Di Pierro wrote: if you have two forms in one page, web2py needs to be able to discriminate which one is being submitted. It does that by using a input type=hidden name=formname. But the forms below have the same name. I don't think I understand completely. Ma

[web2py] Re: Announcement: Open-source meetup.com alternative released

2012-08-02 Thread Derek
Looks good. I would like to see how exactly I can login via facebook. All I see on your demo site is a login page - no signup, no 'login using facebook'. It's quite ugly, but I won't hold that against you, it looks better than most websites I create. On Thursday, August 2, 2012 9:56:54 AM UTC-7

Re: [web2py] SSL/https nginx slow static content (images)

2012-08-02 Thread Niphlod
I use in the static stanza expires 30d; #30 days. you can set also "expires max" Tutorials online suggest also to add add header Pragma public; add header Cache-Control "public"; but just with expires it seems to work ok (even in Explorer) --

[web2py] Re: Question about a section of the book.

2012-08-02 Thread Massimo Di Pierro
if you have two forms in one page, web2py needs to be able to discriminate which one is being submitted. It does that by using a input type=hidden name=formname. Massimo On Thursday, 2 August 2012 13:13:10 UTC-5, Toby Shepard wrote: > > In the forms section: > > It is possible to have multiple

[web2py] Re: Announcement: Open-source meetup.com alternative released

2012-08-02 Thread Massimo Di Pierro
Nice! This should go in poweredby On Thursday, 2 August 2012 11:56:54 UTC-5, Samuel Marks wrote: > > With meetup.com, groupspaces and even facebook groups rising in > popularity; it is only fitting that an open-source alternative be developed > at the same time. > > Currently *GiantPicnic* suppo

Re: [web2py] Re: Giving a talk promoting web2py over Django

2012-08-02 Thread Massimo Di Pierro
hot install is always there and apps can come with their own app-level routes. The only issue is that a global route can mess up access to apps if not done properly. On Thursday, 2 August 2012 10:50:35 UTC-5, viniciusban wrote: > > Massimo, about hot install applications, it's true just if you u

[web2py] Question about a section of the book.

2012-08-02 Thread Toby Shepard
In the forms section: It is possible to have multiple forms per page, but you must allow web2py to distinguish them. If these are derived by SQLFORM from different tables, then web2py gives them different names automatically; otherwise you need to explicitly give them different form names. Her

[web2py] Re: Right align the SQLTABLE data.

2012-08-02 Thread Derek
You can use CSS and nth child... .with_id:nth-child(5) {text-align: right;} meaning the 5th child element of an element with the class "with_id" would be right aligned. On Thursday, August 2, 2012 7:46:44 AM UTC-7, Pradeesh wrote: > > > I am facing a problem to allign SQLTABLE data properly. How

Re: [web2py] Generate json

2012-08-02 Thread Derek
Exactly, They are unordered, and if you need it ordered, you should specify an order for it. However, you should not need it ordered a particular way. On Thursday, August 2, 2012 7:09:31 AM UTC-7, Jonathan Lundell wrote: > > On 2 Aug 2012, at 1:43 AM, Hassan Alnatour > wrote: > > i want to Gene

Re: [web2py] SSL/https nginx slow static content (images)

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 10:19 AM, Marek Mollin wrote: > Managed to notice already. > Thanks. Any simple way of applying that is it in any way odd from a website > to try and do it? I assume you're serving static content directly with nginx (that is, not through web2py). In that case it's a server co

Re: [web2py] SSL/https nginx slow static content (images)

2012-08-02 Thread Marek Mollin
Managed to notice already. Thanks. Any simple way of applying that is it in any way odd from a website to try and do it? W dniu czwartek, 2 sierpnia 2012 19:15:51 UTC+2 użytkownik Jonathan Lundell napisał: > > On 2 Aug 2012, at 10:02 AM, Marek Mollin wrote: > > Anyone have any ideas why the sa

Re: [web2py] SSL/https nginx slow static content (images)

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 10:02 AM, Marek Mollin wrote: > Anyone have any ideas why the same website over ssl is loading much slower. I > mean mostly images and static content. I am aware of small overhead on first > request with ssl and handshakes, but images and other static files load > noticeably s

Re: [web2py] Announcement: Open-source meetup.com alternative released

2012-08-02 Thread Martín Mulone
wow 2012/8/2 Samuel Marks > With meetup.com, groupspaces and even facebook groups rising in > popularity; it is only fitting that an open-source alternative be developed > at the same time. > > Currently *GiantPicnic* supports: > >- CRUD groups >- CRUD group events >- Join/leave grou

[web2py] SSL/https nginx slow static content (images)

2012-08-02 Thread Marek Mollin
Hello, Anyone have any ideas why the same website over ssl is loading much slower. I mean mostly images and static content. I am aware of small overhead on first request with ssl and handshakes, but images and other static files load noticeably slower. I am running on nginx and ubuntu 12.04.

[web2py] Announcement: Open-source meetup.com alternative released

2012-08-02 Thread Samuel Marks
With meetup.com, groupspaces and even facebook groups rising in popularity; it is only fitting that an open-source alternative be developed at the same time. Currently *GiantPicnic* supports: - CRUD groups - CRUD group events - Join/leave groups - RSVP to group events - View prof

[web2py] Re: Can't run web2py because of socket.gethostbyname problem

2012-08-02 Thread pbreit
What's happening? Are you getting errors? One thing I noticed is that Mountain Lion broke some of my Python things (Mercurial, for example). I fixed everything by installing Xcode 4.4 (and Command Line Tools) and re-installing/upgrading some packages. I don't know the details but it seems like

Re: [web2py] uWSGI and routes.py

2012-08-02 Thread Marek Mollin
For me it had. I can look into it. Something with languages. I just honour time and decided to go with stable admin as it fixed issues. W dniu czwartek, 2 sierpnia 2012 17:06:15 UTC+2 użytkownik Massimo Di Pierro napisał: > > Why trunk but admin from table? Are you saying admin from trunk has bu

[web2py] Re: Web2py site/app with several deily accesses

2012-08-02 Thread pbreit
Depends on how many tables you have but there are several things to do before re-arranging your models including caching, caching, caching, query optimization, code optimization, minimize database access, move static assets to CDN, etc. MySQL or Postgres are fine. In general, better to grow in

Re: [web2py] Re: Web2py site/app with several deily accesses

2012-08-02 Thread howesc
oops. it's the StarMaker family of products. see the web site at starmakerstudios.com. search starmaker in the iOS app store to get the app. On Thursday, August 2, 2012 9:44:42 AM UTC-7, viniciusban wrote: > > Could you tell us its url? > > > On 08/02/2012 01:27 PM, howesc wrote: > > my lar

Re: [web2py] Re: Web2py site/app with several deily accesses

2012-08-02 Thread vinicius...@gmail.com
Could you tell us its url? On 08/02/2012 01:27 PM, howesc wrote: my largest project is servicing 2.5 million requests per day. (API calls and website views combined) - google app engine (big table) - modelless - medium use of memcache, slight use of google edge cache On Wednesday, Augu

[web2py] RESTful services with curl and/or python

2012-08-02 Thread Dirk Krause
Hi, I tried to pull together the different sources for restful services, including various hints in this group and of course the excellent web2py documentation. If this is the wrong place or info, feel free to move or delete it. Here's how you create a restful web2py application in under 2 min

[web2py] Re: Web2py site/app with several deily accesses

2012-08-02 Thread howesc
my largest project is servicing 2.5 million requests per day. (API calls and website views combined) - google app engine (big table) - modelless - medium use of memcache, slight use of google edge cache On Wednesday, August 1, 2012 7:13:04 AM UTC-7, viniciusban wrote: > > This question has b

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread peter
Someone else has provided a script for centos 6. There are plenty of webservers out there based on centos 5 I believe because of its stability. So it is useful to have a script for Centos 5. Particularly as this seems to be the most tricky Linux for web2py because it uses and needs python 2.4 Ma

Re: [web2py] Re: Giving a talk promoting web2py over Django

2012-08-02 Thread vinicius...@gmail.com
Massimo, about hot install applications, it's true just if you use default routes, right? Or there's some way to do that using custom routes? -- Vinicius Assef On 08/01/2012 02:23 PM, Massimo Di Pierro wrote: I really have nothing to add but some history. I was a Django programmer (althoug

[web2py] Re: grid search behaviour with foreign keys

2012-08-02 Thread villas
I have also wrestled with this in the past. I have ripped some unclean code below out of an app I wrote. It may give someone inspiration but it is hardly a finished product. It would have poor performance but I must say the concept works well for me, I just hope it is remotely understandabl

Re: [web2py] Re: Can't run web2py because of socket.gethostbyname problem

2012-08-02 Thread Massimo Di Pierro
Anyway, this error is now caught in trunk and ignored (not a big deal). Try upgrade to trunk or the latest nightly built (in 5 minutes). Massimo On Thursday, 2 August 2012 09:51:37 UTC-5, Jonathan Lundell wrote: > > On 2 Aug 2012, at 7:26 AM, Mobility wrote: > > Did anyone succeed installing We

Re: [web2py] uWSGI and routes.py

2012-08-02 Thread Massimo Di Pierro
Why trunk but admin from table? Are you saying admin from trunk has bugs? On Thursday, 2 August 2012 09:32:49 UTC-5, Marek Mollin wrote: > > I can give some answer. Ran into the same issue but decided to not bother > with logging instead switched to use trunk version(+admin from stable) and > it

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread Massimo Di Pierro
Do you suggest we replace the current script with this? On Thursday, 2 August 2012 05:01:17 UTC-5, peter wrote: > > Attached is a working script that uses python2.6. It handles https. > > Python2.7 causes problems, eg no sqlite. This is why my original script > was for python2.6. If anyone actua

[web2py] Re: Giving a talk promoting web2py over Django

2012-08-02 Thread Massimo Di Pierro
well done. :-) On Thursday, 2 August 2012 08:47:14 UTC-5, Alec Taylor wrote: > > Thanks for all the advice, I think the talk went quite well. > > It seems that the hardcore Django people aren't going to be switching, the > Flask people are considering and everyone else is saying how evil the vie

[web2py] Re: WARNING:web2py:unable to open SSL certificate. SSL is OFF in web2py 1.99.7

2012-08-02 Thread Massimo Di Pierro
You do not need pyOpenSSL. web2py uses only http://docs.python.org/library/ssl.html Not sure what the problem is. On Thursday, 2 August 2012 04:30:50 UTC-5, Amit wrote: > > Hi, > I have installed web2py 1.99.7 stable version,python2.7.2, > pyOpenSSL-0.13.winxp32-py2.7,M2Crypto-0.20.2-py2.7.egg-i

Re: [web2py] Re: Can't run web2py because of socket.gethostbyname problem

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 7:26 AM, Mobility wrote: > Did anyone succeed installing Web2py in Mountain Lion Server with mod_wsgi? I > have it installed and working in Lion but I cannot make it work in Mountain > Lion. What does hostname(1) give you? You might try re-setting the hostname through the Sh

[web2py] Right align the SQLTABLE data.

2012-08-02 Thread Pradeesh
I am facing a problem to allign SQLTABLE data properly. How can I specify custom styles for SQLTABLE data. --

Re: [web2py] Web2py in apache mod_wsgi with virtualenv

2012-08-02 Thread Daniel Gonzalez
Thanks for your help Jonathan. I was able to get it working. I had to recompile the python in my virtualenv too, with --enable-shared. For reference, the related discussion in modwsgi: https://groups.google.com/d/topic/modwsgi/gQPT3iEwvU8/discussion On Wednesday, August 1, 2012 7:31:21 PM UTC+2

Re: [web2py] uWSGI and routes.py

2012-08-02 Thread Marek Mollin
I can give some answer. Ran into the same issue but decided to not bother with logging instead switched to use trunk version(+admin from stable) and it works perfectly fine. So whatever that was it now seems fixed. W dniu czwartek, 2 sierpnia 2012 05:39:03 UTC+2 użytkownik Massimo Di Pierro nap

[web2py] Re: Can't run web2py because of socket.gethostbyname problem

2012-08-02 Thread Mobility
Did anyone succeed installing Web2py in Mountain Lion Server with mod_wsgi? I have it installed and working in Lion but I cannot make it work in Mountain Lion. Em sexta-feira, 27 de julho de 2012 03h16min30s UTC-3, pbreit escreveu: > > This change is preventing me from starting web2py because of

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread Alan Etkin
> The script I attached in my previous email is your script but with python set to be 2.6. I tested this and it works. My concern is that 2.7 is said to be the last supported 2.x version of Python. I agree that testing in a raw install saves time and all kinds of issues. I will deploy in a virt

Re: [web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 6:32 AM, peter wrote: > I did not just discard it, I spent a day working through the issues. I have a > virtual box that I have installed Centos 5.8 on. I start with a clean install > and apply the script. > > With the changes I spoke of in my previous emails I got web2py star

Re: [web2py] Generate json

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 1:43 AM, Hassan Alnatour wrote: > i want to Generate json like this one : > > { > "Result":"OK", > "Records":[ > {"PersonId":1,"Name":"Benjamin > Button","Age":17,"RecordDate":"\/Date(1320259705710)\/"}, > {"PersonId":2,"Name":"Douglas > Adams","Age":42,"RecordDate":"\/D

[web2py] Re: Giving a talk promoting web2py over Django

2012-08-02 Thread Alec Taylor
Thanks for all the advice, I think the talk went quite well. It seems that the hardcore Django people aren't going to be switching, the Flask people are considering and everyone else is saying how evil the views are [?] On the bright side, it seems to be the framework everyone will now recommend

[web2py] Re: Generate json

2012-08-02 Thread Anthony
> > mylist = {} > > mylist['Result'] = 'OK' > for i in data: > i.name = {'name':i.name,'age':i.age} > mylist['Records'].append(i.name) > Is that the exact code? It looks like you attempt to .append() to mylist['Records'] without every creating the mylist['Records'] lis

Re: [web2py] Re: Chrome:LOAD and ajax problem

2012-08-02 Thread Anthony
> > > So it looks chrome can show result only when *view* and **.load*component are > declared in the same controller. > I'm not sure I follow the above statement. Can you pack and attach a minimal app that demonstrates the problem? Anthony --

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread peter
I did not just discard it, I spent a day working through the issues. I have a virtual box that I have installed Centos 5.8 on. I start with a clean install and apply the script. With the changes I spoke of in my previous emails I got web2py starting but issuing a ticket. The error was a failure

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread Alan Etkin
> Python2.7 causes problems, eg no sqlite I have web2py apps working both with sqlite and postgresql databases in the CentOS 5.8 host with Python 2.7.3 What other issues were detected? Would you please provide links or other info related to this problems? That could help improve the script also

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread Alan Etkin
I'm sorry, I don't recall having issues with sqlite. would you mind sending the centos script for replacing the updated in trunk until we have the 2.7 version working? El jueves, 2 de agosto de 2012 07:01:17 UTC-3, peter escribió: > > Attached is a working script that uses python2.6. It handles

Re: [web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias Van Daele
OK, I found the answer to my questions : All is done by Main module : serve_controller(request, response, session) source code this function is used to generate a dynamic page. It first runs all models, then runs the function in the controller, and then tries to render the output using a view/te

Re: [web2py] Re: Running SSH commands and capturing the results (Threading)

2012-08-02 Thread Christopher Steel
You might want to look into fabric as well. It's python... http://docs.fabfile.org/en/1.4.3/index.html On Tuesday, July 31, 2012 9:06:56 PM UTC-4, Tito Garrido wrote: > > Thanks a lot Margaret! > > > Tito, >> >> As a suggestion, >> you could look at apps like >> >> npaci-rocks (python-based), use

Re: [web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias Van Daele
If I call a certain controller function, where does this request come from ? (Main, Model,...) ? Thanks Mathias 2012/8/2 Mathias Van Daele : > Hello, > > For each HTTP request, the model (db.py) is read, and the controller executed. > > So, for each HTTP request, first the model is read (db.py)

Re: [web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias Van Daele
Hello, For each HTTP request, the model (db.py) is read, and the controller executed. So, for each HTTP request, first the model is read (db.py) , and then the controller executed (instanciated ?) ? Thanks Mathias 2012/8/2 Mathias : > Hello, > > I am trying to make a UML sequence diagram, fro

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread peter
Attached is a working script that uses python2.6. It handles https. Python2.7 causes problems, eg no sqlite. This is why my original script was for python2.6. If anyone actually gets a Python2.7 script that they have tested on a bare centos 5 machine, then fine submit it. The attached script h

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread Annet
> > Thank you, Annet. > > Now it is working fine. > You're welcome. Annet. --

[web2py] WARNING:web2py:unable to open SSL certificate. SSL is OFF in web2py 1.99.7

2012-08-02 Thread Amit
Hi, I have installed web2py 1.99.7 stable version,python2.7.2, pyOpenSSL-0.13.winxp32-py2.7,M2Crypto-0.20.2-py2.7.egg-info and pycurl-7.19.0.win32-py2.7 in my pc. When i start Rocket server it is showing warning message *"WARNING:web2py:unable to open SSL certificate. SSL is OFF "*. does PyOpe

[web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias
Hello, I am trying to make a UML sequence diagram, from a web2py app that I am creating. 1. What is the lifetime / duration of controller objects ? Are they instanciated every time you call them ? I guess this is not the case... 2. In db.py, there is : db = DAL('sqlite://storage.sqlite') >> db

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread apps in tables
Thank you, Annet. Now it is working fine. Ashraf --

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread Annet
> What did i do wrong? > It should probably be: form.element(_id='main_dept_task_description')['_style']='background-image: url("../static/css/img/ios-linen.jpg"); background-repeat: repeat-x repeat-y;' Where main_dept_task is the table name and description is the field name. You can see wh

[web2py] Re: ajax call from a page on a non-web2py server is not seen as ajax?

2012-08-02 Thread simon
Excellent thanks. That works either in the model or controller. You must also add the header suggested by Anthony to the ajax call. If you don't then not only is request.ajax=false but it does not do the two part request with OPTIONS and GET so does not set the access control headers and does

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread apps in tables
I am using > > form.element(_id='table_field')['_style']='background-image: > url("../static/css/img/ios-linen.jpg"); background-repeat: repeat-x > repeat-y;' > > as form = SQLFORM(db.maint_dept_task) form.element(_id='db.maint_dept_task.description')['_style']='background-image: u

[web2py] Generate json

2012-08-02 Thread Hassan Alnatour
Dear ALL , i want to Generate json like this one : { "Result":"OK", "Records":[ {"PersonId":1,"Name":"Benjamin Button","Age":17,"RecordDate":"\/Date(1320259705710)\/"}, {"PersonId":2,"Name":"Douglas Adams","Age":42,"RecordDate":"\/Date(1320259705710)\/"}, {"PersonId":3,"Name":"Isaac A

[web2py] Re: anonymous login / temporary user login / non-user authentication

2012-08-02 Thread Liam
Thanks everyone for your suggestions. I've finally found the time to get back around to this. I'm a little reluctant to populate my databases with what are essentially single-use accounts. For this reason, my current solution won't create an account per reviewer. Instead, I've decided go with a

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread Annet
> where do i write the statement > That depends if you want all your text fields to have the background you put it in a .css file in the css folder. If you want the text fields of a single form to have the bacground you put in in the view: input {background-image: url('img/ios-linen.jpg')

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread apps in tables
Thank you, Annet If i am using SQLFORM(db.table) to generate the form, where do i write the statement > input {background-image: url('img/ios-linen.jpg'); background-repeat: > repeat-x repeat-y;} > > in the controller or the view? Ashraf --

Re: [web2py] Re: Adding icons to navbar (response.menu)?

2012-08-02 Thread Annet
Hi Ashraf, 1- How can the application define the background ( image ) of a text field? > the user should only be able to write text. > > Given you have a img folder in your css folder: input {background-image: url('img/ios-linen.jpg'); background-repeat: repeat-x repeat-y;} will give the text