Re: [web2py] Javascript event onchange with Calendar

2013-11-05 Thread José Luis Redrejo
2013/11/6 Diogo Munaro : > No jose, try use .on instead of .change as the example > I tried it too, without success. > Em 05/11/2013 16:19, "José Luis Redrejo" escreveu: > >> 2013/11/5 Diogo Munaro : >> > Hi josé, you tried handle onchange with jquery on function? Phehaps some >> > js >> > afte

Re: [web2py] Re: User_agent problem after this morning update from the trunk

2013-11-05 Thread Johann Spies
On 5 November 2013 22:12, Massimo Di Pierro wrote: > Can you clean the session files and re-try? > > Thanks. Yes that seems to solve the problem. Why? Regards Johann -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - htt

Re: [web2py] Re: Membership no longer respected.

2013-11-05 Thread Johann Spies
Thanks for the guess Leonel. As I showed in my first email in this thread I do use response.menu += documentation_menu I found that if I leave out the membership condition and use just if auth.user: it works as before. There must be something funny on the production server that the m

[web2py] Databases folder and the files

2013-11-05 Thread Jayadevan M
When I add a table in db.py under models, or makes changes to the table definition, web2py creates a file with the name of the table forming part of the name (for example, for the 'post' table, it created 23c22a0e7a25abd01f10b0f47df2166c_post.table). Then it generates SQL based on the content i

Re: [web2py] query from drop down menu

2013-11-05 Thread Kiran Subbaraman
I would use the ajax+callback mechanism that exists in web2py to do this. Look at the simple wiki example, and *search*code there: http://web2py.com/books/default/chapter/29/03/overview#A-simple-wiki. Kiran Subbaraman http://subbaraman.wordpress.com/abou

[web2py] query from drop down menu

