[web2py] APScheduler ValueError

2014-09-08 Thread aabelyakov
At the start of the function XXX() from the library uLib.py using APScheduler ValueError exception occurs. What to do? OS - Ubuntu 12.04 64 bits Web2py version - 2.9.8 APScheduler version = 3.0.0 controller - opros.py ~ import uLib as l from apscheduler.schedulers.background

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Massimo Di Pierro
This would be the code to override all the widgets (the list widgets are missing) for bootstrap3. http://pastebin.com/LJzhXvnh I know it is JS but it is really not mad and much more user friendly than the code in sqlhtml.py. Massimo On Monday, 8 September 2014 23:43:31 UTC-5, Massimo Di Pier

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Massimo Di Pierro
This is what the plain TextWidget looks now in Python: class TextWidget(FormWidget): _class = 'text' @classmethod def widget(cls, field, value, **attributes): default = dict(value=value) attr = cls._attributes(field, default, **attributes) return TEXTAREA(**attr

Re: [web2py] Re: a proposal for form improvement

2014-09-08 Thread Massimo Di Pierro
forms are made of widgets and widgets are made of HTML and JS. We can "force" it and continue to code these things in Python as we do now but we up with Python code that has the only purpose that of generating HTML and including JS code. This is why it will be cleaner if we move this client-sid

[web2py] Re: RSS is an error! What to do?

2014-09-08 Thread Massimo Di Pierro
very strange. try this: link=str((feed.get('link') or '').encode('utf-8', 'replace')), On Monday, 8 September 2014 12:45:25 UTC-5, Капылов Данил wrote: > > File "web2py \ gluon \ serializers.py" I did not change. > > He was the default > > I changed the code to your. > > Does not work. > > 'Non

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread JorgeH
Ok, it looked like web2py installation for win32 (not 'source' download) was using the pywin32 afterall. Something to do with the python path, perhaps., Because I change the name of the folder C:\Python27 to C:\Python27.hide just to see what happens And problem seems to be resolved after 10

Re: [web2py] Re: a proposal for form improvement

2014-09-08 Thread Vinicius Assef
With this thinking, we should not generate any HTML tag server side. The DOM exists when there's a HTML page, not only a form. I may missed something, but, what's the problem with server side generated DOM? Almost every web page is generated server side. Again, I don't see DOM generated server s

[web2py] Re: RSS is an error! What to do?

2014-09-08 Thread Капылов Данил
File "web2py \ gluon \ serializers.py" I did not change. He was the default I changed the code to your. Does not work. 'NoneType' object has no attribute 'encode'Версияweb2py™Version 2.9.9-stable+timestamp.2014.09.08.13.16.54 PythonPython 2.7.6: C:\Python27\python.exe (prefix: C:\Python27)Tra

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread Leonel Câmara
Derek it's because portalocker changes 'w' to 'a' when it opens the file so then it has to emulate 'w'. I have no freaking idea why portalocker does this instead of just using 'w', I'm guessing it was done to get around a quirk that once existed. OTOH I don't see why truncate is not bei

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Andrew W
Sounds like I need to improve my JS skills. A Plugin or a Module ? which is better for this type of thing ? On Friday, September 5, 2014 3:56:23 PM UTC+10, Massimo Di Pierro wrote: > > Please find attached a welcome4.zip with contains the following files: > > controllers/default.py > views/lay

Re: [web2py] Re: a proposal for form improvement

2014-09-08 Thread Michele Comitini
The approach is correct IMHO, not only for forms. DOM is client's matter and by the way gives a nice level of abstraction over everchanging DOM implementations of clients. What eventually will be extended is the JSON dialect. There is a little overhead in the JS machinery on the clients that need

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread JorgeH
- *File C:\web2py\gluon\dal.py in file_open at line 799* code arguments variables Function argument list (self=, filename=r'C:\web2py\applications\ZenuToolkit\databases\c8b669d15150d7109e5f7ab36744a5b7_agua.table', mode='w', lock=True) - *Fil

[web2py] Re: Best way to store tabular data when database isn't really needed?

2014-09-08 Thread Derek
The best way would be sqlite. It's certainly not overkill. If you don't know what sqlite is, look here: http://www.sqlite.org/about.html It's a very easy read... the way they describe it: Think of SQLite not as a replacement for Oracle but as a replace

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread Derek
ah, i see that web2py is not using the latest version of portalocker. ok, so line 122 of portalocker is "self.file.truncate()" so you don't have permission to truncate a file. And apparently the file does is not being opened in append mode... so what file? hmm, judging from the trace, it's goin

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread JorgeH
windows 7 32 bit Thanks for your answer Any help is very appreciated. On Monday, September 8, 2014 3:48:10 PM UTC-5, Derek wrote: > > just out of curiosity, what version of windows? > > Here's the possible values for os.name... > > 'posix', 'nt', 'os2', 'ce', 'java', 'riscos' > > so it looks l

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread Derek
just out of curiosity, what version of windows? Here's the possible values for os.name... 'posix', 'nt', 'os2', 'ce', 'java', 'riscos' so it looks like 'ce' or 'posix' could be returned... Is it Windows CE? On Monday, September 8, 2014 1:45:17 PM UTC-7, Derek wrote: > > Line 122 is for posix

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread Derek
Line 122 is for posix_lock, and that should not be occurring because you are on windows. That's very strange. For some reason os.name must be returning something other than 'nt'. On Monday, September 8, 2014 11:05:51 AM UTC-7, JorgeH wrote: > > > It happens on version 2.9.9 too > > Version web2p

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread JorgeH
Yes I do. But I am using the web2py package for win. Theoretically, it should not interfere .. On Monday, September 8, 2014 2:03:52 PM UTC-5, Leonel Câmara wrote: > > Jorge do you have pywin32 installed? That is very weird. > -- Resources: - http://web2py.com - http://web2py.com/book (Document

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Leonel Câmara
My experience is that it's faster on the client side too unless you have a pretty good 3G connection (or even better 4G). That said, the scalability and hardware savings advantage on the server side is unquestionable. You don't have to cache pre-rendered HTML and you finish requests quicker. -

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread Leonel Câmara
Jorge do you have pywin32 installed? That is very weird. -- 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 subscri

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Anthony
I assume Massimo meant that it is faster on the server side. Anthony On Monday, September 8, 2014 2:07:12 PM UTC-4, Joe Barnhart wrote: > > My limited experience thus far with iPhone 4s, iPhone 5s and iPad leads me > to believe that form generation in the browser would NOT necessarily be a > lo

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread JorgeH
Worse thing is that everytime this happens. Web2py freezes and I have to shut the console and reboot it. Otherwise it doesn't work anymore. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Joe Barnhart
My limited experience thus far with iPhone 4s, iPhone 5s and iPad leads me to believe that form generation in the browser would NOT necessarily be a lot faster. In fact, if you compile your views and controllers beforehand, the current SQLFORM is remarkably fast. Speed is not the reason to go

Re: [web2py] getting " [Errno 13] Permission denied" over and over

2014-09-08 Thread JorgeH
It happens on version 2.9.9 too Version web2py™ Version 2.9.9-stable+timestamp.2014.09.08.13.16.54 Python Python 2.7.6: C:\web2py\web2py.exe (prefix: C:\Python27) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last): File "gluon/restricted.py", line 221

