[web2py] Re: What is the Salt used in web2py

2013-01-31 Thread Anthony
If you do db.auth_user.validate_and_insert(...) to insert a new record, it will run all the validators just like when a form is submitted, so it should handle the hashing as usual (there's also a .validate_and_update()method for updates). Anthony On Thursday, January 31, 2013 2:53:46 AM

Re: [web2py] Re: What is the Salt used in web2py

2013-01-31 Thread Vasile Ermicioi
lets say you want to control manually if some string is the password of the user email='some@email' pwd='12312312' hashed_pwd = db.auth_user.password.validate(pwd)[0] # I suppose this is what you want if db(((db.auth_user.password==hashed_pwd)(db.auth_user.email==email)).count(): #do

[web2py] Re: https at webfaction.

2013-01-31 Thread Neil
The function: request.requires_https() might be what you're looking for. On Wednesday, January 30, 2013 2:46:08 PM UTC, Annet wrote: I the past I hosted a web2py application at Webfaction. I had a dedicated IP address, and added: domains: mydomain.com, www.mydomain.com and

Re: [web2py] Re: What is the Salt used in web2py

2013-01-31 Thread hasan alnator
How can i do it without the validate function or what do the validate function do exactly ? am working with an API so am using another language , so i need to do what the validate dose . regards, On Thu, Jan 31, 2013 at 11:16 AM, Vasile Ermicioi elff...@gmail.com wrote: lets say you want to

[web2py] Re: Example JSON Code

2013-01-31 Thread Niphlod
did you try opening directly the url that is failing through ajax ? that 404 could be originated by an incorrect/mispelled url. On Thursday, January 31, 2013 12:36:56 AM UTC+1, pal...@gmail.com wrote: We just started using web2py where I work. We created our 1st webpage and it uses JSON

Re: [web2py] Re: What is the Salt used in web2py

2013-01-31 Thread Vasile Ermicioi
search in web2py sources may be here https://github.com/web2py/web2py/blob/master/gluon/validators.py -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] Coding of the future?

2013-01-31 Thread Jason Brower
Interesting that we have coding tools built into our framework. http://www.webdesignerdepot.com/2013/01/web-ides-the-future-of-coding/ BR, Jason Brower -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop

[web2py] Re: Interesting about JSON license...

2013-01-31 Thread Alan Etkin
I do not think any of the existing libraries handle it. One option is fixed in simplejson and submit a patch to the authors. Another option is to fix in gluon.serializers. A third option is to fix in the jsonp view (as the article suggests). The best option would be to have this fixed

[web2py] Redirect from inside a component

2013-01-31 Thread Loïc
Hello All, I have a question about my application organized as follows: *A main page : render_page *A component load_newsletter. This component displays a form with an email field and a submit button What I want to do : When the user fill the form in my component load_newsletter, I want to

[web2py] Create SQLFORM with one of its field's as ajax enabled

2013-01-31 Thread newbie
Hi I m a newbie working on web2py,and i want to create an SQLForm with database Employee.The fields of db.Employee are name,campus,timzezone .I want the user to input in the SQLform ,but the last filed of timezone shud be such that when the user inputs in the field ,it shud present

[web2py] Re: Interesting about JSON license...

2013-01-31 Thread Alan Etkin
The best option would be to have this fixed by simplejson/json, ... I opened a new thread for the spacing issue: https://groups.google.com/d/topic/web2py-developers/LyoEi-wJ_OQ/discussion -- --- You received this message because you are subscribed to the Google Groups web2py-users

[web2py] Re: Autocomplete problem ...

2013-01-31 Thread DenesL
Not an easy one. For the widget to work properly the field names should be created at call time not at init time but the callback uses the one from init. Minimizing backward incompatibilities is another concern. As an additional enhancement it could take a query to define a subset of the

[web2py] Re: Is there a way to use query in autocomplete with SQLFORM.factory?

2013-01-31 Thread DenesL
Currently autocomplete does not have a parameter to create a subset, but it would be a nice addition. On Thursday, January 24, 2013 6:14:56 AM UTC-5, Dragan Matic wrote: I would like autocomplete to show just a subset of data, not all rows in table. Is it possible to use query in

Re: [web2py] Coding of the future?

2013-01-31 Thread Johann Spies
On 31 January 2013 13:03, Jason Brower encomp...@gmail.com wrote: Interesting that we have coding tools built into our framework. http://www.webdesignerdepot.com/2013/01/web-ides-the-future-of-coding/ When webeditors become as good as emacs, vim, bluefish, I will consider it. For now I did

[web2py] Preferred method for banning email domains from registering?

2013-01-31 Thread Lamps902
Hi, web2py users. Is there a preferred method for banning a set of email domains from registering? I know that the IS_EMAIL() validator has a banned parameter, but is this the best way to go about this task? If so, is there a way to pass multiple domains to the banned parameter (I don't think

[web2py] a spreadsheet-like-table for user inserting data

2013-01-31 Thread Filipe S.
Hi folks. I'm completely new to web2py, having discovered it only this week, so i apologize if this question has been ansewered already or if it is too basic. I'm working a on putting a simple assessment tool on the web, for a scientific goal. I have written a dozen of functions that act on

[web2py] How do you check user-uploaded files for malware?

2013-01-31 Thread Lamps902
Has anybody had success using a malware/virus-scanning module/tool to scan user-uploaded files on their web2py page? Any suggestions as to how to go about doing this? Thanks! -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe

[web2py] Re: a spreadsheet-like-table for user inserting data

2013-01-31 Thread Alan Etkin
Now, i thought this would be easy but it has been harder than it seemed. How can i define an array (of 15*50 for example) that accepts numeric values, doesn't need to store them anywhere apart from that session, and doesn't need to allow calculation with them as the spreadsheets i've

[web2py] Re: Redirect from inside a component

2013-01-31 Thread Lamps902
Why not use the process() method's next parameter? http://web2py.com/books/default/chapter/29/07?search=.accepted#The-process-and-validate-methods Otherwise, there's redirect() - http://web2py.com/books/default/chapter/29/07?search=redirect%28#Forms-and-redirection On Thursday, January 31,

[web2py] Re: Redirect from inside a component

2013-01-31 Thread Loïc
Thank you, but if I use next or redirect in my component's controler, the redirection is done in the component, not in the page that contains the component. For example, I have : -Page1 which contains component1 If I put redirect(URL('Page2')) in my component1's controller, I will see: -Page1

[web2py] Re: Redirect from inside a component

2013-01-31 Thread Anthony
redirect(..., client_side=True) Instead of doing a regular redirect, that simply sends a Javascript command to the browser instructing it to replace the whole page with the new location. Anthony On Thursday, January 31, 2013 8:16:21 AM UTC-5, Loïc wrote: Thank you, but if I use next or

[web2py] Re: Redirect from inside a component

2013-01-31 Thread Loïc
... and it works fine! Thank you Anthony Le jeudi 31 janvier 2013 14:52:21 UTC+1, Anthony a écrit : redirect(..., client_side=True) Instead of doing a regular redirect, that simply sends a Javascript command to the browser instructing it to replace the whole page with the new location.

[web2py] Re: Is there a way to use query in autocomplete with SQLFORM.factory?

2013-01-31 Thread Annet
For this reason I am using the auto complete jQuery UI provides: In the view: script type=text/javascript $(document).ready(function(){ $(function() { $(#no_table_computedName).autocomplete({ source: {{=URL('jqueryui', 'elementnode_autocomplete')}}, minLength: 2 }); });

[web2py] Re: contribute: db diagram for web2py appadmin

2013-01-31 Thread Paolo Caruccio
first post updated: replaced following files db_diagram.html corrected CDN links. Now the diagram works on https too db_diagram.py [please note that you must copy the code within this file and paste at the bottom of web2py_app/controllers/appadmin.py] deleted a print statement Il giorno

Re: [web2py] Create SQLFORM with one of its field's as ajax enabled

2013-01-31 Thread Richard Vézina
Have you look at this plugin : http://dev.s-cubism.com/plugin_lazy_options_widget It require a dependecy to suggest plugin as explained on the site, but you can avoid using it. I already post answer to Jim on this list about that. If you need more help with the integration of lazy option widget

[web2py] Re: Preferred method for banning email domains from registering?

2013-01-31 Thread Andrew Buchan
Lamps, I believe using banned is the best way of doing it. You would cover multiple domains in the regex. The following snippet would ensure that addresses ending in gmail.com or hotmail.com fail registration... auth_table.email.requires = [ IS_EMAIL(error_message =

[web2py] Re: contribute: db diagram for web2py appadmin

2013-01-31 Thread LightDot
Works nicely! +1 to adding this into appadmin and moving the static/view files into admin. It wouldn't need to replace the existing graph model, there is plenty of space for another button next to it ;) Regards, Ales On Thursday, January 31, 2013 3:31:53 PM UTC+1, Paolo Caruccio wrote:

[web2py] converting URL to lowercase before dispatching

2013-01-31 Thread olly . morgan
I have a web2py application say, at http://127.0.0.1:8000/my_data;. I would like to make the URL case insensitive so that any users calling My_data, MY_Data, etc it gets remapped to the lowercase version of the URL. Any thoughts on how to do this? Olly -- --- You received this message

[web2py] Re: Preferred method for banning email domains from registering?

2013-01-31 Thread Lamps902
Yep, just tried it, and it appears to be working well! Thanks a lot, Andrew. -Lamps On Thursday, January 31, 2013 10:31:22 AM UTC-5, Andrew Buchan wrote: Lamps, I believe using banned is the best way of doing it. You would cover multiple domains in the regex. The following snippet would

[web2py] Unstructured table creation in DAL; akin to NoSQL?

2013-01-31 Thread Alec Taylor
I am porting a library to web2py's DAL from pymongo; and looking through it I'll likely need to write something like these two lines (and the corresponding function): if not db[tablename]: create_my_tables() Which is fine; but got me thinking. Can we add support for unstructured data in DAL?

[web2py] Re: Unstructured table creation in DAL; akin to NoSQL?

2013-01-31 Thread Alan Etkin
I am porting a library to web2py's DAL from pymongo; and looking Sorry, may I ask what library? dal already has experimental support for mymongo trough the MongoDBAdapter. Have you considered using/extending it? -- --- You received this message because you are subscribed to the Google

[web2py] wiki: how to cache media files?

2013-01-31 Thread Paolo valleri
Hi all, today I discovered that wiki media, actually they are all images, they are always requested to the server and never cached by the client. In other words, even if I have already visited the page I do a get to download all the images instead of using those in the browser cache as

[web2py] Re: contribute: db diagram for web2py appadmin

2013-01-31 Thread Jose
Very nice. Excellent work Paolo. Jose -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit

[web2py] Question on websockets, modules and EMTE

2013-01-31 Thread jensk
I am trying to get web2py set up as a WSGI server on pythonanywhere.com. That is really easy, but alongside a regular http server I also need websockets server support. Because I would like to use WAMP as protocol on top of websockets, I have chosen Autobahn, which uses Twisted. The server

[web2py] Re: a spreadsheet-like-table for user inserting data

2013-01-31 Thread Tim Richardson
There is a spreadsheet example included in web2py. I haven't used it yet. It sounds like a good place to start. http://www.web2py.com/examples/spreadsheet/index -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this

[web2py] Modules not detecting functions

2013-01-31 Thread Wonton
Hello everyone! I have a project in a server without admin access so it's difficult for me to debug it, I have a strange problem and I'm lost with it. Basically my default.py has something like this: import mymodule def index(): value = mymodule.function() return value And inside

[web2py] Re: sending mail to multiple clients

2013-01-31 Thread José Eloy
Thanks Bruno for your answer: You should not do this on a request time. It needs to be done on background process. You can check the web2py book example on email chapter, the scheduler or redis[3] [3] http://rochacbruno.com.br/web2py-and-redis-queue/ Maybe I can use the redis

[web2py] DAL and MySQL indexing

2013-01-31 Thread Mark Li
Simple question. My web2py app just received a heavy amount of traffic, and I was looking for ways I could optimize performance. I am currently using MySQL, and using a database query like rows = db(db.tablename.category==category_name).select() I am aware that web2py does not automatically

Re: [web2py] DAL and MySQL indexing

2013-01-31 Thread Bruno Rocha
Since you have the indexes created on DB backend, The DAL will use this for any query on that table, because the output of .select() is in fact a pure SQL statement. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this

Re: [web2py] DAL and MySQL indexing

2013-01-31 Thread Mark Li
Awesome, thanks for that! On Thursday, January 31, 2013 4:43:24 PM UTC-8, rochacbruno wrote: Since you have the indexes created on DB backend, The DAL will use this for any query on that table, because the output of .select() is in fact a pure SQL statement. -- --- You received this

Re: [web2py] Using the web2py online debugger

2013-01-31 Thread Mariano Reingart
Can you send us a minimal example to reproduce this issue? The debugger uses the standard python debugger infrastructure (bdb), the same used by pdb. It should work correctly, but sometimes there are some subtle glitches maybe related to bdb. If you press continue, do you hit the breakpoint

Re: [web2py] Debugging in a server

2013-01-31 Thread Mariano Reingart
AFAIK you could store the tickets in the db or coping the files and open them locally (maybe in another web2py instance) Code traces will go to your web server logging facility (if any). If you cannot access that, you could create a temp file and write the logs there. For more advanced methods,

[web2py] I seem to block the server if I forget about dbg.set_trace

2013-01-31 Thread Tim Richardson
I use dbg.set_trace for debugging. Usually I remember to run an instance of web2py on an additional port and use that for my debugging. Sometime I forget to remove dbg.set_trace. When I do that, I don't have a listening window open, so I guess rocket stops but there is no one to hear it. I'm on

Re: [web2py] I seem to block the server if I forget about dbg.set_trace

2013-01-31 Thread Mariano Reingart
If dbg is the integrated web2py debugger, you could just open a new interaction window (debug button in admin) and then continue. Rocket should not block or stop, except you exhaust all threads. If you get an error message or any other issue, please send it to us so we can review it. The more

Re: [web2py] Create SQLFORM with one of its field's as ajax enabled

2013-01-31 Thread newbie
Hi Richard, Thanks for the answer. Actually i am able to achieve Ajax enabled text box in an SQLFORM...But the problem is the sqlform is auto generated by the SQLFORM.grid for that database. The code for SQLFORM which is working for normal tables is: DB.py

Re: [web2py] Re: Unstructured table creation in DAL; akin to NoSQL?

2013-01-31 Thread Alec Taylor
On Fri, Feb 1, 2013 at 4:23 AM, Alan Etkin spame...@gmail.com wrote: I am porting a library to web2py's DAL from pymongo; and looking Sorry, may I ask what library? dal already has experimental support for mymongo trough the MongoDBAdapter. Have you considered using/extending it? I am

[web2py] create query for join multiple table

2013-01-31 Thread 黄祥
hi, how to create query for join multiple table? my goal is to select all data in company and show it in invoice page. *db.sale.created_by* refer to *db.auth_user.id* *db.auth_user.company_id* refer to *db.company.id* * * any suggestion, solutions or hints for this case? * * here is the model

[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-01-31 Thread Tim Richardson
dbg is the integrated web2py debugger in this case. The behaviour I observe is that rocket no longer reponds: I can't retrospectively open an admin session. I get no error tickets although maybe something is logged somewhere. I think it affects all users. This is running on windows, latest

[web2py] Re: Create SQLFORM with one of its field's as ajax enabled

2013-01-31 Thread newbie
Hi Richardthanks for the link...the widget is working perfectly for all scenarios..:) On Thursday, 31 January 2013 10:29:29 UTC+5:30, newbie wrote: Hi I m a newbie working on web2py,and i want to create an SQLForm with database Employee.The fields of db.Employee

[web2py] Re: I seem to block the server if I forget about dbg.set_trace

2013-01-31 Thread Tim Richardson
I can reproduce it and I think my observations above are completely correct. So I raised an issue. http://code.google.com/p/web2py/issues/detail?id=1313 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and