[web2py] Re: How would one design a promotion for products using web2py?

2014-12-30 Thread Dave S
On Monday, December 29, 2014 6:06:04 PM UTC-8, Dave S wrote: Just a thought: On Saturday, December 27, 2014 7:25:01 AM UTC-8, 黄祥 wrote: [...] i'd love to learn from another products and implement it on web2py, but still have no idea how to do it in web2py ways. the reason is if it

[web2py] Re: Auto detect of video file through url link while posting link

2014-12-30 Thread Massimo Di Pierro
;-) from gluon.contrib.autolinks import expand_one d = session.cache_links or {} {{=XML(expand_one(url, d))}} On Monday, 29 December 2014 08:59:00 UTC-6, Vikash Singh wrote: Hi Massimo, First of all have a Great year forward, I have no match with your knowledge of awesome web2py, most

Re: [web2py] How to set Reset password key programmatically?

2014-12-30 Thread Michele Comitini
A simple trick is to send the user (with user_id) a link (by mail or any other way) You can do something like this (max_time is when you want the key to expire) user = db.auth_user(user_id) reset_password_key = str(int(max_time)) + '-' + web2py_uuid()

[web2py] Re: navbar in sqlform.grid

2014-12-30 Thread Jim S
Can you show your view file where the grid is included? -Jim On Monday, December 29, 2014 8:30:31 AM UTC-6, Yebach wrote: Hello My navbar user button does not show dropdown options when I am in a view where SQLFORM.grid is? Any suggestions why? -- Resources: - http://web2py.com -

Re: [web2py] Re: navbar in sqlform.grid