[web2py] Re: extra_fields can't showed in auth_user db.

2014-09-08 Thread olivier hubert
I find my problem. I double define auth.define_tables. once in db.py and second in my_tables.py. Only once definition can be declared. Le dimanche 7 septembre 2014 18:14:27 UTC+2, olivier hubert a écrit : > > I Massimo, thanks for your quick response. > Could you confirm the extra fields are norma

[web2py] Re: RSS is an error! What to do?

2014-09-08 Thread Massimo Di Pierro
Looks very wrong link=str(feed.get('link', None).encode('utf-8', 'replace')), *should be* link=str(feed.get('link', '').encode('utf-8', 'replace')), On Sunday, 7 September 2014 12:01:10 UTC-5, Капылов Данил wrote: > > 'NoneType' object has no attribute > 'encode' > *Version * > web2py™Versio

[web2py] Re: extra_fields can't showed in auth_user db.

2014-09-08 Thread Massimo Di Pierro
Nothing special. They simply work for me and appear in registration and in profile. I just tried again with 2.9.9. On Sunday, 7 September 2014 11:14:27 UTC-5, olivier hubert wrote: > > I Massimo, thanks for your quick response. > Could you confirm the extra fields are normally showed in profile p

Re: [web2py] CentOS Web2py IOError - Permission denied

