[web2py] How to make automatic log-off after 1 hour not several minutes how it is right now?

2011-12-01 Thread Constantine Vasil
Automatic log-off goes after several minutes of inactivity - how to make the user to stay logged in for example for 1 hour? When doing presentations it is very annoying that it logs-off so quick.

[web2py] Post-login redirection issues

2011-12-01 Thread Yarin
I'm having trouble setting post-login redirection behavior. Let's start with the fact that, according to Massimo in this post (http://groups.google.com/group/web2py/msg/c07acc2f4395f6e4) , "Right now there are two possibilities: - if web2py redirects you to login, after login, login redirects you

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Julio Schwarzbeck
I've always liked Trac myself, but getting it too work was always a feat in itself, I take that newer versions might be easier to install nowadays, i-track has some resemblance, definitely, it is still way smaller (~3,200 lines of python code (plus html)) :) On Dec 1, 2:36 am, Martín Mulone wrote

[web2py] Re: Set/change modules folder location for an app

2011-12-01 Thread Massimo Di Pierro
you can create symbolic link to the web2py/site-packages folder or you can add a sys.path.append to web2py.py On Dec 1, 9:14 pm, Alan Etkin wrote: > The required modules are stored outside the web2py folder because they > are shared by a non web2py app. So i cannot import them with that > method

[web2py] Re: Hot to do the: Remember me (for 30 days) by default?

2011-12-01 Thread Constantine Vasil
Thank you. Actually I have more pressing issue - the session expires very quickly and the user has to login after several minutes (don't know exactly) in-activity. How to set it for example 1 hour? When I have presentations this quick expiration is annoying.

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Julio Schwarzbeck
Totally agree, Anthony, let me see what is the best way of tacking this, I am planning several enhancements, obviously a stripped-down mobile version and better CSS integration, I agree the font could be a bit larger, and the overall width of the app shortened somehow. On Dec 1, 6:54 am, Anthony

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Julio Schwarzbeck
Whoa, that link set is not supposed to be there :) - Nice catch, I'll add it as a bug! - Thanks for spotting this Stefaan On Dec 1, 1:52 am, stefaan wrote: > An impressive piece of work :) > > I did spot a buglet though: the blue links on top of the contact form > athttp://demo.i-track.org/itrack

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Julio Schwarzbeck
I am open to suggestions on how plug-in integrations, definitely. On Dec 1, 1:24 am, Vidul Petrov wrote: > Nice project, thank you. > > Do you intend to create plugin system for it (like Trac plugins)? > > On Dec 1, 8:38 am, Julio Schwarzbeck wrote: > > > > > > > > > Folks, > > > I've just relea

Re: [web2py] Re: Best practices: When to use classes

2011-12-01 Thread Bruno Rocha
Actually you dont need even an ajax callback. Take this example: ## models/script.py ## db.define_table("mytable", Field("picture", "upload")) print "models executed!" ## controllers/default.py ## def index(): pictures = db(db.mytable).select() return dict(pictures=pictures) def downl

[web2py] Default field value with lambda

2011-12-01 Thread Matthew
Is it possible to define a default field value using lambda like the a Computed Field? http://web2py.com/book/default/chapter/06#Computed-Fields I want to name nodes using their own ID fields, e.g., "Node 1", "Node 2", etc. Can I do this with lambda and not rely on a separate counter field? Thank

[web2py] Re: joins across databases

2011-12-01 Thread lyn2py
Ouch I thought it's within the same database. Sorry. On Dec 2, 10:19 am, Vinicius Assef wrote: > Inner joins between two different databases?! > > I understood Jim were talking about a lagacy database and his app > database. Two different db's. > > If we're talking about the same database, I'm wi

[web2py] Re: SQLTABLE images for id fields

2011-12-01 Thread Alan Etkin
And here is a new version of the modification (with a slight change in naming). Sorry for the ugly repeated diffs How can i ask a review of this modification? I first intended to post it in issues but i see that it is used mostly for errors. diff -r b5b9c3a348de gluon/sqlhtml.py --- a/gluon/sqlht

Re: [web2py] Re: Best practices: When to use classes

2011-12-01 Thread Anthony
Cool. Thanks for sharing. On Thursday, December 1, 2011 8:19:05 PM UTC-5, rochacbruno wrote: > > > > On Thu, Dec 1, 2011 at 11:01 PM, Anthony wrote: > >> Also, isn't it sometimes useful to put code in a model file that you want >> to run on every (or nearly every) request without having to do an

[web2py] Re: Navigation links with Plugin & CRUD

2011-12-01 Thread Matthew
Thanks for the tips. The real reason for my trouble was not understanding the relationship between crud's HTML default views, and where to place the line "def data(): return dict(form=crud())". I assumed this was but in the controller of the *plugin*, when in actuality (if you want to use the defa

[web2py] Re: JQuery Mobile + web2py - how to set data-url attribute dynamically?

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 9:43:55 PM UTC-5, Constantine Vasil wrote: > > Tried to change it dynamically return dict(new_url=new_url) but when I > look at the HTML source it is not. > What is new_url? Also, you should put it in quotes: data-url="{{=new_url}}"

[web2py] Re: Set/change modules folder location for an app

2011-12-01 Thread Alan Etkin
The required modules are stored outside the web2py folder because they are shared by a non web2py app. So i cannot import them with that method. I know i could just copy them into the app's modules folder and that would be it, But i do not want to duplicate files. On Dec 1, 11:19 am, Anthony wrot

[web2py] Re: Do you compile app ?

2011-12-01 Thread Alan Etkin
I agree that there is no need to compile unless there is a performance problem with a site in particular. So another question: In wich general cases it is good to compile one's app? (maybe with large modules). There are another posts that have some info on this topic http://groups.google.com/grou

[web2py] Re: JQuery Mobile + web2py - how to set data-url attribute dynamically?

2011-12-01 Thread Constantine Vasil
Tried to change it dynamically return dict(new_url=new_url) but when I look at the HTML source it is not.

[web2py] Re: JQuery Mobile + web2py - how to set data-url attribute dynamically?

2011-12-01 Thread Constantine Vasil
It is not very clear to me what jQuery Mobile are doing but seems to me a good idea. I added a parameter data-url ={{=new_url }} in the layout page because it is where data-url is located. Tried to change it dynamically return dict(

Re: [web2py] Re: joins across databases

2011-12-01 Thread Bruno Rocha
With two databases will work only if you have linked-servers in your backend. I did it with MSSQL two databases linked and some views defined in DB. so in web2py I defined the views as tables.

Re: [web2py] Re: joins across databases

2011-12-01 Thread Vinicius Assef
Inner joins between two different databases?! I understood Jim were talking about a lagacy database and his app database. Two different db's. If we're talking about the same database, I'm with you, lyn2py. -- Vinicius Assef. On Thu, Dec 1, 2011 at 11:35 PM, lyn2py wrote: > Definitely possible

[web2py] Re: One Queue

2011-12-01 Thread Alan Etkin
Depending on the type of data maybe you could use web2py services interface. First you define the set/get actions in some of the apps and decorate them as services. Then from any application you can consume this services for data transactions. The web2py book covers services and RPC in 9th chapte

[web2py] Re: overriding Auth functions

2011-12-01 Thread lyn2py
Hi Carlos, I haven't done subclassing Auth yet, but I was wondering why you didn't use >> URL('user',args='retrieve_username') On Dec 2, 8:42 am, Carlos Hanson wrote: > While subclassing Auth to override retrieve_username, I needed to create a > link to retrieve_username and also to login. The

[web2py] Re: install packed application which uses sqlite

2011-12-01 Thread Alan Etkin
When calling DAL(connection_string, ...) there is a folder keyword argument wich specifies the path where the database files will be stored, so you can separate the files from the app source. I think that this eliminates the problem of having to erease the database app folder each time you pack the

[web2py] Re: joins across databases

2011-12-01 Thread lyn2py
Definitely possible. Take a look at the examples here: http://web2py.com/book/default/chapter/06#Inner-Joins On Dec 2, 7:40 am, Jim Gregory wrote: > I have a legacy database that my app needs to connect to.  The data in > my app's table has a many-to-one relationship with the data in the > legac

Re: [web2py] Re: Best practices: When to use classes

2011-12-01 Thread Bruno Rocha
On Thu, Dec 1, 2011 at 11:17 PM, lyn2py wrote: > Model files are run on every request - does that mean having a complex > database structure would slow the entire site down? > Yes, if you everything you have in models will be executed even if you are just serving a simple contact form or an smal

[web2py] Re: Hot to do the: Remember me (for 30 days) by default?

2011-12-01 Thread Alan Etkin
I actually missed a lot of ways of customizing authentication services. You can have a look at the web2py book. (Chapter 8.3 on authorization) Section 8.3.6 covers customization with auth object settings There is an auth settings attribute called long_expiration (specified in seconds) wich contro

Re: [web2py] Re: Best practices: When to use classes

2011-12-01 Thread Bruno Rocha
On Thu, Dec 1, 2011 at 11:01 PM, Anthony wrote: > Also, isn't it sometimes useful to put code in a model file that you want > to run on every (or nearly every) request without having to do an import? Yes, some helping functions and objects i think is very useful to have in modules, but not Auth

[web2py] Re: Best practices: When to use classes

2011-12-01 Thread lyn2py
Just a thought. Model files are run on every request - does that mean having a complex database structure would slow the entire site down? On Dec 2, 9:01 am, Anthony wrote: > On Thursday, December 1, 2011 7:48:29 PM UTC-5, rochacbruno wrote: > > > I have an opinion about that. > > > For me the /

[web2py] Re: Submit gutton in fields

2011-12-01 Thread Anthony
The calendar picker is handled entirely via JS on the client side. This code (http://code.google.com/p/web2py/source/browse/applications/welcome/static/js/web2py.js#32) in web2py_ajax.js adds the datepicker to date, datetime, and time fields. If you don't want it, you can edit that code or sim

[web2py] install packed application which uses sqlite

2011-12-01 Thread Carlos Hanson
I am currently using sqlite for a simple application. I just checked to see that the database is packed with the rest of the application. While this is certainly useful when taking a production app to development for updates, it is not as useful going from development to production. Any suggest

[web2py] Re: How to add a trailig slash? web2py + trailing slash needed from jQuery Mobile

2011-12-01 Thread Constantine Vasil
I am using the final version - 1.0. How to get rid of these hashes which jQuery Mobile is adding?

Re: [web2py] Re: Best practices: When to use classes

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 7:48:29 PM UTC-5, rochacbruno wrote: > > I have an opinion about that. > > For me the /models folders should be renamed to /scripts since it has > scripts that are executed in every request. I suppose you could be strict about it and only include model related code

Re: [web2py] Best practices: When to use classes

2011-12-01 Thread Nik Go
Interesting. Do you have any recommended links to know more about this topic? On Friday, December 2, 2011, Bruno Rocha wrote: > I have an opinion about that. > > For me the /models folders should be renamed to /scripts since it has > scripts that are executed in every request. Going on this appr

Re: [web2py] Using "auth.settings.login_onaccept"

2011-12-01 Thread Nik Go
auth.settings.login_onaccept=URL('afterlogin') #assuming it's in the default controller. does the same. For reference, the other callsbacks *(before) db io* are: auth.settings.login_onvalidation = [] auth.settings.register_onvalidation = [] auth.settings.profile_onvalidation = [] auth.settings.re

Re: [web2py] Re: Best practices: When to use classes

2011-12-01 Thread Bruno Rocha
I have an opinion about that. For me the /models folders should be renamed to /scripts since it has scripts that are executed in every request. Going on this approach I am only writing model-less (or script-less) apps. I am now recommending to all of my students and clients to avoid the use of mo

[web2py] overriding Auth functions

2011-12-01 Thread Carlos Hanson
While subclassing Auth to override retrieve_username, I needed to create a link to retrieve_username and also to login. The solution I found was the following: >>> URL('user') '/ssam/default/user' >>> URL('user') + '/retrieve_username' '/ssam/default/user/retrieve_username' >>> URL('user') + '/l

[web2py] Re: sqlform: vars don't work

2011-12-01 Thread Massimo Di Pierro
You a field of type 'list:integer' stored data in in then you changed to 'integer'. Sqlite did not check and allowed to keep the lists stored in there but now web2py does not allow you to take them out. You must delete all the data in that field. db(db.table).update(db.table.field=0) On Dec 1, 4

[web2py] Re: How to add a trailig slash? web2py + trailing slash needed from jQuery Mobile

2011-12-01 Thread Massimo Di Pierro
I use jquery mobile but never run into this issue Are your sure? Which version are you using? On Nov 30, 10:55 pm, Constantine Vasil wrote: > Are there a way to use trailing slash after page name like: /about/ > > This is because jQuery Mobile requires it to work properly. Otherwise > it adds a h

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Massimo Di Pierro
:-) On Dec 1, 12:38 am, Julio Schwarzbeck wrote: > Folks, > > I've just released i-Trac > > i-Track is a simple issue/bug tracking system developed in web2py, it > is Open Source Software released under the Simplified BSD License, the > site is "live" at: > > http://www.i-track.org/ > > There is

Re: [web2py] joins across databases

2011-12-01 Thread Vinicius Assef
I think you have to define 2 db objects. 1) Retrieve data from db1. 2) For each row, retrieve data from db2 and construct your own rows object. But maybe somebody has a better solution. -- Vinicius Assef. On Thu, Dec 1, 2011 at 9:40 PM, Jim Gregory wrote: > I have a legacy database that my ap

