[web2py] Re: Can not import copy_reg

2014-07-31 Thread Leonel Câmara
I agree niphlod, what I am saying may be a bug is that admin should probably make sure pyc files do not go anywhere in the application pack by default. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: Can not import copy_reg

2014-07-31 Thread Niphlod
uhm.I don't think anybody put a triple check for it but you may want to ship a compiled app without the sourcecode available for your customers, e.g. to update a fixed release. On Thursday, July 31, 2014 11:00:45 AM UTC+2, Leonel Câmara wrote: > > I agree niphlod, what I am saying may be

[web2py] Re: Can not import copy_reg

2014-07-31 Thread Leonel Câmara
Frankly, I think it's borderline retarded to distribute python applications without the source code. Firstly, pyc files are not portable, secondly pyc files are trivial to reverse using something like https://github.com/Mysterie/uncompyle2, and thirdly, your app may actually stop working if you

[web2py] Re: Two parallel methods of authenticating users based on Auth class

2014-07-31 Thread marcin jaworski
Hi All, My fault. Web2py handbook says: "Don't store user-defined classes in session" I will have to re-read the basics after not touching framework for a long time (since the luck of troubles). Thanks for your time. Marcin W dniu środa, 30 lipca 2014 14:39:38 UTC+2 użytkownik Marcin Jaworsk

Re: [web2py] Re: Bare Login using API key

2014-07-31 Thread Albert Abril
I'm already working with this now. Since I'm planning make my actual webapp only to a API based, and in other side, the frontend as a client of this API with angularjs. I think I'm more interested in do a session token based authentication like this. https://auth0.com/blog/2014/01/07/angularjs-au

[web2py] Sample application?

2014-07-31 Thread jimbo
Has anyone got a simple example application of a database such as a company personal database or similar with several fields showing how they are joined or whatever the Web2py method is. I am a novice with both databases and Web2py. Anything that would help would be very welcome, thank you! -

[web2py] Re: Sample application?

2014-07-31 Thread Leonel Câmara
Here's a bunch of them https://github.com/mdipierro/web2py-appliances -- 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 yo

[web2py] Re: Can not import copy_reg

2014-07-31 Thread Richard
My current situation is that I can move the software with no sqlite database to PA, fill the database, looks ok, not efficient though. Packing the app with no errors, no chache, but sqlite file, gives the import error. Zip instead of pack has the same result. But distribution using zip/unzip wit

[web2py] Re: more buttons on the SQLFORM, how to add them into templates using form custom layout ...?