2013-11-05 Thread Noah Corradin
I am trying to execute a query based on the values of 3 drop down menus. I have the following for drop down menus but i am unsure on how to turn the selected values into queries. Is this the proper way to do it in web2py? {{extend 'layout.html'}} {{rows = db().select(db.stats.ALL)}} {{for row

Re: [web2py] Javascript event onchange with Calendar

2013-11-05 Thread Diogo Munaro
No jose, try use .on instead of .change as the example Em 05/11/2013 16:19, "José Luis Redrejo" escreveu: > 2013/11/5 Diogo Munaro : > > Hi josé, you tried handle onchange with jquery on function? Phehaps some > js > > after declared is changing you handle. So, try: > > > > $(item).on("change", f

[web2py] Re: Changing SQLFORM.grid/container width default size

2013-11-05 Thread Carlynhos77
Ola, no meu projeto eu consegui alterar, tanto a descricao das labels, quanto o tamanho dos campos... no arquivo CSS, eu coloquei: #cadempresa_ente {width:400px; height: 14px; border: 1px solid black; background-color: white; font: 11px arial;} #cadempresa_EFEndereco {width:400px; height

Re: [web2py] Re: [OT] For those who like CLI tools. dopy - todo list on terminal, based on DAL

2013-11-05 Thread Michele Comitini
The message from Bruno is 2yrs old? Cool IMHO we should also include some of the org-mode tools: http://orgmode.org/worg/org-tools/index.html if we like TODOs that's the real stuff. 2013/11/5 Massimo Di Pierro > This is cook. Should we ship it with web2py? > > > On Monday, 31 December 2012 09:

[web2py] verify_email Message

2013-11-05 Thread Francisco Costa
Verify email message seams to only accept username, key and link. What if I want to pass another variable? My current message is: auth.messages.verify_email = re.compile('(\%)[^(]').sub('%%', response.render('emails/standard.html', dict(message=T('Welcome %(name)s! Click on the link %(link)

[web2py] Re: How to build a SQLFORM for relational database? Beginner in need of help.

2013-11-05 Thread Jim S
Have you read the Forms and Validators section in the book? I think it explains everything pretty well. http://web2py.com/books/default/chapter/29/07/forms-and-validators Specifically, I'd look at SQLFORM.grid http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM.grid -

Re: [web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2013-11-05 Thread Jim S
Yes, but I added another application in my applications directory the install. So, I had to run this again. -Jim On Tuesday, November 5, 2013 1:50:13 PM UTC-6, Niphlod wrote: > > isn't this line ? > > https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh#L174 >

[web2py] After reset password, delete rows from table associated with user

2013-11-05 Thread Mark Li
I currently have a table of tokens db.define_table('mobile_tokens', Field ('username', 'reference auth_user'), Field ('token') ) After a user resets their password, all the mobile tokens for that user should also be deleted. After a user resets their password, is it possible to user a

[web2py] Problem getting auth.wiki('slug', env=dict(mytest=...)) to work in a view?

2013-11-05 Thread Chuck Paulson
In a simple test app I have defined a controller, view, and wiki page. The idea is that the controller decides which wiki page to display (ex. 'slug'), and the view calls auth.wiki() to get the wiki page. The wiki page contains @{mytest:hi} which should be processed by the auth.wiki() call in t

[web2py] Re: Anchor callback option and form submit

2013-11-05 Thread Niphlod
ok, let me rephrase the final statement... The "official" way (since _href and cid are way back in web2py's history) should be A('mypage', _href=URL('myfunction'), cid='myID') Full Stop(s). . . . For backward compatibility, the following does the same thing, but I don't think it's documented

[web2py] Re: NDB support for GAE

2013-11-05 Thread Quint
Hi, I attached a new patch. I also attached a file with a couple of tests I ran. (based on test_dal.py) Needs more testing by other GAE users though. Quint On Monday, October 28, 2013 2:49:37 PM UTC+1, Massimo Di Pierro wrote: > > If you send me a revised patch to do this, I will include. It ma

[web2py] Re: Web2py freezing on live deployment!

2013-11-05 Thread Andrew Buchan
Update: I made a copy of the web2py installation on a new server (still pointing to old database) and eventually got it set it up as a service but it still freezes with no errors in web2py or in the event manager... I'm pretty sure it's a programming error on my part somewhere or a migration i

[web2py] Re: Anchor callback option and form submit

2013-11-05 Thread Anthony
Not sure we're talking about the same thing. I'm just saying that if you specify *only* the "target" attribute, but not "cid" or "component", then you don't get an Ajax component: >>> A('mypage', _href=URL('myfunction'), target='myID').xml() 'mypage' Notice in the above output, there is no data

[web2py] Re: OLAP python style

2013-11-05 Thread Simon Ashley
> > +1. Thanks for sharing. Worth further investigation. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subsc

[web2py] Re: User_agent problem after this morning update from the trunk

2013-11-05 Thread Massimo Di Pierro
.03.22.45.08 Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > > Traceback (most recent call last): > File "/home/js/web2py.20131105/gluon/restricted.py", line 217, in restricted > exec ccode in environment > File "/home/js/web2py.20131105/app

[web2py] Re: importing current - which approach is the latest approach?

2013-11-05 Thread Massimo Di Pierro
I would use from gluon import current On Tuesday, 5 November 2013 11:13:39 UTC-6, Carl wrote: > > In one of my apps modules I've used: > > from gluon import current > > but for a later app, Eclipse/pydev leads me to use this: > > from gluon.globals import current > > Is the latter the recommended

[web2py] Re: [OT] For those who like CLI tools. dopy - todo list on terminal, based on DAL

2013-11-05 Thread Massimo Di Pierro
This is cook. Should we ship it with web2py? On Monday, 31 December 2012 09:26:05 UTC-6, rochacbruno wrote: > > Hi, > > For *nix people who likes to do things on terminal I started to create a > to-do list CLI tool based on DAL, sqlite and other things. > > I am being very addicted to apps like m

[web2py] Re: SQLFORM for a relational database combined with insert only if record does not currently exist?

2013-11-05 Thread Massimo Di Pierro
db.define_table('author', Field('name', 'string'), Field('bio', 'text')) db.define_table('link', Field('name', 'string'), Field('description', 'text')) # a table to store posted Quotes db.define_table('post', Field('body','text',label="Post Body"), Field('posted_on','dat

[web2py] Re: Anchor callback option and form submit

2013-11-05 Thread Niphlod
nope, https://github.com/web2py/web2py/blob/master/gluon/html.py#L1506 adds it for cid. Basically when I reviewed all the combinations for the A helper porting it to work with the new data-style attributes, I found no use for the component argument because it was really similar to something ach

Re: [web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2013-11-05 Thread Niphlod
isn't this line ? https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh#L174 On Tuesday, November 5, 2013 2:40:27 PM UTC+1, Jim S wrote: > > Perfect! > > Thanks a bunch. > > -Jim > > On Monday, November 4, 2013 8:04:32 PM UTC-6, Richard wrote: >> >> sudo chown -

Re: [web2py] OnSelect how to?

2013-11-05 Thread greenpoise
you mean this one? http://www.web2pyslices.com/slice/show/1724/cascading-dropdowns-simplified On Tuesday, November 5, 2013 10:57:08 AM UTC-8, Richard wrote: > > You want a kind of conditional drop down from what I understand... There > recent new feature exactly for this... > > I don't know if

[web2py] Re: using concurrent.features in scheduler

2013-11-05 Thread Niphlod
does that function work inside a "normal" web2py shell ? On Tuesday, November 5, 2013 4:14:51 PM UTC+1, Sheng-Kai Huang wrote: > > hello > > I want to use the concurrent libary to do somthing parallelly and > periodly, so I have following code inside a model function of web2py > scheluer. > > de

[web2py] Re: Theming with Bootswatch

2013-11-05 Thread LightDot
Web2py's Welcome app in trunk already comes with Bootstrap 2.3.2 and 3.0.x is planned for the future. In the mean time, Bootswatch has older versions available at https://github.com/thomaspark/bootswatch/tags so you can download a 2.2.2 version. As you probably know, Bootswatch's css is a drop

Re: [web2py] OnSelect how to?

2013-11-05 Thread Richard Vézina
You want a kind of conditional drop down from what I understand... There recent new feature exactly for this... I don't know if it has been documented, but there is example of the synthax on the group. Richard On Tue, Nov 5, 2013 at 12:49 PM, greenpoise wrote: > is very simple. The autocomple

[web2py] Re: Static files outside of web2py

2013-11-05 Thread Annet
Thanks you both for your replies. As Cliff says it's something Webfaction recommends, when your having memory and/or performance issues. so webfaction needs two different hostnames ? > At home I have a server running Mac OS X Server Lion which is pretty straightforward to configure, I am still

Re: [web2py] How to build a SQLFORM for relational database? Beginner in need of help.

2013-11-05 Thread Diogo Munaro
Form = SQLFORM.factory(db.author,db.link,db.post) if form.process().accepted: ... return dict(form=form) Em 05/11/2013 14:59, "Noah" escreveu: > I have a relational database structure containing 3 tables, set up in the > model as follows: > > db.define_table('author', > Field('name', 'str

Re: [web2py] Javascript event onchange with Calendar

2013-11-05 Thread José Luis Redrejo
2013/11/5 Diogo Munaro : > Hi josé, you tried handle onchange with jquery on function? Phehaps some js > after declared is changing you handle. So, try: > > $(item).on("change", function(){}); > Yes, and it doesn't work. In fact this is part of my code: jQuery("#CabeceraEntrada_Fecha").change

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-05 Thread Annet
Thanks you all for your replies. While trying to solve performance issues I came across a post in which Michele Comitini gave useful information which raised questions and apparently non-questions ;-) No, the above will not be any faster. If anything, it could be ever so > slightly slower bec

Re: [web2py] Javascript event onchange with Calendar

2013-11-05 Thread Diogo Munaro
Hi josé, you tried handle onchange with jquery on function? Phehaps some js after declared is changing you handle. So, try: $(item).on("change", function(){}); Em 05/11/2013 15:52, "José Luis Redrejo" escreveu: > Hi, > I'm having problems with the Calendar used for date fields in an SQLFORM. > I

[web2py] Javascript event onchange with Calendar

2013-11-05 Thread José Luis Redrejo
Hi, I'm having problems with the Calendar used for date fields in an SQLFORM. In the web page, the javascript onchange does never happen (tested with Firefox and Google chrome). Other events like click or focusout works correctly, and other fields with other text input widgets work correctly too.

Re: [web2py] OnSelect how to?

2013-11-05 Thread greenpoise
is very simple. The autocomplete works fine. The only thing that I want is once the product is searched and selected, to go into some sort of list of items. So technically my subject is wrong, it should be OnClick instead of OnSelect: db.define_table('productsearch', Field

[web2py] importing current - which approach is the latest approach?

2013-11-05 Thread Carl
In one of my apps modules I've used: from gluon import current but for a later app, Eclipse/pydev leads me to use this: from gluon.globals import current Is the latter the recommended approach? Is the former removed? thanks -- Resources: - http://web2py.com - http://web2py.com/book (Document

Re: [web2py] Re: Migrating Django User Accounts

2013-11-05 Thread Andy B
I made a few tweaks and got it working with the following (the password is 'password'): *import re, base64* *a = "pbkdf2_sha256$1$vdUoVri9MlE7$GZ4q0iR3v8LfLZ9VDbzEWQmBoPhqNqgExWMf+6YKtm4=" * * * *def convert(p):* *a,b,c,d = p.split('$')* *df, h = a.split('_')* *d = base64.b16enc

[web2py] How to build a SQLFORM for relational database? Beginner in need of help.

2013-11-05 Thread Noah
I have a relational database structure containing 3 tables, set up in the model as follows: db.define_table('author', Field('name', 'string'), Field('bio', 'text')) db.define_table('link', Field('name', 'string'), Field('description', 'text')) db.define_table('post', Field('

[web2py] using concurrent.features in scheduler

2013-11-05 Thread Sheng-Kai Huang
hello I want to use the concurrent libary to do somthing parallelly and periodly, so I have following code inside a model function of web2py scheluer. def function(): """ some code """ executor = futures.ThreadPoolExecutor(max_workers=100) jobs = [executor.submit( foo, param)

[web2py] SQLFORM for a relational database combined with insert only if record does not currently exist?

2013-11-05 Thread Noah
I have 3 tables defined in my model like so: db.define_table('author', Field('name', 'string'), Field('bio', 'text')) db.define_table('source', Field('name', 'string'), Field('description', 'text')) # a table to store posted Quotes db.define_table('post', Field('body','text

[web2py] Theming with Bootswatch

2013-11-05 Thread clarix
Hi all, I would like to use a Bootswatch theme on my web2py application. I notice that web2py uses bootstrap version 2.2.2 while bootstrap has released V 3.0.1. Is there any plan to update to the latest Bootstrap version? With any Bootstrap version though: is there a straightforward way to appl

[web2py] configuring routes for web2py behind reverse proxy

2013-11-05 Thread DeanK
I have an instance of web2py running on nginx sitting behind an apache reverse proxy (soon to be nginx as well) so: www.mydomain.com/myapppoints to >>myserver1.otherdomain.com i have /myapp/default/landing set as the default application, controller, and function. When i go directly

Re: [web2py] Re: [OT] For those who like CLI tools. dopy - todo list on terminal, based on DAL

2013-11-05 Thread Richard Vézina
:) Richard On Tue, Nov 5, 2013 at 11:41 AM, Cliff Kachinske wrote: > This is cool. > > Thanks for posting. > > > On Monday, December 31, 2012 10:26:05 AM UTC-5, rochacbruno wrote: >> >> Hi, >> >> For *nix people who likes to do things on terminal I started to create a >> to-do list CLI tool ba

Re: [web2py] Re: autocomplete widget to query odbc data sources

2013-11-05 Thread Niphlod
and where is the app ? afaik the only way to access db2 with a dbapi compatible api from python is by odbc. On Tuesday, November 5, 2013 3:26:07 PM UTC+1, Ramos wrote: > > Because my db2 is not in a windows/linux/ machine. > > ITS ON A OS400 Machine > > > 2013/11/5 Niphlod > > >> uhm, sorry. ADO

[web2py] Re: [OT] For those who like CLI tools. dopy - todo list on terminal, based on DAL

2013-11-05 Thread Cliff Kachinske
This is cool. Thanks for posting. On Monday, December 31, 2012 10:26:05 AM UTC-5, rochacbruno wrote: > > Hi, > > For *nix people who likes to do things on terminal I started to create a > to-do list CLI tool based on DAL, sqlite and other things. > > I am being very addicted to apps like mcabber

[web2py] status of web2py on openshift

2013-11-05 Thread rif
I try to deploy on openshift with Version 2.7.4-stable+timestamp.2013.10.14.15.16.29 and I could not get application to run on the server. What I did: 1. Created an opesnhift python 2.7 application 2. Cloned the resulted repo with git 3. Used web2py's Deploy to openshift button 4. Used resulted

Re: [web2py] Re: [OT] For those who like CLI tools. dopy - todo list on terminal, based on DAL

2013-11-05 Thread Richard Vézina
This seems really nice! I wounder if there is a todo-list application appliance except an application that would be base on book example with pyjama. I will create my own if I don't find one soon and share it. :) Richard On Mon, Dec 31, 2012 at 10:55 AM, Bruno Rocha wrote: > I am using "goo

Re: [web2py] Re: autocomplete widget to query odbc data sources

2013-11-05 Thread António Ramos
Because my db2 is not in a windows/linux/ machine. ITS ON A OS400 Machine 2013/11/5 Niphlod > uhm, sorry. ADODB kinda make me point in that way. > why aren't you able to connect to db2 using the "usual" > > db2://DSN=dsn;UID=user;PWD=pass > > notation ? > > > On Monday, November 4, 2013 10:11:

Re: [web2py] Re: autocomplete widget to query odbc data sources

2013-11-05 Thread Niphlod
uhm, sorry. ADODB kinda make me point in that way. why aren't you able to connect to db2 using the "usual" db2://DSN=dsn;UID=user;PWD=pass notation ? On Monday, November 4, 2013 10:11:46 PM UTC+1, Ramos wrote: > > I didnt say anything about microsoft Access. What the hell is that? HEHEHE > > I´

[web2py] Re: Static files outside of web2py

2013-11-05 Thread Niphlod
so webfaction needs two different hostnames ? On Tuesday, November 5, 2013 10:45:10 AM UTC+1, Cliff Kachinske wrote: > > Niphlod, > > Webfaction recommends this strategy as a way to reduce memory usage. Their > nginx instance serves static files without spinning off an Apache worker; > so it doe

Re: [web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2013-11-05 Thread Jim S
Perfect! Thanks a bunch. -Jim On Monday, November 4, 2013 8:04:32 PM UTC-6, Richard wrote: > > sudo chown -R www-data.www-data web2py/ > > Richard > > > On Mon, Nov 4, 2013 at 5:25 PM, Jim S > wrote: > >> Just ran today on fresh Ubuntu 13.10 and am getting: >> >> Internal Error >> Ticket issue

Re: [web2py] aplicação com calculo de campos

2013-11-05 Thread Diogo Munaro
Sorry guys, I thought was the portuguese group Em 04/11/2013 18:55, "Niphlod" escreveu: > BTW, this is the english web2py-user group. Please keep posts in > English lately there are a lot of messages coming in in Portuguese and > those are starting to be too many to be an oversight :-P > > On

[web2py] Re: Membership no longer respected.

2013-11-05 Thread Leonel Câmara
My best guess is that you are doing a response.menu = something, after the response.menu += documentation_menu. Try using append instead of += and see if you find it. Segunda-feira, 4 de Novembro de 2013 13:18:39 UTC, Johann Spies escreveu: > > The following configuration stopped working (I susp

[web2py] Re: how show images from side sites?

2013-11-05 Thread Copper Lark
воскресенье, 3 ноября 2013 г., 18:30:12 UTC+4 пользователь Anthony написал: > > {{ = XML('' % 'https://some_url/image01.jpg') ) }} >> > > The above code is fine, except there is an extra ")" at the end. Another > option is to use the IMG helper: > > {{=IMG(_src='https://some_url/image01.jpg')}}

[web2py] Re: Web2py freezing on live deployment!

2013-11-05 Thread Andrew Buchan
Ok, the IT guy has disabled McAffee's "on access" scan for the folders containing web2py stuff as well as python's installation directory. He tells me that parts of McAffee other than "on access" scan may still interfere but there's not much we can do about that. This hasn't made any difference

[web2py] Re: On moving incremental changes to production

2013-11-05 Thread Cliff Kachinske
Hope this helps. You said "we." That means you really need to use a version control system with a branch identical to your production system code. Do all your bug fixes against that branch. Whether you do a full regression test before pushing new code to the production machine is a judgement ca

[web2py] OLAP python style

2013-11-05 Thread Michele Comitini
A suggestion for people with large datasets to explore. http://jjmontesl.github.io/cubesviewer/cv.html This is based on Cubes by databrewery.org http://cubes.databrewery.org/index.html mic -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/

[web2py] Re: Static files outside of web2py

2013-11-05 Thread Cliff Kachinske
Niphlod, Webfaction recommends this strategy as a way to reduce memory usage. Their nginx instance serves static files without spinning off an Apache worker; so it doesn't count against your memory allotment. Their memory sentry is very strict about killing your processes if you account goes o

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-05 Thread Vinicius Assef
Agree. :-) On Mon, Nov 4, 2013 at 8:34 PM, Anthony wrote: > On Monday, November 4, 2013 5:21:03 PM UTC-5, viniciusban wrote: >> >> "There should be one-- and preferably only one --obvious way to do >> it." (The Zen of Python) >> >> Shortcuts are nice, but they get me confused sometimes. > > > On

Re: [web2py] Membership no longer respected.

2013-11-05 Thread Johann Spies
On 4 November 2013 16:47, Richard Vézina wrote: > What the "if 'auth' in globals():" for?? > > If you have it to make sure user it logged you can use the and/or tricks : > > if auth.user and auth.has_membership('managers'): > > Yes, that is a better way of doing it. My configuration worked for ab

Re: [web2py] Re: Testing redirection with py.test

2013-11-05 Thread Vinicius Assef
Thank you so much. I've made some changes in README, too. Take a look. On Tue, Nov 5, 2013 at 12:19 AM, Richard Vézina wrote: > Wrote this to get started : > > # -*- coding: utf8 -*- > > # Create a python virtual environnement > cd > mkdir projects > virtualenv ~/projets/web2py.test > # Access t

[web2py] User_agent problem after this morning update from the trunk

2013-11-05 Thread Johann Spies
Welcome app works, but in my app I see this (reverting to yesterday's backup made this problem go away): web2py™ Version 2.7.4-stable+timestamp.2013.11.03.22.45.08 Traceback 1. 2. 3. 4. 5. 6. Traceback (most recent call last): File "/home/js/web2py.20131105/gluon/restricted.py&