Re: [web2py] Submit gutton in fields

2011-12-01 Thread Nik Go
a 'date' field implicitly gets the SQLFORM.widgets.date.widget. of course, being explicit helps make it clearer. On Friday, December 2, 2011, Rick wrote: > Thanks! This is the final code: > dayform = SQLFORM.factory( >Field('thedate', 'date', label=T(''), > widget=SQLFORM.widgets.date.wid

[web2py] Re: Hot to do the: Remember me (for 30 days) by default?

2011-12-01 Thread Alan Etkin
The default scaffolding app calls auth() wich returns a form to be shown in the client. It is a web2py helper class instance, so it can be examined and modified. FORM instances have an elements() function that returns a sequence of childs: You could modify the user action (in controller) to custom

[web2py] How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-01 Thread Constantine Vasil
After login, the _next link successfully redirect to my home page as I expected. The address bar shows /user/login#/user/login When I hit the browser back button it goes back to the login page. How to make the address bar to change according to the page where it was redirected?

[web2py] Re: Submit gutton in fields

2011-12-01 Thread Rick
Now I've a similar problem. How to make a button that shows a calendar when you click on it? The reason why I want to do that kind of button is that each time I try to write a date in the field the calendar pops up, even though I don't need it. Here is my code again: dayform = SQLFORM.factory(

[web2py] joins across databases

2011-12-01 Thread Jim Gregory
I have a legacy database that my app needs to connect to. The data in my app's table has a many-to-one relationship with the data in the legacy database's table. I'd like to retrieve records from my app's table plus the data associated with that record from the legacy database's table at the same

[web2py] Re: Best practices: When to use classes

2011-12-01 Thread pbreit
I forgot that there are some parts of Web2py that do use classes such as Virtual Fields. For those, I would suggest just copy/pasting from the Book and then editing.

[web2py] Re: Decimal vs float

2011-12-01 Thread pbreit
Great info, thanks. I hadn't thought of using Decimal type for integers that might be involved in calculations. Can I simulate an integer with something like "decimal(4,0)"? For quantity, I'd rather show "1" and not "1.0".

[web2py] Do you compile app ?

2011-12-01 Thread Omi Chiba
I never compile my app because I don't have much performance issue. I just wondering if you guys compile app every time you made the final release version. Is it always good to compile or there is some cons like you forgot to recompile after editing code... etc.

Re: [web2py]

2011-12-01 Thread pbreit
Hmmm...weird. I thnk the only advantage of Apache at this point is that more people are familiar with it. But Nginx usage is growing very rapidly and configuration is pretty straightforward.

[web2py] Hot to do the: Remember me (for 30 days) by default?

2011-12-01 Thread Constantine Vasil
I want to set the option Remember me (for 30 days) to take effect by default whether or not the user checked the checkbox when login. And if possible to hide the checkbox. How to do that?

[web2py] sqlform: vars don't work

2011-12-01 Thread puercoespin
Hello, I have a simple app. It's a cumtom SQLFORM form. When fill it in index, all seems ok, but in the redirect ('buscar_coche_ocasion'), where is the same form, raise an error: ValueError: invalid literal for int() with base 10: '|75|75|' That's is: the var 'potencia' is sending twice, and sto

[web2py] Re: SQLFORM.grid and query

2011-12-01 Thread villas
Sorry to include this in the same thread, but I think it may be of interest to a similar audience... Given that SQLFORM.grid uses DAL smart_query... It seems that smart_query does not implement: 'belongs' | 'in' Is that an omission, or by design, or have I missed something?

[web2py] How send multiple email messages with GAE deferred.defer?

2011-12-01 Thread Constantine Vasil
I want to send multiple email messages with GAE deferred.defer: deferred.defer(send_email_message, reply_to=reply_to, reply_to_email_addr=reply_to_email_addr, sender_name=sender_name, etc. ERROR=Can't

[web2py] Re: Submit gutton in fields

2011-12-01 Thread Rick
Thanks! This is the final code: dayform = SQLFORM.factory( Field('thedate', 'date', label=T(''), widget=SQLFORM.widgets.date.widget), submit_button='Some text') On Dec 1, 10:12 pm, Anthony wrote: > Submit buttons are not in fields, they are added as an input element to an > entir

Re: [web2py] Re: app slow to death (sorry double post because empyt object)

2011-12-01 Thread Richard Vézina
Answer in the text : On Thu, Dec 1, 2011 at 4:05 PM, KMax wrote: > How you have tested the load? > ~15 users accessing the app and simulating their work... > What is your CPU/RAM ? > Intel(R) core 2 CPU E7500 2.93GHz / ram 2 gig > How did you configure tread/process of wsgi ? > noting fanc

[web2py] Re: Submit gutton in fields

2011-12-01 Thread Anthony
Submit buttons are not in fields, they are added as an input element to an entire form. Where is that Field definition -- in a table definition or SQLFORM.factory? Anyway, SQLFORM takes a 'submit_button' argument, which is the text for the submit button. Anthony On Thursday, December 1, 2011 3

[web2py] One Queue

2011-12-01 Thread Martin Weissenboeck
Hi, I want to use one and only one queue (q). Some applications/controllers should act as producers (q.put(item)) and some applications/controllers as consumers (item=q.get()), but with only one queue. How can this be done? Regards, Martin

[web2py] Re: app slow to death (sorry double post because empyt object)

2011-12-01 Thread KMax
How you have tested the load? What is your CPU/RAM ? How did you configure tread/process of wsgi ? I have a case when all slow down was on .first() or .last() ofter db was populated On 1 дек, 22:44, Richard Vézina wrote: > Use top, iotop, itop and screen so I can switch between those top... > >

[web2py] Submit gutton in fields

2011-12-01 Thread Rick
Hi, How to change the text on the submit button in fields? Here'sthe code: Field('thedate', 'date', label=T(''), widget=SQLFORM.widgets.date.widget)) I tried with this, but i didn't work: Field('thedate', 'date', label=T(''), submit=INPUT(_type='submit'('Some text')), widget=SQLFORM.widgets.date.

Re: [web2py] Re: How to add a trailig slash? web2py + trailing slash needed from jQuery Mobile

2011-12-01 Thread Jonathan Lundell
On Dec 1, 2011, at 12:45 PM, Anthony wrote: > On Wednesday, November 30, 2011 11:55:13 PM UTC-5, Constantine Vasil wrote: > Are there a way to use trailing slash after page name like: /about/ > > Are you saying you want to generate URLs with the URL() function that include > a trailing slash? If

[web2py] Re: JQuery Mobile + web2py - how to set data-url attribute dynamically?

2011-12-01 Thread Anthony
What value do you want data-url to take -- is it always the URL of the current page? Then maybe URL() + '/'. On Thursday, December 1, 2011 12:05:34 AM UTC-5, Constantine Vasil wrote: > > JQuery Mobile + web2py presents unique challenge because JQuery Mobile > takes over control after server side

[web2py] Re: SQLFORM.grid and query

2011-12-01 Thread Omi Chiba
Peter, It may be related to the latest issue #519. http://code.google.com/p/web2py/issues/detail?id=519 On Dec 1, 2:29 pm, peter wrote: > I am using SQLFORM.grid. I have a boolean field todo. > > If I select this in query, and select True as the value, nothing happens. > If I click 'query' it

[web2py] Re: SQLFORM.grid and query

2011-12-01 Thread Anthony
I think you have to click "and" or "or" to get the filter added to the query. On Thursday, December 1, 2011 3:29:11 PM UTC-5, peter wrote: > > I am using SQLFORM.grid. I have a boolean field todo. > > If I select this in query, and select True as the value, nothing happens. > If I click 'query'

[web2py] Re: How to add a trailig slash? web2py + trailing slash needed from jQuery Mobile

2011-12-01 Thread Anthony
On Wednesday, November 30, 2011 11:55:13 PM UTC-5, Constantine Vasil wrote: > > Are there a way to use trailing slash after page name like: /about/ > Are you saying you want to generate URLs with the URL() function that include a trailing slash? If so, just do URL('default', 'index') + '/'. > >

[web2py] Re: "user" tickets vs. "system" exception tickets?

2011-12-01 Thread Anthony
In routes.py, you can specify routes_onerror. The error route can point to a special error handling function in the same app or another app. The error handler will receive the HTTP error code, ticket number, request.env.request_uri, and request.url as GET variables. The error handler can then p

[web2py] SQLFORM.grid and query

2011-12-01 Thread peter
I am using SQLFORM.grid. I have a boolean field todo. If I select this in query, and select True as the value, nothing happens. If I click 'query' it simply resets the query. If I click 'search', it too clears the query, and finds all the records. How can I get it to find only the records with

Re: [web2py] ImportError with plugin

2011-12-01 Thread haikuvend Resident
I installed the plugin via the admin interface, which consists of two files. I kept the module and deleted the demo controller manually, as I had no use for that.

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Constantine Vasil
How this solution handles error handling? For other fields there are messages in red below the fields.

[web2py] Re: Problem connecting web2py app to mysql server v4

2011-12-01 Thread juanduke
Solved with this "trick" I edited *gluon/dal.py* adding *try*/*except: pass* code, around the 3 lines where is this self._execute("SET sql_mode='NO_BACKSLASH_ESCAPES';")line. I'm sure that isnt the correct solution, but helped to see the app running :) If someone has a better solution, is welco

Re: [web2py] [flashback] web2py logo and layout has changed one year ago...

2011-12-01 Thread Jim Steil
As someone coming from the TurboGears environment, I would vote to keep the name the same. TG suffered/suffers greatly (in my opinion) from the change from V1 to V2. Lots of us were lost in the change. I think it's really important for web2py to remain stable. That includes the name. Logo

Re: [web2py]

2011-12-01 Thread Richard Vézina
Thanks for the cue... I try it, but it didn't solve my speed problem... I think I will switch anyway soon since it seems much better then Apache (more light)... Is there any drawback to switch to it? I will try some of the solution propose in the book about scaling... I will try by splitting my m

[web2py] Problem connecting web2py app to mysql server v4

2011-12-01 Thread juanduke
Hi All: I've developed an app, now is time to depoly in production server. In development stage the app works perfect, using with mysql v5. Even if access from console, using mysql -u *username* -p *password* -h *serverIP ... * logged in as expected. And my production server, cant be upgraded

[web2py] Re: 'id' on 1.99.3 with SQLFORM.grid and links

2011-12-01 Thread Anthony
Does your query/grid include the 'id' field? Did the same code used to work on 1.99.2? On Thursday, December 1, 2011 1:13:16 PM UTC-5, David Watson wrote: > > I am running web2py version 1.99.3 > > I have the following code in my default controller. The view shows the > item. When i run > links

[web2py] 'id' on 1.99.3 with SQLFORM.grid and links

2011-12-01 Thread David Watson
I am running web2py version 1.99.3 I have the following code in my default controller. The view shows the item. When i run links = [lambda row: A('Edit',_href=URL("default","sweeps",args=[row.id])), lambda row: A('Delete',_href=URL("default","promos",args=[row.id]))] grid2 = SQL

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Nik Go
yourlist = [[u'John Doe', u'john_...@gmail.com'], [u'Mary Doe', u' mary_...@gmail.com']] and in your validator IS_IN_SET(yourlist, *multiple=True*) multiple to render checkboxes. On Friday, December 2, 2011, Kenneth Lundström wrote: > You either have an multi select select item in the form or

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Plumo
Another fine app from Julio! What do you plan to use it for? Is anyone else interested in a helpdesk style app? An issue tracker is a good base.

[web2py] Web2py Application Exhibition Version 3.0

2011-12-01 Thread NetAdmin
Web2py Application Exhibition Version 3.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. Watch this list for more details! ( Soon ) Mr.NetAdmin

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Kenneth Lundström
You either have an multi select select item in the form or then you need to make as many field as the is e-mail addresses. Either: form.factory( Field('addresses', requires = IS_IN_SET=[[u'John Doe', u'john_...@gmail.com'], [u'Mary Doe', u'mary_...@gmail.com']])) form.factory( Field('

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Constantine Vasil
My values are not in a database but in a list: [[u'John Doe', u'john_...@gmail.com'], [u'Mary Doe', u'mary_...@gmail.com']] how to get them from there? I want names to show up next to the check boxes, when selected to know which email address is corresponding in order to send a message to this

[web2py] [flashback] web2py logo and layout has changed one year ago...

2011-12-01 Thread Nik Go
+1. The name isn't so bad. We could all probably name other projects with worse names. The packaging, if that is really important to the community would help improve the image. Django's packaging is not suprising since it was originally developed internally in a news company - who knows more stuff

[web2py] Re: How to Query on "related" fields ?

2011-12-01 Thread Cliff
>> I was thinking about doing >> budget_list= >>db().select(db.budgets.id,db.budgets.name,db.budgets.type.name,db.budgets.m >>onthly_amount,orderby=db.budgets.view_order).as_list() Do you want to do this because you are getting the budget type id in your returned rows? Try this: db.budgets.type

Re: [web2py] [flashback] web2py logo and layout has changed one year ago...

2011-12-01 Thread Nik Go
+1. The name isn't so bad. We could all probably name other projects with worse names. The packaging, if that is really important to the community would help improve the image. Django's packaging is not suprising since it was originally developed internally in a news company - the media is probabl

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Nik Go
IS_IN_DB(db, 'field.id', db.table._format, *multiple=True*) process the selection with onvalidation On Friday, December 2, 2011, Constantine Vasil wrote: > I want to use SQLFORM.factory to define a check box field with a list of > email addresses. > When the user checks several, then to send an

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread António Ramos
Better yet Call it PIERRO short and simple :) 2011/12/1 Jonathan Lundell > On Dec 1, 2011, at 8:19 AM, Jonathan Lundell wrote: > > > On Dec 1, 2011, at 8:09 AM, lyn2py wrote: > > > >>> I can name the next version "reindeer" or "rudolph" ... just kidding. > >> > >> For Christmas! > > > > Blitzen

[web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Constantine Vasil
I want to use SQLFORM.factory to define a check box field with a list of email addresses. When the user checks several, then to send an email to the selected. How to do that?

Re: [web2py] Re: [solved] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
Thanks, Anthony. Now, I understand better web2py multi-tenancy. On Thu, Dec 1, 2011 at 2:05 PM, Anthony wrote: > On Thursday, December 1, 2011 10:57:57 AM UTC-5, viniciusban wrote: >> >> I found the solution: >> >> http://groups.google.com/group/web2py/browse_thread/thread/38a07b7e00b789ac/6ba

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Jonathan Lundell
On Dec 1, 2011, at 8:19 AM, Jonathan Lundell wrote: > On Dec 1, 2011, at 8:09 AM, lyn2py wrote: > >>> I can name the next version "reindeer" or "rudolph" ... just kidding. >> >> For Christmas! > > Blitzen, obviously. Or Fulmineo.

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Jonathan Lundell
On Dec 1, 2011, at 8:09 AM, lyn2py wrote: >> I can name the next version "reindeer" or "rudolph" ... just kidding. > > For Christmas! Blitzen, obviously.

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread Anthony
> > > You could check for login after creating the form but before processing > it, > > and if not logged in, still return the form, with the flash message. > > > I appreciate your guidance and assistance (a website? code examples?) > to do this. Thank you! > Maybe something like this (not tested

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread lyn2py
> I can name the next version "reindeer" or "rudolph" ... just kidding. For Christmas!

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread lyn2py
On Dec 1, 11:53 pm, Anthony wrote: > On Thursday, December 1, 2011 10:37:20 AM UTC-5, lyn2py wrote: > > > Reply below > > > On Dec 1, 11:15 pm, Anthony wrote: > > > When the form is submitted, your function first checks if the user is > > > logged in -- if not, it never gets to the code that cr

[web2py] Re: [solved] Doubt about multi-tenancy

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 10:57:57 AM UTC-5, viniciusban wrote: > > I found the solution: > > http://groups.google.com/group/web2py/browse_thread/thread/38a07b7e00b789ac/6bae4627c7587ddd?lnk=gst&q=tenant#6bae4627c7587ddd In fact, I don't think you specifically have to use 'ignore_tenant' -- I

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Omi Chiba
Massimo, > It does take time and effort in building a brand and we are succeeded. > We should not start again. We can give animal names to various stable > version if you like. Yap, I knew it doesn't make sense to discuss changing the name now. We should stick with the current name to keep the br

[web2py] [solved] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
I found the solution: http://groups.google.com/group/web2py/browse_thread/thread/38a07b7e00b789ac/6bae4627c7587ddd?lnk=gst&q=tenant#6bae4627c7587ddd On Thu, Dec 1, 2011 at 1:52 PM, Vinicius Assef wrote: > Actually, may I remake my question. > > Taking the book example of multi-tenancy, what if

[web2py] Re: Doubt about multi-tenancy

2011-12-01 Thread lyn2py
Profiles c, d and e can be implemented with groups or permissions: http://web2py.com/book/default/chapter/08#Decorators http://web2py.com/book/default/chapter/08#Combining-Requirements If you've tried the above and it doesn't work, post your code to receive help! Sometimes after looking at the sam

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 10:37:20 AM UTC-5, lyn2py wrote: > > Reply below > > On Dec 1, 11:15 pm, Anthony wrote: > > When the form is submitted, your function first checks if the user is > > logged in -- if not, it never gets to the code that creates or processes > > the form, so of course it

Re: [web2py] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
Actually, may I remake my question. Taking the book example of multi-tenancy, what if I have a role that can read anything, from the tables with multi-tenancy? Is it possible to have queries that don't filter automatically? -- Vinicius Assef. On Thu, Dec 1, 2011 at 1:38 PM, Nik Go wrote: > re

[web2py] Re: How to Query on "related" fields ?

2011-12-01 Thread Omi Chiba
Manakel, I'm also pretty sure you need to use join. Here's my related forum post. http://groups.google.com/group/fameisfame/browse_thread/thread/3b5de92b728d3d5a/b7cbc4a3740b5ecc?q=#b7cbc4a3740b5ecc On Dec 1, 8:40 am, Manakel wrote: > Hello, > > I have a model with 2 tables with a "reference" re

Re: [web2py] app slow to death (sorry double post because empyt object)

2011-12-01 Thread Richard Vézina
Use top, iotop, itop and screen so I can switch between those top... I tried what preibt suggest on other thread (same thread double post one without object) and replace Apache and wsgi by nginx and uwsgi... No much difference and still the 45% 100%... But it sometime goes over 45%. For those seco

  1   2   >