[web2py] Format specification for chained one to many

2014-10-29 Thread Ron McOuat
I have a model where roads are the base table. In a one to many relation I have intersection addresses and each address has many pieces of equipment. Model looks like this # Road table, some winding roads are both street and avenue db.define_table('road', Field('name', 'string', length=32, u

[web2py] Re: Ractive example

2014-10-29 Thread Leonel Câmara
I'm so confused with the 2 Richards eheheh. Yes, those were plugins I'm sorry, I should have said something, I thought it would be nice to include them in the example. {{ractive_enabled=True}} {{extend 'layout.html'}}

Hello, [[name]]!

var ractive = new Ractive({ el: '#ma

[web2py] Re: Beginner variable and argument question

2014-10-29 Thread Leonel Câmara
Usually web2py uses a _next var in the url. You could use something like this to make your comment links: A(I(_class='glyphicon glyphicon-comment'),' ',T('Comment'), _href=URL( 'default', 'comment', vars={'_next': URL(args=request.args, vars=request

[web2py] Beginner variable and argument question

2014-10-29 Thread Alex Glaros
a generic comment_table that handles comments for different record types. After user posts a comment, I want them redirected back to where they came from, which varies depending on the record type. How does web2py know where user came from? Is there an arg or variable? thanks Alex Glaros -

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard D
It is the default welcome model. even : db = DAL('sqlite://storage.sqlite',pool_size=1) #,check_reserved=['all']) with the check_reserved parameter commented, give the same error On Wednesday, October 29, 2014 9:32:03 PM UTC+1, Richard wrote: > > Web2py complains about reserved word that y

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard Vézina
Web2py complains about reserved word that you may use in your model... Could you show your model? Richarc On Wed, Oct 29, 2014 at 4:20 PM, Richard D wrote: > With and without these plugins the error occurs. I downloaded them > seperately, after the error to solve nice errors are given that fir

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard D
With and without these plugins the error occurs. I downloaded them seperately, after the error to solve nice errors are given that first reactive must be loaded before these plugins are loaded, nice coded! btw I just started with the welcome app, no other specific code could cause the error. O

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard Vézina
Richard, The import of Leonel seems not to work out of the box... These file are not part of Ractive.js.zip : ractive-events-tap.js ractive-transitions-fade.js response.files.append(URL('static','js/ractive-events-tap.js')) response.files.append(URL('static','js/ractive-transitions-fade.js'

[web2py] Re: Ractive example

2014-10-29 Thread Richard D
Richard D again ;) pass missing was my error cleaning up index.html only half. Having added the 3 js file to application I get the error in the js console when reactive.js is run: Uncaught SyntaxError: Unexpected reserved word More specific: on the first line when importing defaults: i

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard Vézina
Thanks a lot! Richard On Wed, Oct 29, 2014 at 3:56 PM, Richard Vézina wrote: > That why... I was strugling with issue with global since a lot of time > that clarify thing now... > > Richard > > On Wed, Oct 29, 2014 at 3:37 PM, Leonel Câmara > wrote: > >> Well globals in Python are really only

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard Vézina
That why... I was strugling with issue with global since a lot of time that clarify thing now... Richard On Wed, Oct 29, 2014 at 3:37 PM, Leonel Câmara wrote: > Well globals in Python are really only global to their own module, web2py > templates and controllers are not exactly python modules a

[web2py] Re: Notes on IIS configuration for web2py

2014-10-29 Thread Niphlod
On Wednesday, October 29, 2014 12:00:38 AM UTC+1, Derek wrote: > > So, I've tried those instructions, stumbled and tripped and fell and gave > up. I tried to stick with official python.org binaries, and ran into some > issues. i then installed python 2.7.3 via the microsoft installer, and it >

[web2py] Re: Ractive example

2014-10-29 Thread Leonel Câmara
Well globals in Python are really only global to their own module, web2py templates and controllers are not exactly python modules anyway, so, it's complicated; just do it in the view and let the template system take care of it. -- Resources: - http://web2py.com - http://web2py.com/book (Docum

Re: [web2py] Re: Ractive example

2014-10-29 Thread Richard Vézina
Thank you Leonel... I don't know why setting ractive_enabled = True from the controller with global not works though... Richard On Wed, Oct 29, 2014 at 3:28 PM, Leonel Câmara wrote: > You should only add to layout.html > > index.html should be > {{ractive_enabled=True}} > {{extend 'layout.htm

[web2py] Re: Ractive example

2014-10-29 Thread Leonel Câmara
You should only add to layout.html index.html should be {{ractive_enabled=True}} {{extend 'layout.html'}} I'm guessing the missing pass is a copy paste error because the pass is there. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Ractive example

2014-10-29 Thread Richard
Leonel, Adding this to the layout.html and index.html I get the following error: missing "pass" in view Versionweb2py™Version 2.9.11-stable+timestamp.2014.09.15.23.35.11PythonPython 2.7.8: c:\python27\python.exe (prefix: c:\python27)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Traceback (most

Re: [web2py] Re: Support for MS Access?

2014-10-29 Thread Dave S
On Wednesday, October 29, 2014 7:00:51 AM UTC-7, ksotiris wrote: > > *I think we found the solution for msaccess...!!! yes, is the odbtp + > python-odbtp* > > [...] > *STEP 2: Win32 Service Installation* > NOTE: The ODBTP service can only be installed on Windows NT 4.0, 2000 or > XP Pro. >

Re: [web2py] Re: Sticky sessions in a distributed environment

2014-10-29 Thread Louis Amon
I tried to apply Derek’s advice by storing sessions in cookies, same problem : as long as my web app runs on 1 dyno everything works fine but if I scale it to 2 or more then sessions start to break. I also +1 on what Anthony said : wether it be stored in a database or in a cookie, a session sho

[web2py] Re: Ractive example

2014-10-29 Thread Leonel Câmara
That should work perfectly fine. This is how I do it, if you would like another example. I have this in my layout.html before {{include 'web2py_ajax.html'}} }} ractive_enabled = globals().get('ractive_enabled',False) if ractive_enabled: response.files.append(URL('static','js/ractive.js'

[web2py] Ractive example

2014-10-29 Thread Richard
Hi, I have difficulties starting with ractive.js. Does anybody has a working example app with local ractive sources? Issues I have/had: - I have tackled the deliniter issue by using {% %} as web2py delimiter, hopefully - Is sufficient or is the tree under ractive also needed because of the im

Re: [web2py] Re: Support for MS Access?

2014-10-29 Thread ksotiris
*I think we found the solution for msaccess...!!! yes, is the odbtp + python-odbtp* *STEP 1: odbtp * download odbtp-1.1.4.tar.gz >sudo tar xzf odbtp-1.1.4.tar.gz >cd odbtp-1.1.4 SOS !! for Building ODBTP client library on a 64-bit OS please read odbtp-1.1.4/README.64bitOS >sudo ./configure >su

[web2py] Re: Notes on IIS configuration for web2py

2014-10-29 Thread Niphlod
I use the python.org installer (2.7.8) without problems. On Wednesday, October 29, 2014 3:23:04 AM UTC+1, Tim Richardson wrote: > > In my case, I use activestate python 32 bit. Nothing from microsoft except > for the one script wfastcgi.py. > > > On Wednesday, October 29, 2014 10:00:38 AM UTC+11,