[web2py] Re: update_or_insert - handling record created/modified timestamps

2014-07-15 Thread Leonel Câmara
If you use auth.signature pay attention that it uses request.now as the default for the timestamps which uses the timezone of wherever it is running. In my opinion time should always saved in the DB in UTC for sanity's sake and future proofing. Seriously request.now is retarded. -- Resources:

[web2py] Re: Encode problem in response.cookies

2014-07-15 Thread Leonel Câmara
Just store it with unicode characters escaped. Easy way to do it since python's json module defaults to ensure_ascii = True. import json unicode_escaped = json.dumps('João') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Alternative IDEs?

2014-07-15 Thread Niphlod
your setup is seriously messed up (it happens, more likely on windows than linux but it happens). you're starting python2.7 and getting an exception from c:\csvn\python25 check your %PATH% or learn to use virtualenv ^_^' On Tuesday, July 15, 2014 7:19:57 AM UTC+2, sasogeek wrote:

[web2py] Re: CKeditor in a loaded component

2014-07-15 Thread Leonel Câmara
I'm using the plugin in a loaded component without any problems, did you follow Tim's slice carefully? The only problem I had when using it in a loaded component was for file uploading and browsing. To solve it I have this in my models before ckeditor.define_tables() # To avoid routing

[web2py] SQLFORM smart grid child table fields and editing excelike

2014-07-15 Thread Yebach
Hello I am using SQLFORM smartgrid. My child table field is not shown on my form (status.s_code). Why? Also. If I (user) click(s) on edit, all fields are editable. how do I set which fileds are or can be editable and which one not. Is it possible to create a form that is click in editable

[web2py] Re: Alternative IDEs?

2014-07-15 Thread 'sasogeek' via web2py-users
I was wondering why I was getting that error too cos I don't use python25. Thanks for letting me know. I'm quite the noob at all this :) On Tuesday, 15 July 2014 10:41:32 UTC, Niphlod wrote: your setup is seriously messed up (it happens, more likely on windows than linux but it happens).

Re: [web2py] ¿How to hide app, controller and function from url?

2014-07-15 Thread Lisandro Rostagno
Thanks! It worked. Every day I get even more surprised about web2py features :) I have though one more doubt. In my case, I put this on routes.py: BASE = dict(\ default_application = 'init', \ default_controller = 'default', \ default_function = 'store', \ functions = ['index',

[web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2014-07-15 Thread Yebach
How did you insert icons for edit in your form I am using SQLFORM.smartgrid and I want my grid to be more bootstrap like. Also I am having problems with displaying my child table fields (They are not displayed :)) Any suggestions? Here is my code workers = db(db.worker.w_organisation ==

Re: [web2py] Re: How to -- Popup window: Record already exists are you sure you want to upload file?

2014-07-15 Thread Austin Taylor
That might work Manuele. How would the code look? On Jul 15, 2014 1:39 AM, Manuele Pesenti manuele.pese...@gmail.com wrote: Il 14/07/14 21:21, Niphlod ha scritto: until the user clicks on submit, there's no way for web2py (or you) to know the name of the file being uploaded beforehand, using

Re: [web2py] Re: CKeditor in a loaded component

2014-07-15 Thread Tim Richardson
You'll have to show us some code I think. -- 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 subscribed to the

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-15 Thread Anthony
On Tuesday, July 15, 2014 6:58:28 AM UTC-4, Yebach wrote: Hello I am using SQLFORM smartgrid. My child table field is not shown on my form (status.s_code). Why? Can you show your models? Does the child table have a field of type reference that refers to the parent table? Also. If I

Re: [web2py] ¿How to hide app, controller and function from url?

2014-07-15 Thread Anthony
However now, I can only access home page through /index but not through / ¿Is this possible to achieve? You can only have one default function per controller, so for something like that, you would probably need a more complex pattern-based rewrite setup. ¿Or should I change

Re: [web2py] Delete Query Not Working

2014-07-15 Thread Shubham Jain
No, I hadn''t. But it worked on turning it on. Thanks But I don't get it. Record versioning just creates an archived db for the modifications done. So how this feature being disabled is restricting me from deleting a record ?? *Shubham Jain* 3rd Year, Software Engg Delhi Technological

[web2py] Re: Running web2py with settings in a config file

2014-07-15 Thread Kuba Kozłowicz
Doesn't work either. Gives following output: Cannot import config file [T:\MyFolder\SubFolder\etc\config] Notice that I run following command to run web2py: C:\Python27\python.exe T:/MyFolder/SubFolder/web2py.py --config=T:\MyFolder\ SubFolder\etc\*config.py* , but it was *config* that

[web2py] response.stream changes filename of a file, that is being downloaded

2014-07-15 Thread Kuba Kozłowicz
This is my controller's code, that handles requests on following URL: /app/invoices/download/id for instance: /app/invoices/download/10 to download bundle of invoices, which ID is equal to 10 def download(): url_parts = request.url.split('/') bundle_id = url_parts[-1] try:

[web2py] Re: update_or_insert - handling record created/modified timestamps

2014-07-15 Thread Massimo Di Pierro
Just put request.now = request.utcnow before you define your models (including auth). On Tuesday, 15 July 2014 04:32:57 UTC-5, Leonel Câmara wrote: If you use auth.signature pay attention that it uses request.now as the default for the timestamps which uses the timezone of wherever

Re: [web2py] ¿How to hide app, controller and function from url?

2014-07-15 Thread Lisandro Rostagno
Thank you very much for the help! I finally decided to keep using parameter-based rewrite setup, as it's easier for me to understand, and it allows me to achieve what I need. So I'm using index as the default function, that renders the index.html if there is no arg (that is, the home page of my

Re: [web2py] Re: How to -- Popup window: Record already exists are you sure you want to upload file?

2014-07-15 Thread Manuele Pesenti
Il 15/07/14 14:29, Austin Taylor ha scritto: That might work Manuele. How would the code look? well... for the client side I'd start from something like that: http://jsfiddle.net/dR9tH/19/ (via http://stackoverflow.com/questions/647282/is-there-an-onselect-event-or-equivalent-for-html-select)

[web2py] Re: response.stream changes filename of a file, that is being downloaded

2014-07-15 Thread Niphlod
you're missing a parameter response.stream(..., attachment=True) and, BTW, instead of doing your own parsing, request.args(0) holds 10 automatically. On Tuesday, July 15, 2014 10:24:20 AM UTC+2, Kuba Kozłowicz wrote: This is my controller's code, that handles requests on following URL:

Re: [web2py] Re: CKeditor in a loaded component

2014-07-15 Thread Jim S
I just wrote a test app to show the bad behavior, but it works with the CKEditor plugin. Guess I'll have to check other reasons for the failure with the code in my other app. Thanks to all for your input! -Jim On Tuesday, July 15, 2014 7:54:20 AM UTC-5, Tim Richardson wrote: You'll have to

[web2py] Re: Strange problem importing a module

2014-07-15 Thread Louis Amon
I'm having a very similar issue : If I do : from geocoder import api it works fine but if I do : from plugin_geocomplete.geocoder import api then the api.py module isn't detected by gluon custom importer It's the exact same package but changing the namespace provides different results. In

[web2py] Re: error(10053, 'An established connection was aborted by the software in your host machine')

2014-07-15 Thread Copper Lark
How I may resolve this error mySQL? понедельник, 14 июля 2014 г., 16:44:41 UTC+4 пользователь Niphlod написал: so, you figured out that you can't connect to mysql. did you try to see if it's reachable ? On Monday, July 14, 2014 2:43:12 PM UTC+2, Copper Lark wrote: -- Resources: -

[web2py] Re: error(10053, 'An established connection was aborted by the software in your host machine')

2014-07-15 Thread Copper Lark
I found: Socket-Close(); but in web2py how to close mySQL connections? вторник, 15 июля 2014 г., 23:04:20 UTC+4 пользователь Copper Lark написал: How I may resolve this error mySQL? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: exec_environment('applications/.../models/db.py') failing, thread._local no attr. request

2014-07-15 Thread Tim Richardson
In the end I made my scheduled task (running nightly) create a bunch of one-time scheduled jobs, and with multiple workers this gets done in parallel. I found I needed to use db.commit() to successfully create scheduled tasks from within a scheduled task. -- Resources: -

[web2py] Re: Alternative IDEs?

2014-07-15 Thread Carlos Zenteno
I use NINJA IDE. Very good IDE. Not perfect, not super complete but very good. I then copy and paste to the web2py web editor. http://ninja-ide.org/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Message window

2014-07-15 Thread ocascante
Hello, i am newbie. I wrote this code to check two tables and delete a register if ok, and is working ok: In sqlform create a button: lambda row: A(T('Delete'),_onclick='return confirm(Delete??)', _class=btn, _style=background:#F78181, _href=URL(delete_depto,args=[ depto, row.id,row.name]))]

[web2py] Re: Message window

2014-07-15 Thread lyn2py
response.flash flashes onto the same page. Try to do: session.flash = your message #your message flashes on the redirected page redirect(URL(…)) On Wednesday, July 16, 2014 7:13:20 AM UTC+8, ocascante wrote: Hello, i am newbie. I wrote this code to check two tables and delete a register

[web2py] Re: Message window

2014-07-15 Thread ocascante
Thanks for your help, this works correctly. El martes, 15 de julio de 2014 19:00:19 UTC-6, lyn2py escribió: response.flash flashes onto the same page. Try to do: session.flash = your message #your message flashes on the redirected page redirect(URL(…)) On Wednesday, July 16, 2014

[web2py] Favorite debuggers?

2014-07-15 Thread Don O'Hara
I really like the web-based tools that are available out of the box with web2py (source editor, db manipulation, debugger, etc). What are some of the other tools people like to use for web2py interactive debugging? Does anyone use pudb (I love the old turbo pascal look!), or any of the other

[web2py] Re: Favorite debuggers?

2014-07-15 Thread Ron McOuat
I most often use print statements which have to be removed for running under Apache for example. Alternative is to use the logging facility. Because of the nature of web requests timing out there isn't much time to be spent in an interactive debugger. If there is a module it can be tested with

Re: [web2py] Re: CKeditor in a loaded component

2014-07-15 Thread Rahul
Hey Everybody - Although this question is a bit different, I was wondering how to preserve the formatting that's done for a field Using CKEditor when the field is serialized in a view. Thanks, Rahul D. On Tuesday, July 15, 2014 9:10:57 PM UTC+5:30, Jim S wrote: I just wrote a test app to

[web2py] Re: Alternative IDEs?

2014-07-15 Thread Louis Amon
I've been curious about Ninja IDE for a few months now, care to elaborate ? Is web2py as well-integrated as Django now ? Can it display web2py-rendered web page in the IDE ? Last time I tried Ninja IDE I was very disappointed because the announced features were far from complete. On Tuesday,