2014-09-08 Thread JorgeH
I am having similar problems but in windows. Any clue? On Wednesday, September 5, 2012 4:33:37 PM UTC-5, webtest wrote: > > Yes you are right! disabling it fixed the problem. > Can you also please point me to a direction where I can learn how to set > up multiple applications running at the sam

[web2py] new widgets from s-cubism.com

2014-09-08 Thread Copper Lark
a beautifull widgets http://dev.s-cubism.com/web2py_plugins will be included in official pack? Form Widgets - Horizontal Radio Widget A radio widget arranging its buttons horizontally -

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Ide
> > Personally I prefer python to javascript so would render server side >> myself. >> > > Keep in mind that with the new system, you won't necessarily have to write > Javascript -- the Javascript that renders the forms will be provided by the > framework. > I am thinking of those occasions w

[web2py] Re: Extremely slow raw SQL queries on web2py

2014-09-08 Thread Mehmet A.
No clue. I tried everything I can think of. I'm trying to resolve this over a week now. Apparently the 'FOREIGN_KEY_CHECKS' and 'NO_BACKSLASH_ESCAPES' queries was due to a pymysql bug, I read your issue report on github, but still no clue on what's happening. It's really frustrating. And the

[web2py] RSS is an error! What to do?

2014-09-08 Thread Капылов Данил
'NoneType' object has no attribute 'encode' *Version * web2py™Version 2.9.8-stable+timestamp.2014.09.07.04.13.28PythonPython 2.7.5+: /usr/local/bin/uwsgi (prefix: /usr)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File "/home/Danilka88/web2py/gluon/restricted.py",

[web2py] Re: What is the final answer of default/second.html in Documentation (Postbacks/Internationalization)?