2014-12-30 Thread Vid Ogris
My file {{extend 'layout.html'}} {{include 'web2py_ajax.html'}} script $(function(){ $('.activateButton').click(function(){ turnusId = $(this).val(); $.ajax({ type: 'POST', url: '{{=URL('settings', 'activateTurnus.json')}}', data: {value: turnusId}, dataType: 'json', success:

Re: [web2py] Re: navbar in sqlform.grid

2014-12-30 Thread Jim Steil
Have you tried removing all of your javascript and css to see if it works? -Jim On Tue, Dec 30, 2014 at 7:33 AM, Vid Ogris vid.og...@gmail.com wrote: My file {{extend 'layout.html'}} {{include 'web2py_ajax.html'}} script $(function(){ $('.activateButton').click(function(){ turnusId =

Re: [web2py] database select from set encoding

2014-12-30 Thread Niphlod
let's tackle the problem from another side: if you avoid using DAL and resort to pure psycopg2, does it work ? If yes, can you post the code ? From there we can compare what DAL does and pinpoint the root cause accordingly. On Tuesday, December 30, 2014 8:41:56 AM UTC+1, Yebach wrote: Hello

Re: [web2py] Re: Rocket // HTTP 400 Bad Request - Body is incomplete

2014-12-30 Thread Niphlod
you're not very fair in debugging if you have something different that processes the error: please simplify it and let the application alone catch the error, then inspect what goes on with logging calls into copystream... -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: Daily task on production: scheduler or cron?

2014-12-30 Thread Niphlod
that's really someone overcomplicating the setup... on the queue_task thing, use prevent_drift as explained before. Again, setting the heartbeat to 10 minutes kinda sucks, as there are too many things that can happen in 10 minutes. BTW: if you don't use cron, what are you planning to use to

[web2py] Re: Content Security Policy (CSP) settings and calender.js

2014-12-30 Thread Niphlod
I don't get what you're asking for. If you choose to create *your* own policy and part of *your* application uses something that *your* own policy discards, there's nothing *web2py* can do. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Ajax/Updated Form Field

2014-12-30 Thread Mark Billion
I may be an idiot but I want to set up a form so that you click to edit, and on focus out, the data is committed to the DB via Ajax. 1. Im using the inplace_edit(f,v) module from slices: wrapper = DIV() inp = SQLFORM.widgets.string.widget(f,v) lbl =

Re: [web2py] database select from set encoding

2014-12-30 Thread Michele Comitini
the string is a utf-8 encoded string not unicode object print 'Moj\xc4\x8dca'.decode('utf-8') Mojčca 2014-12-30 15:32 GMT+01:00 Niphlod niph...@gmail.com: let's tackle the problem from another side: if you avoid using DAL and resort to pure psycopg2, does it work ? If yes, can you post the

[web2py] Re: Is there any way to host PHP w/ Web2py on Nginx environment? PHP noob but long time Web2py user here

2014-12-30 Thread Dave S
On Monday, December 29, 2014 9:51:24 AM UTC-8, Leonel Câmara wrote: It's possible, however a better option would be for you to rewrite the php functionality in a web2py controller function. If the PHP stuff does a function that is well-understood and easy to implement locally, that should

[web2py] Re: Content Security Policy (CSP) settings and calender.js

2014-12-30 Thread Dave S
On Tuesday, December 30, 2014 7:32:15 AM UTC-8, Niphlod wrote: I don't get what you're asking for. If you choose to create *your* own policy and part of *your* application uses something that *your* own policy discards, there's nothing *web2py* can do. If it were me, I'd be asking for

[web2py] Re: Ajax/Updated Form Field

2014-12-30 Thread Mark Billion
I am wondering if I answered my own (incomprehensible) question: I plugged in Jeditable http://www.appelsiini.net/projects/jeditable, which is great. Then I set the script up to post to a controller that inputs the data to the db (which validates, i.e., 'integer'), commits it, and then

[web2py] Re: Content Security Policy (CSP) settings and calender.js

2014-12-30 Thread Niphlod
On Tuesday, December 30, 2014 8:35:23 PM UTC+1, Dave S wrote: On Tuesday, December 30, 2014 7:32:15 AM UTC-8, Niphlod wrote: I don't get what you're asking for. If you choose to create *your* own policy and part of *your* application uses something that *your* own policy discards,

[web2py] how to store values into args or vars from loop

2014-12-30 Thread Alex Glaros
how do I store values from a loop into args or vars? pseudo code of what I'm trying to do: for row in rows: var1=row.first_name pass or for row in rows: arg1=row.first_name pass just need syntax to avoid replacing contents of var1 or arg1 with the next value. All the values

[web2py] Re: Content Security Policy (CSP) settings and calender.js

2014-12-30 Thread Dave S
On Tuesday, December 30, 2014 12:00:01 PM UTC-8, Niphlod wrote: On Tuesday, December 30, 2014 8:35:23 PM UTC+1, Dave S wrote: On Tuesday, December 30, 2014 7:32:15 AM UTC-8, Niphlod wrote: I don't get what you're asking for. If you choose to create *your* own policy and part of

[web2py] Re: how to store values into args or vars from loop

2014-12-30 Thread Dave S
On Tuesday, December 30, 2014 1:22:23 PM UTC-8, Alex Glaros wrote: how do I store values from a loop into args or vars? pseudo code of what I'm trying to do: for row in rows: var1=row.first_name pass or for row in rows: arg1=row.first_name pass just need syntax to

[web2py] Re: how to store values into args or vars from loop

2014-12-30 Thread Alex Glaros
but how to keep from overwriting the preceding variable contents within the loop process? -- 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

[web2py] Re: how to store values into args or vars from loop

2014-12-30 Thread Dave S
On Tuesday, December 30, 2014 1:59:37 PM UTC-8, Alex Glaros wrote: but how to keep from overwriting the preceding variable contents within the loop process? arglist=[] for row in rows: arglist.append(row.firstname) # pass or vardict = {} for row in rows: # use an arbitrary key

[web2py] Re: how to store values into args or vars from loop

2014-12-30 Thread Alex Glaros
for the var list, I get an invalid syntax error with an arrow under the = sign are parenthesis symbols supposed to be used instead of brackets? the arg list works well -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -