[web2py] Deploying Web2py App on Bluehost

2015-02-10 Thread web2py user
I have Python, Web2py and various database technologies installed on an Linux server (say 123.45.67.89). Assuming I've configured my application, databases, and folder permissions properly, is deploying my Web2py application as simple as launching Web2py (the command on my machine would be

[web2py] Deploying Web2py on Bluehost

2015-02-10 Thread web2py user
I posted this on Stackoverflow; thought someone here might be able to help. I have Python, Web2py and various database technologies installed on an Linux server (say 123.45.67.89). Assuming I've configured my application, databases, and folder permissions properly, is deploying my Web2py

[web2py] Re: Why does appadmin have css overflow: hidden in database results?

2014-04-14 Thread User
13:32:41 UTC+2, User ha scritto: Sorry you're right it's auto not hidden that was a typo. But why not make it visible? On Sunday, April 13, 2014 5:37:53 AM UTC-4, Paolo Caruccio wrote: If you mean the view *appadmin/select/db?query=your query* actually the table with the resulting rows

[web2py] Re: Why does appadmin have css overflow: hidden in database results?

2014-04-14 Thread User
easily customize it by replacing the line 68 in /views/appadmin.html with a simple div. Il giorno lunedì 14 aprile 2014 08:25:00 UTC+2, User ha scritto: Yes but with overflow:visible (the default css setting) there are no scroll bars and if the table has enough columns then the browser

[web2py] Re: Why does appadmin have css overflow: hidden in database results?

2014-04-13 Thread User
with arrow keys on the keyboard. For the sake of completeness, if the div wrapper had overflow:hidden you couldn't see any scrollbar. Il giorno domenica 13 aprile 2014 03:01:35 UTC+2, User ha scritto: In appadmin, if I query a table that has more columns than the width of my browser

[web2py] Why does appadmin have css overflow: hidden in database results?

2014-04-12 Thread User
In appadmin, if I query a table that has more columns than the width of my browser there will be a horizontal scrollbar places on the div containing the database rows. I find this annoying because in order to scroll horizontally I have to go to the bottom of the search results first to find

[web2py] Re: New Windows Vista Install problem

2014-03-27 Thread User
Did you install web2py source version or web2py_win.zip? What python version are you using? And when you run it, what are you doing specifically? On Wednesday, March 26, 2014 4:51:30 PM UTC-4, ian james wrote: I have installed Win2py on my Vista laptop. (My laptop video hardware is not

[web2py] Re: Understanding translation and accept-language header?

2014-03-16 Thread User
to be, but is this connected with the definitions of: '!langcode!': 'en-us', '!langname!': 'English (US)', that can be found in languages/default.py? Regards On Friday, March 14, 2014 8:39:21 PM UTC+1, User wrote: I'd really like to understand this. If I set the current language to 'en', why

[web2py] Re: Understanding translation and accept-language header?

2014-03-16 Thread User
', '!langname!': 'English (US)', that can be found in languages/default.py? Regards On Friday, March 14, 2014 8:39:21 PM UTC+1, User wrote: I'd really like to understand this. If I set the current language to 'en', why does en-gb get translated but en-us does not get translated? On Sunday

[web2py] Re: Understanding translation and accept-language header?

2014-03-14 Thread User
I'd really like to understand this. If I set the current language to 'en', why does en-gb get translated but en-us does not get translated? On Sunday, March 9, 2014 10:31:57 PM UTC-4, User wrote: So why do en-us and en-gb behave differently? That is, why is en-gb translated and en-us

[web2py] Re: Understanding translation and accept-language header?

2014-03-09 Thread User
behaviour. On Friday, 7 March 2014 17:49:23 UTC-6, User wrote: I made a bare bones app based on the welcome app: In db.py: T.current_languages = ['en'] in en-us.py: # -*- coding: utf-8 -*- { '!langcode!': 'en-us', '!langname!': 'English (American)', 'xyztest': 'Pass! (US English

[web2py] meta.description = None?

2014-03-07 Thread User
Sometimes I want to completely remove the meta description tag (as this is one of the recommended options according to Google: http://www.youtube.com/watch?v=W4gr88oHb-k) For example I have a default meta description tag defined in menu.py (as is in the welcome app). Then in a specific

[web2py] Re: meta.description = None?

2014-03-07 Thread User
remove the response.meta.description line from menu.py. Anthony On Friday, March 7, 2014 1:02:10 PM UTC-5, User wrote: Sometimes I want to completely remove the meta description tag (as this is one of the recommended options according to Google: http://www.youtube.com/watch?v=W4gr88oHb-k

[web2py] Re: meta.description = None?

2014-03-07 Thread User
On Friday, March 7, 2014 4:08:56 PM UTC-5, Anthony wrote: On Friday, March 7, 2014 2:58:19 PM UTC-5, User wrote: That works and I have done that but it still doesn't address that setting description to None prints out the string None. Why would you explicitly set it to None rather than

[web2py] Re: meta.description = None?

2014-03-07 Thread User
Issue created: http://code.google.com/p/web2py/issues/detail?id=1891 On Friday, March 7, 2014 4:34:54 PM UTC-5, User wrote: On Friday, March 7, 2014 4:08:56 PM UTC-5, Anthony wrote: On Friday, March 7, 2014 2:58:19 PM UTC-5, User wrote: That works and I have done that but it still doesn't

[web2py] Understanding translation and accept-language header?

2014-03-07 Thread User
I made a bare bones app based on the welcome app: In db.py: T.current_languages = ['en'] in en-us.py: # -*- coding: utf-8 -*- { '!langcode!': 'en-us', '!langname!': 'English (American)', 'xyztest': 'Pass! (US English)' } in en-gb.py: # -*- coding: utf-8 -*- { '!langcode!': 'en-gb',

Re: [web2py] Re: How do I track who clicks a submit button?

2014-03-07 Thread User
the default to auth.user_id. Whenever a record is inserted or updated, you then have the id of the user. In any case, the current logged in user's id is in auth.user_id (which is None if the user isn't logged in), so you could store that wherever you like upon form submission

[web2py] Re: Can I specify a display name in emails sent via auth.settings.mailer?

2014-03-06 Thread User
Anyone? On Wednesday, February 5, 2014 6:26:01 PM UTC-5, User wrote: I would like the from address of automated emails for user registration, retrieve password, etc to have a display name. How can I do this? Currently my mailer is defined similar to: mail = auth.settings.mailer

[web2py] Re: appadmin redirects to admin on first try?

2014-03-05 Thread User
No I am not being redirected to admin login page first. I have edited admin/models/0.py: EXPIRATION = 48 * 60 * 60 # logout after 48 hours of inactivity A while could be 24 hours. On Tuesday, March 4, 2014 4:28:38 PM UTC-5, Anthony wrote: On Tuesday, March 4, 2014 4:06:58 PM UTC-5, User

[web2py] appadmin redirects to admin on first try?

2014-03-04 Thread User
Whenever I visit my appadmin page url it redirects me to the admin page on the first try. If I go to my appadmin page a second time it will correctly take me to appadmin. For example: I visit: https://www.example.com/my_app/appadmin/index This redirects me to the following on the first try:

[web2py] Re: appadmin redirects to admin on first try?

2014-03-04 Thread User
I am already logged in, but haven't visited the site in a while. On Tuesday, March 4, 2014 3:44:31 PM UTC-5, Anthony wrote: Are you being asked to log in to admin, or are you already logged in at the time? On Tuesday, March 4, 2014 3:37:23 PM UTC-5, User wrote: Whenever I visit my

[web2py] Re: Date display i18n internationalization?

2014-02-25 Thread User
= [] T.force(T.http_accept_language) This should work. I will try figure out why T.set_current_languages() does not. On Monday, 24 February 2014 18:07:40 UTC-6, User wrote: This does not appear to work the string is not translated. Also the following doesn't work either

[web2py] Re: Date display i18n internationalization?

2014-02-25 Thread User
6, in module T.force(T.http_accept_language) File C:\www\web2py\gluon\languages.py, line 661, in force self.accepted_language = language or self.current_languages[0] IndexError: list index out of range On Tuesday, February 25, 2014 9:09:55 PM UTC-5, User wrote: Thanks this does work

[web2py] Re: Date display i18n internationalization?

2014-02-24 Thread User
. You need: T.current_languages = [] Otherwise this is set to T.current_languages = ['en'] and it things the current language is english and therefore it does not need translation. On Monday, 24 February 2014 01:45:49 UTC-6, User wrote: In fact, if I put an entry in en-gb.py

[web2py] Re: Date display i18n internationalization?

2014-02-24 Thread User
-5, Massimo Di Pierro wrote: Ok. One more try: T.set_current_languages() On Monday, 24 February 2014 17:36:10 UTC-6, User wrote: I added T.current_languages = [] to the end of my model but this did nothing. Then I tried: T.current_languages = [] T.force('en-us') This caused

[web2py] Date display i18n internationalization?

2014-02-23 Thread User
I have some dates that I want to display in the proper culture specific format. I want a simple solution so what I want is rather than me having to specify the date format for every possible culture is to use the following default: dd-mm- and then specify a handful of exceptions, e.g.

[web2py] Re: Date display i18n internationalization?

2014-02-23 Thread User
full firefox header is: Accept-Language en-us,en;q=0.5 What am I missing about how T works? On Sunday, February 23, 2014 8:39:56 PM UTC-5, Massimo Di Pierro wrote: https://groups.google.com/forum/#!msg/web2py/ZxdTaSM1Fpk/hGryHgztlPQJ On Sunday, 23 February 2014 19:06:56 UTC-6, User wrote: I

[web2py] Re: Date display i18n internationalization?

2014-02-23 Thread User
('dd mmm ')}}) translated? What if you add the following to your model? T.force('en-us') On Sunday, 23 February 2014 23:08:14 UTC-6, User wrote: Sorry I'm not following the relevance of that forum topic. What I'm trying to do for example is: I have a date in javascript in a view