2014-09-08 Thread terencenwk
In Views: default/second.html, is this correct? {{extend 'layout.html'}} Hello {{=name or "anonymous"}} On Sunday, September 7, 2014 11:37:32 PM UTC+8, Massimo Di Pierro wrote: > > This should work fine: > > form = SQLFORM.factory(Field('visitor_name', requires=IS_NOT_EMPTY(), > label=T('what is

[web2py] Best way to store tabular data when database isn't really needed?

2014-09-08 Thread Niels Jensen
Hi All, I've just started learning Python and have a decent understanding on the core elements. Most of my programming experience prior to Python was vb.net, which I'd use it to put together some simple applications that would help me automate some tasks at work (I'm a sysadmin). I wanted to

[web2py] Re: Anyone else having problem with delete icon in 2.9.7?

2014-09-08 Thread Ide
Since posting this, I suspect this may be because I am now using nginx to serve up static content. The example nginx configurations in the deployment recipes would appear to also match the url used for the delete action, and so nginx is treating this as static content. I just happened to only tr

[web2py] Re: extra_fields can't showed in auth_user db.

2014-09-08 Thread olivier hubert
I Massimo, thanks for your quick response. Could you confirm the extra fields are normally showed in profile page after a successful registration or I need to create a custom view to do that? This is the new code for my_tables.py modele # -*- coding: utf-8 -*- #Add authentication to the app. fr

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Anthony
On Sunday, September 7, 2014 9:22:06 PM UTC-4, Alex wrote: > > I didn't know of custom forms. Maybe it's something that wasn't available > when I started with my forms (using v2.4.6) or I just missed it. > It's been around forever. Actually I'm doing a little bit more in my form function (e.g. se

[web2py] Re: DAL query error TypeError: unsupported operand type(s) for &: 'str' and 'Query'"

2014-09-08 Thread Anthony
Hmm, what version of web2py? I cannot reproduce this error. Anyway, you can try using the alternative method of forming conjunctions by chaining calls to db(): query1 = 'instr(microelementexamplestest.example,microelementstest.element)' query2 = db.microelementexamplestest.verificationstatus.bel

[web2py] Re: rendering components

2014-09-08 Thread Anthony
On Monday, September 8, 2014 7:50:41 AM UTC-4, Leonel Câmara wrote: > > Set ajax=False in your LOAD. Otherwise LOAD is loaded via javascript and > that's why you get that 'loading...'. > Though note that in that case, the components will not load via Ajax when the page is viewed live. If you wan

[web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread Anthony
On Monday, September 8, 2014 4:47:57 AM UTC-4, Leonel Câmara wrote: > > Frankly, I would just store the user as the owner in all of those tables. > Probably using auth.signature(). > > You could do a very inefficient recursive select but I don't see any > advantage. > > Something like: > > task =

Re: [web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread desta
Thank you guys for your valuable answers. On Monday, September 8, 2014 2:51:56 PM UTC+3, Marin Pranjić wrote: > > Make sure to read Authorization chapter in book: > > http://web2py.com/books/default/chapter/29/09/access-control#Authorization > > -- Resources: - http://web2py.com - http://web2py.

Re: [web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread Marin Pranjić
Make sure to read Authorization chapter in book: http://web2py.com/books/default/chapter/29/09/access-control#Authorization -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (R

[web2py] Re: rendering components

2014-09-08 Thread Leonel Câmara
Set ajax=False in your LOAD. Otherwise LOAD is loaded via javascript and that's why you get that 'loading...'. -- 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)

[web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread Leonel Câmara
It's not exactly bad practice, quite the contrary, usually you want to start with a database without redundancy. This is just a case where denormalization really yields fruits as it is very inefficient to have to query the jobs and projects table to know who is the owner of a task. An alter

[web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread desta
Thank you, so you mean is bad practice the way I implemented the tables? When I designed it like that, I thought it would be convenient in altering the relations between the records. On Monday, September 8, 2014 11:47:57 AM UTC+3, Leonel Câmara wrote: > > Frankly, I would just store the user as

[web2py] Re: web2py setup scripts for windows

2014-09-08 Thread Tim Richardson
ye gods. One wonders if a virtual linux server is not the answer. -- 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 a

[web2py] rendering components

2014-09-08 Thread CrC Nommack
Hi everybody, I hope you can help me with this. I have a view with different components (LOAD) and I want it to be rendered in a file. What I'm using is the following: ... ... with open(filename, 'wb') as f: f.write(response.render('index.html', dict(var1=var1, var2=var2)) being var1 and var2

[web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread Leonel Câmara
Frankly, I would just store the user as the owner in all of those tables. Probably using auth.signature(). You could do a very inefficient recursive select but I don't see any advantage. Something like: task = db.tasks[5] if task.job.project.owner != auth.user_id: # You are doing a select fo

[web2py] Check is user is the owner of row (help with db query)

2014-09-08 Thread desta
We have the default USERS table, a PROJECTS table that references back to USERS, a JOBS table that references back to PROJECTS and a TASKS table that references back to JOBS. Essentially USERS <- PROJECTS <- JOBS <- TASKS Now the client is logged in, requests to delete tasks with ID=5. In the

[web2py] DAL query error TypeError: unsupported operand type(s) for &: 'str' and 'Query'"

2014-09-08 Thread Gliese 581 g
I have two tables - element and example. I want to find element like items in example table but their status should either be 0 or 2. I have written a query to fetch records from two tables as given below: rows=db(('instr(microelementexamplestest.example,microelementstest.element)') &