Re: [web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-26 Thread Gael Princivalle
Just wait to publish, I've saw in the thread other updates to apply. -- Gael Princivalle 2016-02-27 6:29 GMT+01:00 Gael Princivalle : > Hello Massimo. > > I've saw that some of these website companies are offline: >

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-26 Thread Gael Princivalle
Hello Massimo. I've saw that some of these website companies are offline: http://web2py.com/init/default/support I suggest to delete these websites from the support list. Best regards. Il giorno venerdì 26 febbraio 2016 14:50:26 UTC+1, Gael Princivalle ha scritto: > > Hello Massimo. > >

Re: [web2py] My session.counter is not counting

2016-02-26 Thread Joe
Hi Kiran, Thanks very much for your reply. I tried to initialize session.one_counter/two_counter/three_counter but it seems my understanding of the session variables in this case is not sufficient to get this right. Basically, I am stuck with this one. My aim is to count the clicks to

Re: [web2py] My session.counter is not counting

2016-02-26 Thread Kiran Subbaraman
You seem to be incrementing 'counter' in the session (the counter is user session specific then). Also, you are using session.one_counter/two_counter/three_counter, without having initialized it. Is that a typo? Kiran Subbaraman

[web2py] My session.counter is not counting

2016-02-26 Thread Joe
I am trying to use session.counter to count clicks on images on a page. My problem is that my session.counter is not counting... I am doing something wrong, not sure exactly what. I am pretty sure the issue is the* if image.id == 1* I'd appreciate some help with this. *Controller:* def index():

[web2py] Sublime Text? Plugins?

2016-02-26 Thread Dave
I am not sure if any of you are using Sublime Text to write you code it, but I absolutely love it. With the right plugins, it really makes writing code a joy. Far more useful than any IDE I have ever used (even xcode and eclipse). Anyway, I was installing a few new plugins this week and

[web2py] Re: Basic syntax question

2016-02-26 Thread Anthony
And note, {{=some_expression}} only works when the "=" comes immediately after the "{{". It is a shortcut for: {{response.write(some_expression)}} Also, note that "print" will have no effect on the generated HTML. Instead, you must write to the response.body (which is what response.write

Re: [web2py] dynamic multiple form field instances error

2016-02-26 Thread Richard Vézina
You fall on an empty "name" vars... Could you have forget to pass the name vars throught url? Richard On Fri, Feb 26, 2016 at 3:14 PM, wrote: > Can someone please tell me why I am getting this error and how to fix it? > > > numpatients = int(request.vars.name); > int()

Re: [web2py] auth_permission

2016-02-26 Thread Richard Vézina
Yes why not? As long as you populate them correctly it all fine to do it... Richard On Fri, Feb 26, 2016 at 11:08 AM, prashant joshi wrote: > we can create permissin table in manually > > -- > Resources: > - http://web2py.com > - http://web2py.com/book

[web2py] dynamic multiple form field instances error

2016-02-26 Thread aetagothno
Can someone please tell me why I am getting this error and how to fix it? numpatients = int(request.vars.name); int() argument must be a string or a number, not 'NoneType' *db.py* db.define_table('post', Field('patient'), Field('attime'),

[web2py] Re: Basic syntax question

2016-02-26 Thread Niphlod
good catch. I was writing javascript right now hehehehehe On Friday, February 26, 2016 at 8:41:38 PM UTC+1, Marty Jones wrote: > > Thank you. That works, although using "for" rather than "foreach". > > On Friday, February 26, 2016 at 1:35:10 PM UTC-6, Niphlod wrote: >> >> the correct syntax would

[web2py] Re: Basic syntax question

2016-02-26 Thread Marty Jones
Thank you. That works, although using "for" rather than "foreach". On Friday, February 26, 2016 at 1:35:10 PM UTC-6, Niphlod wrote: > > the correct syntax would be > > {{foreach element in elements:}} > {{=each}} > {{pass}} > > > please read the book (especially the part about views ( >

[web2py] Re: Basic syntax question

2016-02-26 Thread Niphlod
the correct syntax would be {{foreach element in elements:}} {{=each}} {{pass}} please read the book (especially the part about views (http://web2py.com/books/default/chapter/29/05/the-views)) On Friday, February 26, 2016 at 7:49:07 PM UTC+1, Marty Jones wrote: > > I'm just getting

[web2py] Basic syntax question

2016-02-26 Thread Marty Jones
I'm just getting started with web2py and I'm struggling to figure out how to call variables passed from the controller to the view, without using the {{=variable}} method. For example, I have the following code in my controller: def manage(): list = [] for row in

[web2py] Grouping db rows, and showing row with the lowest value for a particular field, within a grid

2016-02-26 Thread Boa
Given a DB table (called db.t_schedule, with the field names/types and corresponding values show below), is there a way to generate an SQLFORM.grid based on the db.t_schedule table such that: - There is no grid row which has the same 'f_uuid' as any other grid row - For each grid row,

[web2py] Re: Weird select().first()

2016-02-26 Thread Anthony
On Friday, February 26, 2016 at 10:51:58 AM UTC-5, Massimo Di Pierro wrote: > > you have > > hist_id = db.sales_cycle_history.insert(sales_cycle_id=scid, ...) > > so you should do > > row = db(db.sales_cycles.id == hist_id).select().first() > > or > > row =

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-26 Thread Anthony
On Friday, February 26, 2016 at 10:57:19 AM UTC-5, Robin Manoli wrote: > > > So, is the above log entry from the *other* server (i.e., not the one you >> control)? I presume the "server.ip" value is the IP address of your server, >> hence the belief that this request is coming from your server,

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-26 Thread Massimo Di Pierro
I agree with Anthony's comments here. Nothing of what is shown is web2py related. This appears to be a php exploit. Massimo P.S. I stand by Niphlod. He did not say anything offending and his comment was insightful. We do not recommend apache+mod_wsgi because there are better ways

[web2py] auth_permission

2016-02-26 Thread prashant joshi
we can create permissin table in manually -- 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

Re: [web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-02-26 Thread António Ramos
webfaction is very good 2016-02-26 15:59 GMT+00:00 Massimo Di Pierro : > I agree: > > pythonanywhere.com (free with limitation) > google app engine (also free with limitations) > digital ocean is $5/month for a full VM > > > On Friday, 26 February 2016 09:03:30 UTC-6,

[web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-02-26 Thread Massimo Di Pierro
I agree: pythonanywhere.com (free with limitation) google app engine (also free with limitations) digital ocean is $5/month for a full VM On Friday, 26 February 2016 09:03:30 UTC-6, Manches spainspots wrote: > > It depends on your needs. I am new to web2py, so I just needed a small > place to

[web2py] Re: Want to build a web scraper that runs as web2py app. Where to start?

2016-02-26 Thread Massimo Di Pierro
You can use this. http://scrapy.org/ But do not run into web2py. Run it as a separate process and have web2py communicate to it by reading each other files or xmlrpc or the web2py scheduler. On Friday, 26 February 2016 09:03:30 UTC-6, Marty Jones wrote: > > I have some familiarity with scraping

[web2py] Re: How to create dating profiles on web2py

2016-02-26 Thread Massimo Di Pierro
You can use extra fields to add fields to profile. auth.settings.extra_fields['auth_user'] = [Field('gender'), Field('eyes_color'), Field('overall_hotness')] You can make the profile of a user public: # http://./profile/1 def profile(): user = db.auth_user(request.args(0)) if

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-26 Thread Robin Manoli
> So, is the above log entry from the *other* server (i.e., not the one you > control)? I presume the "server.ip" value is the IP address of your server, > hence the belief that this request is coming from your server, correct? If > so, how did you get this log entry? Did the owner of the

[web2py] Re: Weird select().first()

2016-02-26 Thread Massimo Di Pierro
you have hist_id = db.sales_cycle_history.insert(sales_cycle_id=scid, ...) so you should do row = db(db.sales_cycles.id == hist_id).select().first() or row = db(db.sales_cycles.sales_cycle_id == scid).select().first() but NOT row = db(db.sales_cycles.id ==

[web2py] Re: Weird select().first()

2016-02-26 Thread Anthony
Can you pack and attach a minimal app the demonstrates the problem? On Friday, February 26, 2016 at 10:03:30 AM UTC-5, Louis Beetge wrote: > > HI everybody > > I have a REALLY weird problem. Take a look at this code: > > def save_disposition(): > dispo_id = request.vars.disposition_id >

[web2py] Re: Setting up the scheduler, and letting it run from a certain point of time

2016-02-26 Thread Lucas Schreiber
It finally worked. thank you very, very much for you patience and help. It took a while but thanks to you i finally understood how the scheduler works. Thankyou one more time :) Am Mittwoch, 24. Februar 2016 00:11:47 UTC+1 schrieb Lucas Schreiber: > > Hi there, > while trying to understand how

[web2py] Re: Unpickle session_data from a MySQL database

2016-02-26 Thread Anthony
I believe this has been resolved here: http://stackoverflow.com/a/35613922/440323 Anthony On Friday, February 26, 2016 at 10:03:30 AM UTC-5, NeoToren wrote: > > In order for a progress bar using cache.ram, and an ajax call to work > properly, there is a need to clean (or just unlock?)

[web2py] Re: Massimo for President!

2016-02-26 Thread Pierre
Massimo is already our President. Guido would make a good Prime Minister -- 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

[web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-02-26 Thread Manches spainspots
It depends on your needs. I am new to web2py, so I just needed a small place to learn. I found that at pythonanywhere.com and a decent free tutorial at Udemy. Good Luck! On Saturday, February 20, 2016 at 10:38:46 PM UTC-8, Rgb Aston wrote: > > Which one's the best to go for? > -- Resources:

[web2py] SQLFORM.grid() control detect_record_change

2016-02-26 Thread domezzzz
Ante todo, un saludo al Sr. Massimo Di Pierro y toda la colectividad que lo secunda, por este excelente framework, que no deja de sorprenderme. Contexto del problema: Versión de web2py: 2.13.4 para windows (EXE) (siempre voy al día ;-)) Sistema operativo: windows XP SP3. Db:

[web2py] Weird select().first()

2016-02-26 Thread Louis Beetge
HI everybody I have a REALLY weird problem. Take a look at this code: def save_disposition(): dispo_id = request.vars.disposition_id dispo_name = request.vars.disposition_name scid = request.vars.sales_cycle_id linked_scid = request.vars.linked_contact_sc_id questions =

[web2py] Unpickle session_data from a MySQL database

2016-02-26 Thread NeoToren
In order for a progress bar using cache.ram, and an ajax call to work properly, there is a need to clean (or just unlock?) sessions. If the app doesn't use session variables to pass to other controllers then session.forget(response) is sufficient. If on the other hand, the app needs session

[web2py] Want to build a web scraper that runs as web2py app. Where to start?

2016-02-26 Thread Marty Jones
I have some familiarity with scraping but only from my local machine, not from a server. I'd like to set up a basic scraping app as a web2py app that I can eventually run on a server. Anybody seen any tutorials for anything along these lines or know of a good module for doing this? --

[web2py] How to create dating profiles on web2py

2016-02-26 Thread meanrhei nqiofg
How do you create dating profiles like in a dating site in web2py? I want one to see other profiles once they are created. I also want one to see who is online when the users are created. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Multiple Ajax calls and session variables - can we have both ?

2016-02-26 Thread NeoToren
up vote down votefavorite In order for a progress bar using cache.ram, and an ajax call to work properly, there is a need to clean (or just unlock?) sessions. If the app doesn't use session variables to

[web2py] Re: Massimo for President!

2016-02-26 Thread Ron Chatterjee
lol. I will vote for him. On Friday, February 26, 2016 at 9:35:18 AM UTC-5, Massimo Di Pierro wrote: > > They misspelled Guido's last name. I swear I said it correctly. > > On Friday, 26 February 2016 02:27:05 UTC-6, Nico Zanferrari wrote: >> >> Hi all, >> >> I've found this article this

[web2py] Re: Massimo for President!

2016-02-26 Thread Massimo Di Pierro
They misspelled Guido's last name. I swear I said it correctly. On Friday, 26 February 2016 02:27:05 UTC-6, Nico Zanferrari wrote: > > Hi all, > > I've found this article this morning: >

[web2py] Re: Importing CSV file

2016-02-26 Thread Joe
Hello Anthony, Thanks for your reply. I exported the CSV after adding some records, as you suggested, and I see no difference in the format. I tried to change the format several times but I can't import it. I either get the None records or an error depending on how I tried to modify the format.

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-26 Thread Gael Princivalle
Il giorno domenica 15 febbraio 2015 23:21:36 UTC+1, Massimo Di Pierro ha scritto: > > We need to update the list of companies that provide web2py consulting. > This list is obsolete: > > http://web2py.com/init/default/support > > Some links are broke. Most pages do not even mention web2py. Some

[web2py] Re: Compute return only the last result

2016-02-26 Thread Gael Princivalle
Hi Dave. Yes it is. Now it works, thanks a lot for your help. Il giorno venerdì 26 febbraio 2016 08:52:16 UTC+1, Dave S ha scritto: > > > > On Thursday, February 25, 2016 at 5:45:57 AM UTC-8, Gael Princivalle wrote: >> >> Hello all. >> >> I use this function for resizing images for full size and

[web2py] Re: Importing CSV file

2016-02-26 Thread villas
I'm not sure whether this will be of any help, but I have found the following useful when working with CSV files in the past... https://github.com/mdipierro/csvstudio -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: SQLFORM.factory upload field can't show link

2016-02-26 Thread Anthony
> for t in db.project: > query = (t.id == request.vars.id) > __copydata(db(query).select(limitby=(0,1)).first(), form.vars, > t.fields) > The above is confusing and cannot be the actual code, as it would raise an exception. When you iterate over db.project, you get its Field objects

[web2py] Re: Importing CSV file

2016-02-26 Thread Anthony
Maybe manually enter a few records, export to CSV, and inspect the exported file to make sure your imported file has everything in the proper format. Anthony On Friday, February 26, 2016 at 4:46:52 AM UTC-5, Joe wrote: > > I tried to import a CSV file but all the values are None. > > This is

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-26 Thread Anthony
On Friday, February 26, 2016 at 4:57:47 AM UTC-5, Robin Manoli wrote: > > > *About the exploit*There is an exploit is was happening. I thought they > were related to a web2py app on Apache, but I'm sure any more. What is > happening is that another web server keeps getting this type of requests

[web2py] Re: All HTTP requests redirected to HTTPS

2016-02-26 Thread Joe
I don't have a SSL yet, so before I get one, users will have an issue when they visit the site. In any case, I better just get the SSL and then I don't have to worry about this. But, still I don't understand the problem. I definitely didn't uncomment it and this issue only happened after I

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-26 Thread Robin Manoli
*About the exploit*There is an exploit is was happening. I thought they were related to a web2py app on Apache, but I'm sure any more. What is happening is that another web server keeps getting this type of requests from a server I'm working on. This keeps happening although the ports 80 and

[web2py] Re: plural forms dict for French

2016-02-26 Thread Pierre
solved ! I edited the plural-fr.py manually and it works..I thought it was some other kind of magic whereas it's only a dict :) by the way I acknowledge : Massimo must be a President...even if Donald disagrees with that -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Importing CSV file

2016-02-26 Thread Joe
I tried to import a CSV file but all the values are None. This is what I did: def index(): if request.vars.csvfile != None: table = db[request.vars.table] file = request.vars.csvfile.file table.import_from_csv_file(file) return dict() My tables look like this:

[web2py] Re: Massimo for President!

2016-02-26 Thread eric cuver
thank you for sharing Le vendredi 26 février 2016 09:27:05 UTC+1, Nico Zanferrari a écrit : > > Hi all, > > I've found this article this morning: > http://www.corrierecomunicazioni.it/it-world/39758_coding-cosi-funziona-il-mio-programma-che-mette-il-turbo-a-python.htm > It's an Italian

[web2py] Massimo for President!

2016-02-26 Thread Nico Zanferrari
Hi all, I've found this article this morning: http://www.corrierecomunicazioni.it/it-world/39758_coding-cosi-funziona-il-mio-programma-che-mette-il-turbo-a-python.htm It's an Italian interview to Massimo - with a bad title but still worth reading. Congratulations! Bravo! -- Resources: -