[web2py] Re: Date display i18n internationalization?

2014-02-23 Thread User
Also I tried in web2py shell: str(T('this-is-a-test', language='en-us')) which returns: 'this-is-a-test' Not sure if this makes any sense calling from the shell but figured I try it. On Monday, February 24, 2014 2:02:25 AM UTC-5, User wrote: This in layout.html. Viewing the rendered

[web2py] Re: Date display i18n internationalization?

2014-02-23 Thread User
, 2014 2:13:04 AM UTC-5, User wrote: Also I tried in web2py shell: str(T('this-is-a-test', language='en-us')) which returns: 'this-is-a-test' Not sure if this makes any sense calling from the shell but figured I try it. On Monday, February 24, 2014 2:02:25 AM UTC-5, User wrote

[web2py] Re: Date display i18n internationalization?

2014-02-23 Thread User
In fact, it put an entry in en-gb.py and set my browser accept to en-gb it will correctly pick up this string, but for some reason it's not picking up the string in en-us (unless I'm doing something wrong). Also interesting to note, is when I view in en-gb or es, web2py seems to automatically

[web2py] Use custom XML TAG to generate void or self-closing tags?

2014-02-21 Thread User
How can I generate a self-closing tag ( http://dev.w3.org/html5/html-author/#start-tag) or void element using the TAG helper? For example, in the header I want to generate: link rel=next href=http://example.com/article?pg=2; or link rel=next href=http://example.com/article?pg=2/ However

[web2py] Re: Use custom XML TAG to generate void or self-closing tags?

2014-02-21 Thread User
must end with a /, so to do that, you need to use the TAG[tagname] syntax instead of TAG.tagname. Anthony On Friday, February 21, 2014 4:43:08 PM UTC-5, User wrote: How can I generate a self-closing tag ( http://dev.w3.org/html5/html-author/#start-tag) or void element using the TAG helper

[web2py] Re: How can I restrict an input field to latin alphabet characters only?

2014-02-20 Thread User
I agree the IS_MATCH could work but what is the regex that you would use? On Thursday, February 20, 2014 9:06:23 AM UTC-5, Leonel Câmara wrote: I'm guessing you can use IS_MATCH. Another alternative, you could make a validator that would try and encode a unicode version of the text you're

[web2py] How can I restrict an input field to latin alphabet characters only?

2014-02-19 Thread User
How can I restrict an input field to (extended) latin alphabet characters only? I'm thinking a validator that will return an error message if characters are not extended Latin characters Basically I want to allow: Zürich or Cancún but reject: 上海市 or دبي -- Resources: - http://web2py.com -

[web2py] Re: Version Control advice

2014-02-19 Thread User
I also agree with separate repositories per app. My web2py folder is a mercurial repository (I cloned the web2py repository http://code.google.com/p/web2py/source/checkout) Then for each application I want to make, I create a new repository for that application in the web2py/applications

Re: [web2py] How can I run postgresql VACUUM from web2py?

2014-02-18 Thread User
autovacuum = on Except you have particular need should be alright with postgres 9 + Richard On Mon, Feb 17, 2014 at 8:42 PM, User sour...@gmail.com javascript:wrote: I'm trying to run postgresql vacuum from web2py (ultimately to be run by a scheduled task) and I get the following error

[web2py] How can I run postgresql VACUUM from web2py?

2014-02-17 Thread User
I'm trying to run postgresql vacuum from web2py (ultimately to be run by a scheduled task) and I get the following error: db.executesql('VACUUM sometable;') *** ProgrammingError: ('ERROR', '25001', 'VACUUM cannot run inside a transaction block') How can I run VACUUM from web2py? --

[web2py] ReCaptcha: type 'exceptions.SyntaxError' setting key 'login_catpcha' does not exist?

2014-02-14 Thread User
I want to add a captcha to my login form. Eventually I want this to be conditional based on how many login attemps have been made. However, my first step is to get it to show on the login form. In my default.py controller I have: def user(): function = request.args(0) if function

[web2py] Re: ReCaptcha: type 'exceptions.SyntaxError' setting key 'login_catpcha' does not exist?

2014-02-14 Thread User
11:31:57 UTC-6, User wrote: I want to add a captcha to my login form. Eventually I want this to be conditional based on how many login attemps have been made. However, my first step is to get it to show on the login form. In my default.py controller I have: def user(): function

[web2py] Re: How can I show response.flash messages with different styles?

2014-02-13 Thread User
', data =dict(dismiss='alert')), message, class='alert alert-%s' % type) response.flash = flash('You did it!', 'success') Anthony On Wednesday, February 12, 2014 8:54:46 PM UTC-5, User wrote: I am using bootstrap 2.3.2 and I would like to use Bootstrap css alert classes

[web2py] Recording failed login attempts in database via login_onfail?

2014-02-13 Thread User
which user failed the login from this function handler? As far as I can see it doesn't take the login form as an argument like onaccept. Or if that is not possible where in the chain of events can I increment this count on a failed login? -- Resources: - http://web2py.com - http://web2py.com

[web2py] Re: How can I show response.flash messages with different styles?

2014-02-12 Thread User
and if it were to happen would be easy enough to change) On Wednesday, February 12, 2014 9:36:58 PM UTC-5, Anthony wrote: Does your solution below not work? On Wednesday, February 12, 2014 8:54:46 PM UTC-5, User wrote: I am using bootstrap 2.3.2 and I would like to use Bootstrap css alert

[web2py] Re: possible bug with IS_TIME() midnight in 12 hour format?

2014-02-11 Thread User
= IS_TIME()('12:00 pm') self.assertEqual(rtn, (datetime.time(12, 0), None)) On Tuesday, February 11, 2014 9:10:51 AM UTC-5, Massimo Di Pierro wrote: You are right. Now fixed in trunk. On Tuesday, 11 February 2014 01:57:25 UTC-6, User wrote: I have an input field on a form where users can

[web2py] Re: web2py scheduler

2014-02-11 Thread User
You could try adding standard python logging statements to try to figure out what's happening. Edit web2py-root/logging.conf and add an entry for your app following the instructions in the file. Then in scheduler.py: import logging def your_scheduled_function(): logger =

[web2py] Re: possible bug with IS_TIME() midnight in 12 hour format?

2014-02-11 Thread User
Possibly, I have never contributed to an open source project so I don't know what's involved. Are there instructions somewhere? On Tuesday, February 11, 2014 11:21:15 AM UTC-5, Massimo Di Pierro wrote: I agree. Can you submit a patch? On Tuesday, 11 February 2014 09:33:40 UTC-6, User wrote

[web2py] Re: possible bug with IS_TIME() midnight in 12 hour format?

2014-02-11 Thread User
On Tuesday, February 11, 2014 11:31:16 AM UTC-5, User wrote: Possibly, I have never contributed to an open source project so I don't know what's involved. Are there instructions somewhere? On Tuesday, February 11, 2014 11:21:15 AM UTC-5, Massimo Di Pierro wrote: I agree. Can you submit

[web2py] possible bug with IS_TIME() midnight in 12 hour format?

2014-02-10 Thread User
I have an input field on a form where users can enter a time in 12-hour format. Entering 12:00AM on this form seems to be getting interpreted as 12PM (debugging I can see the python time object is datetime.time(12, 0). Calling the validator directly in the web2py shell gives: rtn =

[web2py] Can I specify a display name in emails sent via auth.settings.mailer?

2014-02-05 Thread User
I would like the from address of automated emails for user registration, retrieve password, etc to have a display name. How can I do this? Currently my mailer is defined similar to: mail = auth.settings.mailer mail.settings.server = 'logging' or 'smtp.gmail.com:587' mail.settings.sender = 'i

[web2py] Re: Do I need to set auth.settings.hmac_key?

2014-01-31 Thread User
Should I create an issue for changes to the book? Or do you already have it notated? On Friday, January 31, 2014 12:55:51 PM UTC-5, Massimo Di Pierro wrote: It should be modified. On Thursday, 30 January 2014 11:35:08 UTC-6, User wrote: Ok I was confused because the books says ( http

[web2py] Re: Do I need to set auth.settings.hmac_key?

2014-01-30 Thread User
it or not as the two sections kind of go against each other. On Thursday, January 30, 2014 8:42:37 AM UTC-5, Massimo Di Pierro wrote: This is really not necessary since we automatically salt and hash all passwords. On Tuesday, 28 January 2014 17:04:37 UTC-6, User wrote: Is best practice

[web2py] request.is_local not working?

2014-01-30 Thread User
I'm using web2py on webfaction and as far as I can tell request.is_local is not working. I have a page that uses the generic.html view which has the following lines: {{if request.is_local:}} {{=response.toolbar()}} {{pass}} The web2py book says: request.is_local: True if the client is

[web2py] Re: Pattern-based Application-Specific URL rewrite basic example?

2014-01-29 Thread User
repository. On Tuesday, January 28, 2014 11:25:07 PM UTC-5, User wrote: My web2py-root/routes.py currently has: # -*- coding: utf-8 -*- # default_application, default_controller, default_function # are used when the respective element is missing from the # (possibly rewritten) incoming URL

[web2py] How to change password Too short message?

2014-01-28 Thread User
When registering a new user using the default Auth forms, if the password entered is too short, an error message Too short is displayed. I would like to change this message to something more meaningful such as Password must be at least x characters 1. How do I do this? 2. Shouldn't

[web2py] Location of auth.settings statements relative to auth.define_tables?

2014-01-28 Thread User
In the welcome application, all auth.settings statements appear after auth.define_tables statement: ## create all tables needed by auth if not custom tables auth.define_tables(username=False, signature=False) ## configure email mail = auth.settings.mailer mail.settings.server = 'logging' or

[web2py] Do I need to set auth.settings.hmac_key?

2014-01-28 Thread User
Is best practice to set auth.settings.hmac_key='sha512:somelongpassword'? Or is this not necessary? And if I should do it, does it need to be done before auth.define_tables? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: How to change password Too short message?

2014-01-28 Thread User
Thanks, issue created: http://code.google.com/p/web2py/issues/detail?id=1863 On Tuesday, January 28, 2014 6:57:35 PM UTC-5, Anthony wrote: On Tuesday, January 28, 2014 4:46:27 PM UTC-5, User wrote: When registering a new user using the default Auth forms, if the password entered is too

[web2py] Blocking/lockout for excessive login attempts?

2014-01-28 Thread User
Does web2py have any ability to block too many login attempts from occurring perhaps by locking the user out? Or showing a captcha after x login tries? Or some other feature to mitigate brute force password attempts? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] What is the purpose of the ABOUT file in an application?

2014-01-28 Thread User
In the welcome application there is an ABOUT file whose contents are: Write something about this app. Developed with web2py. What's the intended purpose of this file and is it protected from end users' viewing? Is this for developers? Also is the LICENSE file protected from end user viewing

[web2py] Pattern-based Application-Specific URL rewrite basic example?

2014-01-28 Thread User
My web2py-root/routes.py currently has: # -*- coding: utf-8 -*- # default_application, default_controller, default_function # are used when the respective element is missing from the # (possibly rewritten) incoming URL # default_application = 'init'# ordinarily set in base routes.py

[web2py] Re: RFC: validator IS_NOT_IN_SET

2014-01-27 Thread User
I think this is a useful validator, any chance this can end up in web2py? On Friday, August 9, 2013 4:13:30 PM UTC-4, Kyle Flanagan wrote: I had to use this today. However, this does not work correctly when the set is empty. We assume that if the set is empty, whatever variable value being

[web2py] Getting a 400 bad request instead of 404 for urls with hyphens?

2014-01-27 Thread User
I am trying to get error handling for page not found errors working. I'm using the following example: http://www.web2pyslices.com/slice/show/1529/custom-error-routing This seems to be working for URLs such as www.example.com/asdf www.example.com/longurlthatdoesnotexit?_next=/ I get my 404

[web2py] Minimum password length not working?

2014-01-27 Thread User
In the web2py book it says: By default, auth also requires a minimum password length of 4. This can be changed: auth.settings.password_min_length = 4 (from http://www.web2py.com/book/default/chapter/09#Settings-and-messages) So I tried changing to: auth.settings.password_min_length = 7

[web2py] Re: What is the purpose of data-w2p_disable_with?

2014-01-26 Thread User
().replace(' data-w2p_disable_with=default', '') Anyway, we should probably change the behavior of A() so it doesn't add that attribute when not needed. Anthony On Monday, January 20, 2014 2:22:17 PM UTC-5, User wrote: Anyone know how to remove it? I'm about to switch to using raw html

[web2py] Warning about using web2py URL rewrite?

2014-01-24 Thread User
http://www.web2py.com/AlterEgo/default/show/42 says: web2py supports URL rerwite although this is not really recommended. You should really use Apache (or lighttpd) + mod_proxy (or mod_rewrite) for this purpose. Moreover rewriting web2py urls can break links in applications. So *do not do

[web2py] URL-based languages for pattern-based routing?

2014-01-24 Thread User
I'm using pattern-based routing to meet some of my routing needs. How can I support URL-based languages (as described in http://www.web2py.com/book/default/chapter/04#Parameter-based-system) but with the pattern-based routing? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-01-23 Thread User
. Anthony On Wednesday, January 22, 2014 1:13:30 PM UTC-5, User wrote: I also would like a non-null foreign key reference, but like OP experienced web2py will not create one (I'm using postgresql). Why is this? And is there a workaround to make reference fields not null? Or worst case

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-01-22 Thread User
I also would like a non-null foreign key reference, but like OP experienced web2py will not create one. Why is this? And is there a workaround to make reference fields not null? Or worst case can I add the not null constraint manually in the db without breaking anything? On Tuesday, June

[web2py] Re: What is the purpose of data-w2p_disable_with?

2014-01-20 Thread User
On Saturday, January 4, 2014 1:25:43 AM UTC-5, User wrote: Good to know. How can I remove it for all my links? On Monday, December 30, 2013 8:18:11 PM UTC-5, Anthony wrote: That's so the link can be temporarily disabled (the text will be replaced with Working...) when it is used to trigger an Ajax

[web2py] Select scalar?

2014-01-15 Thread User
Is there a convenience method to select a scalar value from a database table? What I do currently is: db(db.customer.id == 5).select(db.customer.first_name).first().first_name If not would it make sense to add one? Seems like a reasonably common use case. Maybe something like

[web2py] Re: Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-14 Thread User
list:string data is there (in the web2py representation format). hello, world - |hello|world| one, two - |one|two| Would it make sense for the migration process to handle this more gracefully? On Monday, January 13, 2014 3:34:47 PM UTC-5, User wrote: Does a migration from a 'string' field

[web2py] Re: SQLFORM and IS_IN_SET problem

2014-01-14 Thread User
, January 14, 2014 1:18:11 AM UTC-5, User wrote: So I tested the migration feature and string to list:string doesn't work. So we are left with the fact that a list:string field with IS_IN_SET multiple=False will not select the current value in an SQLFORM. Seems kind of like a bug to me, does

[web2py] Re: Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-14 Thread User
through the records and put a pipe character (|) before and after each string. Perhaps this can be automated -- you can submit an issue on Google Code. Anthony On Tuesday, January 14, 2014 1:21:52 AM UTC-5, User wrote: It appears it will leave the string data that exists in the string

[web2py] Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-13 Thread User
Does a migration from a 'string' field to a 'list:string' field preserve string data that is already in the database and convert it to the format required by list:string? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-13 Thread User
- ell something - omthin world - orl Migration back from list:string to string will preserve the existing list:string data in the web2py representation: hello, world - |hello|world| one, two - |one|two| On Monday, January 13, 2014 3:34:47 PM UTC-5, User wrote: Does a migration from a 'string

[web2py] Re: SQLFORM and IS_IN_SET problem

2014-01-13 Thread User
, 2014 8:08:13 PM UTC-5, User wrote: I have the same problem as the original poster. I am only storing a single value as of now but I'm using list:string instead of string so that if I change my mind to allow multiple values it will be easier to transition. Is this a bug that it won't preselect

[web2py] Re: Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-13 Thread User
- |hello|world| one, two - |one|two| Would it make sense for the migration process to handle this more gracefully? On Monday, January 13, 2014 3:34:47 PM UTC-5, User wrote: Does a migration from a 'string' field to a 'list:string' field preserve string data that is already in the database

[web2py] Re: Data Fixtures

2014-01-13 Thread User
I have the same question. Is there any update on this almost 2 years later? On Thursday, March 8, 2012 4:32:45 PM UTC-5, Bruce Wade wrote: Hi, I have seen lots of postings about people wanting to pre-load data (fixtures) in web2py. However I have never found a standard solution. What are

Re: [web2py] Re: Debugging with the scheduler

2014-01-11 Thread User
For future reference just adding the fact that you can open a web2py shell and call your scheduler tasks directly in order to debug them. This wasn't obvious to me but is much easier than trying to run the scheduler and debug it via logging statements. For example: python web2py.py -M -S

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread User
* tables. On Friday, January 10, 2014 2:09:26 AM UTC+1, User wrote: I'm just getting started with the scheduler and I'm getting an error when I start it on windows 7: C:\www\web2pypython web2py.py -K my_app web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2014 Version 2.8.2

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread User
._common_fields.append to see if that fixes it. On Friday, January 10, 2014 10:53:22 AM UTC-5, User wrote: postgresql. Also my app which uses same database works and I can see the tables and the row in scheduler_task table from appadmin On Friday, January 10, 2014 9:57:25 AM UTC-5, Niphlod wrote

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread User
of a logged in user? On Friday, January 10, 2014 7:07:32 PM UTC-5, User wrote: I created a bare bones app and the scheduler seems to work without error. Not really sure what's happening with the problem app but if I had to guess I'm thinking it might be related to using db

[web2py] Scheduler: Error retrieving status?

2014-01-09 Thread User
I'm just getting started with the scheduler and I'm getting an error when I start it on windows 7: C:\www\web2pypython web2py.py -K my_app web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2014 Version 2.8.2-stable+timestamp.2013.12.09.17.54.55 Database drivers available:

[web2py] Re: SQLFORM and IS_IN_SET problem

2014-01-07 Thread User
I have the same problem as the original poster. I am only storing a single value as of now but I'm using list:string instead of string so that if I change my mind to allow multiple values it will be easier to transition. Is this a bug that it won't preselect the selected value?

[web2py] Re: Virtual field for latitude and longitude from geometry field?

2014-01-03 Thread User
, Christian Foster Howes wrote: i bet that by the time your lambda is running the point has been converted to a string already. can you see if that is true? i'm not sure how to invoke db functions in a lambda of a virtual field. :( On Wednesday, January 1, 2014 5:50:54 PM UTC-8, User

[web2py] Re: What is the purpose of data-w2p_disable_with?

2014-01-03 Thread User
in the anchor tag in all cases -- seems like it would only be needed when the cid, component, or callback arguments are used. Anthony On Monday, December 30, 2013 5:39:53 PM UTC-5, User wrote: Links I build with the anchor A html helper look like: a href=/myapp/mycontroller/view/5 data

[web2py] Re: Select all fields plus a calculated field?

2014-01-02 Thread User
location.latitude = row.latitude location.longitude = row.longitude It works but it's a little kludgy as far as I'm concerned. Anyone have a cleaner solution? On Tuesday, December 31, 2013 7:00:10 PM UTC-5, User wrote: What is the proper way to select all fields plus a few additional calculated fields

[web2py] Virtual field for latitude and longitude from geometry field?

2014-01-01 Thread User
Suppose I have a table like: db.define_table('location', Field(name, 'string'), Field('point', 'geometry()') ) I want to have the latitude and longitude as attributes also (whose value can be derived from the point field). So I try this: db.define_table('location', Field(name,

[web2py] Select all fields plus a calculated field?

2013-12-31 Thread User
What is the proper way to select all fields plus a few additional calculated fields? Here is my basic query with no calculated field location = db(db.location.id == loc_id).select().first() This query returns location as a class 'gluon.dal.Row' object with fields for the location table as

[web2py] What is the purpose of data-w2p_disable_with?

2013-12-30 Thread User
Links I build with the anchor A html helper look like: a href=/myapp/mycontroller/view/5 data-w2p_disable_with=defaultAnchor Text/a What is the purpose of the data-w2p_disable_with = default attribute and how can I remove it? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] SQLFORM.factory defaults?

2013-12-29 Thread User
I'm creating a form that is not based on a database table. I understand I can add a default to a field created with SQLFORM.factory, for example: form = SQLFORM.factory( Field('name', 'string', default='John'), ... is it possible to specify a default after the above

[web2py] Re: Spatial/GIS: find records within X distance of point?

2013-12-09 Thread User
. Please check it. On Sunday, 8 December 2013 07:02:06 UTC-6, User wrote: I'm storing latitude/longitude coordinates in a geometry field (using PostgreSQL 9.1.10): Field('point', 'geometry()') I understand there is also the geography type but from my reading geometry is faster

[web2py] Re: Spatial/GIS: find records within X distance of point?

2013-12-09 Thread User
different? On Monday, December 9, 2013 4:45:27 PM UTC-5, Massimo Di Pierro wrote: OK. This needs more work than anticipated. Looks like the Query object only supports unary and binary operators. Give me a little more time. ;-) On Monday, 9 December 2013 12:21:37 UTC-6, User wrote: Thanks

[web2py] Re: Spatial/GIS: find records within X distance of point?

2013-12-09 Thread User
too, until we come up with a better design. I used the same trick as in REPLACE, in trunk. Please give it a try. Massimo On Monday, 9 December 2013 16:33:09 UTC-6, User wrote: Forgive me because I don't understand anything about the internals of web2py but doesn't REPLACE take three

[web2py] Re: Spatial/GIS: find records within X distance of point?

2013-12-09 Thread User
, Massimo Di Pierro wrote: You are right. Please check again. On Monday, 9 December 2013 17:16:17 UTC-6, User wrote: Thanks, on line 2987 I believe the format string is missing the 3rd '%s' parameter: return 'ST_DWithin(%s,%s)' %(self.expand(first), self.expand(second, first.type

[web2py] Spatial/GIS: find records within X distance of point?

2013-12-08 Thread User
I'm storing latitude/longitude coordinates in a geometry field (using PostgreSQL 9.1.10): Field('point', 'geometry()') I understand there is also the geography type but from my reading geometry is faster and is suitable for small distances (

[web2py] Re: sqlform.grid with div instead of html tables

2013-11-20 Thread User
asking for disasters at any new release of the grid's code (and lots of cpu wasted for nothing) On Wednesday, November 20, 2013 3:11:51 AM UTC+1, User wrote: This sounds like what I'm looking for. Currently I'm manually creating a list display by having a for loop in the view to spit out li

[web2py] Re: Updating auth.user extra_fields?

2013-11-19 Thread User
19, 2013 7:28:33 AM UTC-5, Eduardo Cruz wrote: db(db.auth_user.id == auth.user.id).update(pagesize=100) it will update the database. El martes, 19 de noviembre de 2013 03:38:40 UTC-4, User escribió: I want to store user page size preference for when there is a list view of items

[web2py] Re: sqlform.grid with div instead of html tables

2013-11-19 Thread User
This sounds like what I'm looking for. Currently I'm manually creating a list display by having a for loop in the view to spit out li items. However I'm wondering if I can use sqlform.grid to replace the custom ul list. 1. Is this expected usage of sqlform.grid or is this more of a hack? 2.

[web2py] Re: Updating auth.user extra_fields?

2013-11-19 Thread User
was discussed as a possible workaround. On Tuesday, November 19, 2013 2:38:40 AM UTC-5, User wrote: I want to store user page size preference for when there is a list view of items that needs pagination and have that preference persist between logins. Two questions about this: 1. I decided

  1   2   >