[web2py] Re: Support for internationalization in web2py wiki

2013-05-29 Thread Daniel Gonzalez
In the same way as internationalization is handled in the T operator? That means that an accept-language: it- it would tell the wiki engine to look for pages corresponding to the URL which are marked in the database as being in italian. That means: 1. a new field is needed in the database

[web2py] Strategies to select the preferred language

2013-05-29 Thread Daniel Gonzalez
Hi, According to the documentationhttp://web2py.com/books/default/chapter/29/04#Internationalization,-and-Pluralization-with-T, the T operator works based on the Accept-Language setting. In my experience, this is quite cumbersome for a user to set-up (I have not even succeeded in setting

[web2py] Re: Strategies to select the preferred language

2013-05-29 Thread Niphlod
? never had issues with users usually they download the browser with the language they're in. BTW, forcing a language using a session variable is not hard at all in web2py. Il giorno mercoledì 29 maggio 2013 09:00:05 UTC+2, Daniel Gonzalez ha scritto: Hi, According to the

[web2py] Re: Strategies to select the preferred language

2013-05-29 Thread Daniel Gonzalez
You are right. I guess I am having trouble myself because I *am* trying to force the language (which is something a user will not do. since they are happy with the default browser setting). And I have just found this piece of code in admin: {{if

[web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'

2013-05-29 Thread Aurelijus Useckas
I'm also having the save error during the start on mac os On Monday, May 27, 2013 1:26:23 AM UTC+3, jfinke wrote: I just downloaded the mac version of web2py. When I start the server with a password, I immediately get an error ticket. Error ticket for welcomeTicket ID

[web2py] Re: Strategies to select the preferred language

2013-05-29 Thread Daniel Gonzalez
And a final question: since I will only be supporting a handful of languages (english, german and italian) I would like to set the current languages. I have found T.set_current_languages. Is this the right function to set the supported languages? Is there an example somewhere on how to use

[web2py] Re: Strategies to select the preferred language

2013-05-29 Thread Niphlod
read the book, I think it's explained clearly set_current_language sets all languages that DON'T need translation (i.e., the default language you used when coding), if multiple languages are accepted by the client. http://web2py.com/books/default/chapter/29/04#Determining-the-language Il

[web2py] Re: computed field and reference

2013-05-29 Thread Matteo Luperto
I've deleted the testing db and started with a new one and now it works for me too. I've tried add a new record to problemsHere but it gave me an unexpected error (the DAL expected an unique field in language and language is no longer an unique field), so probably the issue was somewhere else.

[web2py] Re: 2.4.7 problems

2013-05-29 Thread BlueShadow
I just rechecked it the standard www-data user is the owner of the folder and its content. On Tuesday, May 28, 2013 10:03:15 PM UTC+2, Niphlod wrote: I tried with cache.disk and no error occurred. Are you positive that there are no permission issues on the cache folder ? -- --- You

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Lamps902
Anyone knowledgeable in RSS care to take a crack at this one? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Niphlod
it's not a matter of rss. The standard way to embed an alternate representation of the site is link rel=alternate type=application/rss+xml title=Recent Changes href=theurl From there on, each client has its own implementation to autodiscovery all feeds. Contact the Sage's creator to know why

[web2py] Fixed issue 1422 introduced a bug in generic rss views?

2013-05-29 Thread Loïc
Hi All, It seems that the fix for issue 1422 introduced a bug on generic rss views. History : https://github.com/web2py/web2py/commit/ea34d1b3a02223e3032d91ad9269d70dcfd5f0b6#gluon/serializers.py *First error :* On* gluon/serializers.py, line 166 *if feed.get() returns *None *we can't call

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-29 Thread Calvin
Just wondering if a cache decorator would work here? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-29 Thread Calvin
Just wondering if a cache decorator would work here? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-29 Thread Calvin
Just wondering if a cache decorator would work here? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: how display var in menu

2013-05-29 Thread greaneym
Niphlod, I am reposting with more questions on menus. Thank you, your response did clear up some questions. I want to have a menu item that shows the current total value of a calculation, as well as a sparkline chart showing the values of a time series. From the web2py-users, it seems that the

[web2py] Typo in Book app

2013-05-29 Thread Johann Spies
In the section Other methods/update_or_insert: The selection criteria in the exmaple above is a single field. It can also be a query, such as |db.person.update_or_insert((db.person.name=='John') (db.person.birthplace=='Chicago')), name='John',birthplace='Chicago',pet='Rover') | |The

[web2py] Re: how display var in menu

2013-05-29 Thread Niphlod
I really don't understand what are you missing. Please post an example of what you want and an example on where you are stuck. PS: if thesomething you want to print comes as a result from a function, why is difficult to do def afunction(a, b): return a + b def yourcontroller():

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Lamps902
Thanks, Niphlod. So it does seem to be the case that I implemented the standard method of embedding a feed correctly, and I can't find any issue with the HTML (not that this guarantees there isn't an issue). I tried a couple of other RSS readers, and they seem to be picking it up with no

[web2py] Re: Support for internationalization in web2py wiki

2013-05-29 Thread Massimo Di Pierro
I think you can do something like: session.language = session.language or T.accepted_language auth.settings.extra_field['wiki_page']=[Field('language',default=session.language)] auth.define_tables() auth.wiki(render=False) db.wiki_page._common_filters.append(lambda

[web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'

2013-05-29 Thread jfinke
Yes, I just ran the code version on a debian box and was not replicating the error. My guess is that there is something hard coded in the compiled mac .app file. On Monday, 27 May 2013 07:49:04 UTC-5, LightDot wrote: By linux version you mean the source code version of the web2py download?

[web2py] Re: how display var in menu

2013-05-29 Thread greaneym
Niphlod, Thanks, I will try to be as specific as possible. Currently, I have 2 menus, both are defined in the models directory, dashboardmenu.py has a list of nav menu items like home, about, etc. menu.py contains another nav list that looks like the jpg I posted. This is the one I need extra

[web2py] Re: how display var in menu

2013-05-29 Thread Niphlod
uhm. a function defined in a controller is not available globally. it's a mere structure to have something that replies to a request. why can't you move that controller function to models ? I mean in a controller you have def yourfunction(): return 'a' but in the menu you can't fetch

[web2py] Re: how display var in menu

2013-05-29 Thread greaneym
thanks Niphlod, I will try this. On Monday, May 27, 2013 1:50:05 PM UTC-5, greaneym wrote: How would I display the output of this function in a menu? def test1(): a = 20 b = 30 myval = a+b return myval These come close but I don't understand how to implement the second one,

[web2py] Missing ASIDE tag in web2py gluon

2013-05-29 Thread Daniel Gonzalez
The ASIDE http://www.w3schools.com/tags/tag_aside.asp helper (HTML5) is missing in gluon (using web2py 2.7.4). Useful to do something like this: http://purecss.io/layouts/gallery/ I have defined it in terms of DIV: class ASIDE(DIV): tag = 'aside' And works for me. I am not sure if gluon

[web2py] Re: Missing ASIDE tag in web2py gluon

2013-05-29 Thread Niphlod
lots are missing but devs decided to stop adding items to globals. whatever you need can be done with TAG {{=TAG.name('a', 'b', _c='d')}} name c=dab/name Il giorno mercoledì 29 maggio 2013 17:31:51 UTC+2, Daniel Gonzalez ha scritto: The ASIDE http://www.w3schools.com/tags/tag_aside.asp helper

[web2py] Re: Missing ASIDE tag in web2py gluon

2013-05-29 Thread Anthony
No, it doesn't include a class for every possible HTML tag, but you can construct arbitrary tags as follows: TAG.aside('your content') See http://web2py.com/books/default/chapter/29/05#Custom-helpers. Anthony On Wednesday, May 29, 2013 11:31:51 AM UTC-4, Daniel Gonzalez wrote: The ASIDE

[web2py] web2py view to controller value passing and vice versa

2013-05-29 Thread Richard Prabhu
Hello, Am new to web2py and have developed an applications using crawling.my doubt is in onclick() i have written like onclick='ajax({{=URL('default', 'test', args=[textname[i], '2', 'tamil'])}},[], :eval);' in the controller : if (request.args[2]==tamil): if

[web2py] web2py view controller value passing

2013-05-29 Thread Richard Prabhu
Can you help me in passing the values from view in web2py to the controller function.The value returned from controller unction should be passed again to the same view.I will use that value in my views. Here is my view: onclick='ajax({{=URL('default', 'test', args=[textname[i], '1',

[web2py] Grouping more than two fields in the same column of a smartgrid

2013-05-29 Thread Fred Guedes Pereira
Hi, Is there a way to group two or more table fields in the same column of a SQLFORM.smartgrid? Consider this model, as an example: db.define_table(protocol, Field(region, integer), Field(sequence, integer), Field(year, integer), Field(details, string)) The fields region +

[web2py] Can I use Requests in a GAE Web2py project?

2013-05-29 Thread Carl
I downloaded this pure Python code for using LinkedIn's API - the new API they launched this year. https://github.com/ozgur/python-linkedin Ozgur's code uses https://github.com/kennethreitz/requests Is anyone using requests in a Web2py project? Follow-up: anyone using Ozgur's **new** LinkedIn

[web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'

2013-05-29 Thread Alan Etkin
I just downloaded the mac version of web2py. When I start the server with a password, I immediately get an error ticket. Odd. It looks like the web2py core you are using has no implementation of the new .automenu() feature (added renently), but you are running an app with an updated

[web2py] Re: Error importing dropbox_account module

2013-05-29 Thread Mika Sjöman
a tip would be to include that reference into the documentation where you present the Dropbox API http://www.web2py.com/books/default/chapter/29/14#Dropbox-API Found it with a google search, but still :) cheers On Sunday, October 7, 2012 10:42:22 PM UTC+8, Massimo Di Pierro wrote: You need

[web2py] Attention OSX users

2013-05-29 Thread Massimo Di Pierro
There is a major in the OSX binary distribution of web2py. Basically the build process broek at some time and for some time the pyc files in the OSX binary distribution have not been updated. This should not be fixed in the nightly built. Please give it a try. Massimo -- --- You received

[web2py] Re: Can I use Requests in a GAE Web2py project?

2013-05-29 Thread Niphlod
according to https://github.com/kennethreitz/requests/issues/498 surely there has been some work to adapt requests to GAE. On Wednesday, May 29, 2013 7:05:22 PM UTC+2, Carl wrote: I downloaded this pure Python code for using LinkedIn's API - the new API they launched this year.

[web2py] dropbox integration not working for me, any ideas?

2013-05-29 Thread Mika Sjöman
Hi Tried using the instructions from http://www.web2py.com/books/default/chapter/29/14#Dropbox-API The typo there has not been fixed yet; use_janrain(auth,filename='private/dropbox.key') should be use_dropbox(auth,filename='private/dropbox.key') But anyways, I got it working, but now when I

Re: [web2py] Attention OSX users

2013-05-29 Thread joseph simpson
A quick test indicates that the basic system components work.. Take care.. On Wed, May 29, 2013 at 11:44 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: There is a major in the OSX binary distribution of web2py. Basically the build process broek at some time and for some time the

[web2py] Re: mysql db connections

2013-05-29 Thread Saba
Any suggestions pls? On Sunday, May 26, 2013 1:07:53 PM UTC-7, Saba wrote: Thanks for the reply. I really appreciate. I'm developing an app using web2py to pull up records from mysql db and present it to the user using custom views. It looks like sometimes it takes 1sec to display the

[web2py] How to build exposed API

2013-05-29 Thread Nam Soo In
I am trying to build exposed API that is called by another web service in order to insert data. Here is DB structure. Table name: bad_domain attributes are : domain(string) modified_by(string) cereated_by(string) risk(Boolean) Here is my code in defauly.py auth.settings.allow_basic_login =

[web2py] Re: mysql db connections

2013-05-29 Thread Derek
Have you tried to enable caching? On Sunday, May 26, 2013 1:07:53 PM UTC-7, Saba wrote: Thanks for the reply. I really appreciate. I'm developing an app using web2py to pull up records from mysql db and present it to the user using custom views. It looks like sometimes it takes 1sec to

[web2py] Re: mysql db connections

2013-05-29 Thread Derek
I only suggest that because usually making a connection takes next to no time at all. I've written my apps different ways - one way opening a connection and keeping it open and the other way, opening the connection and closing it on each query. It makes no difference really as far as speed is

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Derek
Usually the RSS feed is just a regular link on a page. Some readers will check all the a hrefs for ending in RSS and then present that. On Wednesday, May 29, 2013 6:53:30 AM UTC-7, Lamps902 wrote: Thanks, Niphlod. So it does seem to be the case that I implemented the standard method of

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-29 Thread Derek
Well, if the goal is to reduce the impact of the brute force, a cache decorator could work. The book shows a few methods, I like the method of caching the 'Render' result. You can set it to a low value like 1 second or so... On Wednesday, May 29, 2013 6:27:37 AM UTC-7, Calvin wrote: Just

[web2py] Re: PAAS supporting web2py

2013-05-29 Thread Derek
You can take a look at Windows Azure - I believe they have quite a few datacenters in India. I'm in the process of setting up a site with them, and it's pretty simple. https://www.microsoft.com/india/azure/windows-azure-and-other-development-platforms.aspx On Monday, May 27, 2013 8:19:39 PM

[web2py] Re: web2py view to controller value passing and vice versa

2013-05-29 Thread Tim Richardson
how to get the returned value in view again?? The view is executed by the server, so variables included in the view are provided by the web2py server process executing code at the time the content is sent to the browser; you are returning a value via ajax which sends it to the client (the

[web2py] Re: Conditional Fields in Custom Forms

2013-05-29 Thread Josh Myers
Thank you, everyone. You helped me answer #1 and I am appreciative. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com.

[web2py] Re: web2py view to controller value passing and vice versa

2013-05-29 Thread Anthony
When you say you want the value in the view, do you really mean you want it on the web page in the client? As Tim pointed out below, the view is a file on the server that is executed on the server -- it generates an HTML page that is then sent to the browser -- however, the view itself is not

[web2py] Re: How to build exposed API

2013-05-29 Thread Anthony
You are using basic authentication to log in, but your app probably does not have basic authentication enabled. See http://web2py.com/books/default/chapter/29/09#Access-Control-and-Basic-Authentication . Anthony On Wednesday, May 29, 2013 8:11:30 PM UTC-4, Nam Soo In wrote: I am trying to

[web2py] What is best practice to give a user administrator rights for one application (to manage users)

2013-05-29 Thread Tim Richardson
I want to give a user the ability to add users for one application. I have created a group called admin, made her a member, and decorated the index function in controller appadmin @auth.requires_membership('admin') Then I have added a link to the index function of the appadmin controller. I

[web2py] web2py: sqlform without submit and generating another sqlform

2013-05-29 Thread A Mehta
Per Anthony's request, I am posting my question here. I have a table which holds different kind of 'cards'. Each card has a name and some other information. I am using SQLFORM and IS_IN_DB to create a drop down menu for all the cards stored in the db. What I want is for the user to use the

[web2py] Re: What is best practice to give a user administrator rights for one application (to manage users)

2013-05-29 Thread Massimo Di Pierro
The admin group of your application will not give members access to the admin interface or the appadmin interface. The admin in web2py is somebody who have complete and un-restricted access to the application source and the database. The groups you create, however you call them, will never give