2014-07-31 Thread lucas
nice, i like that, i use it in my views in the way, under controller: sform = SQLFORM(tSheet, record=sidi, buttons=[INPUT(_type='submit', _name='submit', _value='Save Worksheet', _style="width:410px;"), INPUT(_type='submit', _name='mtn_modify', _value='Motion to Modify', _style="width:4

[web2py] Re: Can not import copy_reg

2014-07-31 Thread Leonel Câmara
Richard basically it's the .table files in your database folder that are creating the problem. You can set migrate=False in your DAL call on db.py before packing the application to prevent the problem, then turn it back on in your development machine. Table files is where web2py stores your

[web2py] db commit and xmlrpc faults

2014-07-31 Thread Ivan
I've read (if it is correct) that at the end of a request without errors, the db is automatically committed by web2py. Now, I have an xmlrpc function that should insert 2 records in a transaction. If the second insert fails (for example for a syntax error in the query, or for a notnull constrain

[web2py] display html based on user auth groups

2014-07-31 Thread LoveWeb2py
Hello I have an update page on my index.html I only want to display certain text if members belong in certain groups: For example: {{if auth.has_membership('finance'):}} Welcome to the finance page {{pass}} {{else}}: Hello Users! {{pass}} The problem I'm having is it shows everything... D

[web2py] Re: display html based on user auth groups

2014-07-31 Thread Leonel Câmara
{{if auth.has_membership('finance'):}} Welcome to the finance page {{else:}} Hello Users! {{pass}} You can remove one of the passes. There was also a mistake where the else didn't have the : inside the }} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] LOAD doesn't refresh page sessions?

2014-07-31 Thread LoveWeb2py
Hello, Can I call =LOAD on the same page as I want to refresh? The function I'm calling goes through a sequence of events, loads everything to session.dictionary and then takes the user to a page based on their results. In my view I have {{=LOAD('controller','function')}} However, when I try

[web2py] Re: Add (customer) number to url

2014-07-31 Thread Derek
RTFM http://www.web2py.com/books/default/chapter/29/04/the-core#Dispatching web2py maps GET/POST requests of the form: http://127.0.0.1:8000/a/c/f.html/x/y/z?p=1&q=2 to function f in controller "c.py" in application a, and it stores the URL parameters in the request variable as follows: req

[web2py] Creating a 5 page PDF file to teach web2py -- What should I focus on?

2014-07-31 Thread LoveWeb2py
Hello, I'm creating a 5 page PDF to get users acquainted with web2py. I'd like to orientate them with the MVC model, have them define a database, and create a simple app. I could add an extra page if needed, but do you think there is a better topic I could focus on other than what I have liste

[web2py] Export limit

2014-07-31 Thread Leonardo Pires Felix
There is a clever way to limit the number of rows passed to exporter class? The easy way i see is in limiting on the query, but on that way the user will cannot search on the rows that isn't included on the search. There is a way to only limit the export? -- Resources: - http://web2py.com - http

[web2py] Re: Creating a 5 page PDF file to teach web2py -- What should I focus on?

2014-07-31 Thread 黄祥
just a suggestion : in models : database uri, database migration, lazy tables, define table, web2py built in menu in controllers : import the module, using grid in views : extend layout, and the variable return by controller e.g. very easy n simple application (not more than 100 lines) *models/db

[web2py] Re: How to remove the symbol. What is the cause of its appearance?

2014-07-31 Thread Капылов Данил
Maybe you're right. But I have displayed several blocks with different text, and if I change 400 to 401 or 403 or any other number. In some units this symbol appears. How can I solve this problem? вторник, 29 июля 2014 г., 3:18:44 UTC+6 пользователь Derek написал: > > ok, so my guess is that

[web2py] Encoding and 'invalid argument'

2014-07-31 Thread Rémy Reche
I am using the decorator @request.restful() in order to implement a rest API. Unfortunatly, one on my function take an argument which can contain non-ascii character, for instance 'Gymnase Joseph Guétat'. Each request using this string returns a web2py error with the following comment: invalid

[web2py] Social auth with google- userinfo endpoint deprecated.

2014-07-31 Thread Andrew
Hi I am working with the code provided by Michele Comitini for integrating google login to my app. https://groups.google.com/forum/#!msg/web2py/fjpbFxRAGJM/pxvoBJKk2UkJ But I find that it is using the userinfo endpoint to get the credentials. Google has mentioned that they have deprecated it a

[web2py] Re: How do you gracefully terminate a scheduled task

2014-07-31 Thread Stephen Weiss
I'm not looking to stop the worker (running) task from outside of it. I want the worker task that encounters a problem to stop itself and have the status set to FAILED. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Upload field custom manipulation

2014-07-31 Thread Kuba Kozłowicz
f_invoice_file_path is location where the file is stored by myself, because I generate these files myself and I save them myself as well. It contains whole path to the file ( with the filename and its extension ). They are stored under "private" directory with the structure I described above. I

[web2py] 'Query' object is not callable

2014-07-31 Thread tangsjian
I want to insert a form include two fields coursename and teache_id reference auth_user,as students and teachers in the same table(auth_user),so I want to filter content of dropdown in SQLFORM only to show the role is teacher,so i do this query=(db.auth_membership.user_id==db.auth_user.id)(db.

[web2py] Re: Export limit

2014-07-31 Thread Massimo Di Pierro
No limit set by web2py. I cannot exclude limits do to memory or database (timesout, size, etc.) On Thursday, 31 July 2014 22:16:53 UTC-5, Leonardo Pires Felix wrote: > > There is a clever way to limit the number of rows passed to exporter class? > The easy way i see is in limiting on the query, b

[web2py] Re: 'Query' object is not callable

2014-07-31 Thread Anthony
> > query=(db.auth_membership.user_id==db.auth_user.id > )(db.courses.teacher_id==db.auth_user.id)(db.auth_membership.group_id== > db.auth_group.id)(db.auth_group.role=='teacher') > The above is not valid syntax. A Set object is callable, and when called, it returns another Set object, so you ca

[web2py] Re: Sample application?

2014-07-31 Thread jimbo
Most of those seem to be quite old, things like smart grid must have changed since they were posted surely? On Thursday, 31 July 2014 12:51:06 UTC+1, jimbo wrote: > > Has anyone got a simple example application of a database such as a > company personal database or similar with several fields sh