[web2py] Re: How to detect the browser time zone?

2013-08-12 Thread Luca
Thank you Roberto, I will look at it! I also found this one: https://bitbucket.org/pellepim/jstimezonedetect The one you found is, I think, the one that was being discussed in March; I will definitely study it. Luca On Monday, August 12, 2013 7:02:30 PM UTC-7, Luca wrote: > > I see that the vali

Re: [web2py] Re: Do you use web2py professionally?

2013-08-12 Thread Johann Spies
I use it as data manager of a research institution to manage several bibliometric databases. The one I am building at the moment (busy importing raw data for the past three months) contains information about more than 43 million pubications. One of the tables (many to many cross references) has mo

Re: [web2py] Re: db.py size

2013-08-12 Thread Jonathan Lundell
On 12 Aug 2013, at 8:59 PM, LightDot wrote: > Disabling migrations is the first thing everyone should do when the > application is put into production, regardless of the number of tables. Close > second would be to compile the application. Anyway, there is plenty of > threads addressing optimiz

[web2py] Re: db.py size

2013-08-12 Thread LightDot
Disabling migrations is the first thing everyone should do when the application is put into production, regardless of the number of tables. Close second would be to compile the application. Anyway, there is plenty of threads addressing optimization questions. If editing trough a web interface i

Re: [web2py] How to detect the browser time zone?

2013-08-12 Thread Roberto Perdomo
Doing some research, I found this, it might be what you need: https://github.com/niphlod/w2p_timezone_plugin 2013/8/12 Luca > I see that the validators (such as DATETIME) take a timezone object, so > that the time can be stored in utc and converted to localtime. > However, I did not see if

[web2py] Re: Form vars, request vars, hidden fields, oh my!

2013-08-12 Thread Joe Barnhart
Nope, no unique or notnull set on the database field. Just a pure, clean text field. I'll see if I can come up with a simplified example. When I did that with another problem Niphlod was helping me with, it showed me what the real issue was. Always a good exercise! -- Joe On Monday, Augus

Re: [web2py] Re: Do you use web2py professionally?

2013-08-12 Thread Jason (spot) Brower
When ever you need a spreadsheet that is accessed by many people during the day. Then you need an app. Especially if it's internal network. Like an intranet. Web2py does that just fine. And most of the time, if you try to solve everything with a spreadsheet it's like making a robot act like a hu

Re: [web2py] Re: Request: Course about Web2py & TDD + pledge for cash

2013-08-12 Thread Michael Herman
I'd love to hear more about your curriculum that you're going to be teaching. I wrote the course Real Python for the Web @ RealPython.com. I'd love to compare notes. :) On Mon, Aug 12, 2013 at 6:53 PM, Luca wrote: > I will be teaching a web dev class at UCSC based on web2py, and I may make > th

[web2py] How to detect the browser time zone?

2013-08-12 Thread Luca
I see that the validators (such as DATETIME) take a timezone object, so that the time can be stored in utc and converted to localtime. However, I did not see if there is support in web2py for querying the browser time zone. This was discussed in this group back in March, but I did not see (or c

[web2py] Re: db.py size

2013-08-12 Thread Luca
I generally like to split things according to function, and I don't like files much larger than 1000 lines, so I would split, but this is a matter of style. Aside from this, you might want to see if you can reorganize your tables into fewer ones... One other thing is that I wonder if it would h

[web2py] Re: web2py and timezones

2013-08-12 Thread Luca
Did the patch from Niphlod mentioned here go live? I see that now validators can take a pytz object specifying the timezone. However, I was not able to find where the information on how to get the browser timezone. Is this a plugin? Also, am I correct to assume that the validators always retur

[web2py] Re: How to keep database portability?

2013-08-12 Thread Luca
I may be missing something, but usually when I am in your situation I use an update_or_insert web2py statement, rather than explicitly managing transactions. Perhaps you could also consider encoding more of your logic in web2py rather than postgres? Or perhaps I am being naive? Luca On Frid

[web2py] Re: Command line login

2013-08-12 Thread Luca
The correct way to do this would be something like: def ulogin(): u = auth.login_bare(request.vars.user, request.vars.password) if not u: return '' else: return u Or something like that; I don't know. Now, the issue is that this validates a login, but it does not

[web2py] Re: deployment to google app engine did not include my static files

2013-08-12 Thread Luca
Shall I post a working app.yaml (minus confidential details) that works with threadsafe=True? Let me know if this would help. Luca On Sunday, August 4, 2013 12:12:16 PM UTC-7, davedigerati wrote: > > as you can see from here: http://sportssquaresonline.appspot.com/ > it did upload most of the st

[web2py] Re: Request: Course about Web2py & TDD + pledge for cash

2013-08-12 Thread Luca
I will be teaching a web dev class at UCSC based on web2py, and I may make the videos available in YouTube. Starting around September 20. Email me if you are interested - l...@ucsc.edu Thanks! -Luca On Sunday, August 11, 2013 10:29:46 AM UTC-7, Mika Sjöman wrote: > > Hi > > I am trying to get

[web2py] Is there a way to overload the Session table?

2013-08-12 Thread Mark Finkelstein
I was wondering if there was a way to overload the session table. Basically I do not want to use sessions, but I do want to use the functionality where I can set cookies by simple writing session.myvariable = "hello", I'm guessing this isnt possible. Otherwise I'd have to use the response.cooki

[web2py] What is the web2py team's future commitment to FastCGI ?

2013-08-12 Thread robertino01
Until 2 days ago, I was undecided about which framework to use : web2py or Django. But the following linked topic in the Django Dvelopers Google Group was an eyeopener, and made me cross Django off my list : They have started deprecating FastCGI support in favour of uWSGI. https://groups.google.c

[web2py] Re: Do you use web2py professionally?

2013-08-12 Thread Tim Michelsen
Hello, very intersting > web2py makes it really easy to build little utility apps to replace > spreadsheets and access databases. Could you give an exmaple in which workflow this is used? Any I would be interested in learning about your development appraoch. Especially when replacing the monstrou

[web2py] Re: Request: Course about Web2py & TDD + pledge for cash

2013-08-12 Thread Michael Herman
Hello - I am the author of Real Python for the web - http://www.realpython.com. My course is focused on web development in Python, so I touch everything from web scraping to database programming as well as the various Python-based web frameworks - Flask, web2py, and Django. I am adding more mat

[web2py] Re: Do you use web2py professionally?

2013-08-12 Thread Michael Herman
I develop as much as I can in web2py. Scalability has a lot more to do with architecture and database design than the framework. If you are developing an MVP, you never want to think about scalability in the first place. Develop quickly, test the main features, pivot (if needed), and then grow

Re: [web2py] Re: db.py size

2013-08-12 Thread Richard Vézina
I don't think that model size is an issue for exectution, since all these lines need to be executed or at least parsed... But yes, you will have hard time edit a long model file with the online editor and as Christian explained it makes more sens to split your model into logical subgroup of models

[web2py] Web2py Sem Segredos

2013-08-12 Thread Ovidio Marinho
Curso Web2py sem Segredos - EAD inicia Quarta-Feira 14/08/2013 ultimas vagas. Maiores informações https://www.facebook.com/CursoDePythonEWeb2py Ovidio Marinho Falcao Neto ITJP.NET.BR ovidio...@gmail.com 83 8826 9088 - Oi 8

[web2py] Re: Scheduler: Wait for another task to finish and use it's return-values as parameters

2013-08-12 Thread Joe Barnhart
Yesh, I prolly forgot to mention my scheduled tasks are all in modules. That limits me to the thread-local vars and scheduler isn't one of those! -- Joe On Monday, August 12, 2013 11:09:45 AM UTC-7, Niphlod wrote: > > it's really strange that you can't access the scheduler while being able > t

[web2py] Rocket listener started when not ready

2013-08-12 Thread Johann Spies
I am trying to help a friend to get web2py installed on his Windows 2.7 Professional. I do not know Windows very well as I do not use it. We have tried the following: Install the Windows version of Web2py and run it. Then we got the error that the Rocket server started a listener when not ready

[web2py] Re: Do you use web2py professionally?

2013-08-12 Thread Jim S
Yes, I use it for all sorts of little applications for our mid-size manufacturing organization. We have a big ERP system but it can't handle lots of the things that make us different. web2py makes it really easy to build little utility apps to replace spreadsheets and access databases. Becau

Re: [web2py] Re: Update record not working

2013-08-12 Thread Eduardo Cruz
it's working now but the code it's exactly the same, woah. On 12 August 2013 18:44, Anthony wrote: > Should work. I guess we need to see some more code. Also, make sure you're > checking the right records in the right database. > > > On Monday, August 12, 2013 2:10:19 PM UTC-4, Eduardo Cruz wro

Re: [web2py] Re: Update record not working

2013-08-12 Thread Anthony
Should work. I guess we need to see some more code. Also, make sure you're checking the right records in the right database. On Monday, August 12, 2013 2:10:19 PM UTC-4, Eduardo Cruz wrote: > > is part of an http request. > > > On 12 August 2013 18:05, Anthony > wrote: > >> Is this part of an HTT

[web2py] Re: Do you use web2py professionally?

2013-08-12 Thread Anthony
I have some web2py apps used internally by a Fortune 500 company, and I know there are many similar cases. Sahana Edenis an example of a public project that is not a "small app." Certainly, though, Django has a larger community and ecosystem. This is

Re: [web2py] Do you use web2py professionally?

2013-08-12 Thread Jason (spot) Brower
Our company only develops in web2py. Python really, but web2py is what we use more than anything else by far. For example, we are developing a site that will handle terrabytes of data. At most, 196TB but most likely about a third of that at any one time. It's got at least 2 intranet servers and 1 a

Re: [web2py] Re: Update record not working

2013-08-12 Thread Eduardo Cruz
is part of an http request. On 12 August 2013 18:05, Anthony wrote: > Is this part of an HTTP request to an app, or in an external script > (outside of an HTTP request, you need to call db.commit() to commit > transactions)? > > Anthony > > > On Monday, August 12, 2013 1:28:48 PM UTC-4, Eduardo

[web2py] Re: Scheduler: Wait for another task to finish and use it's return-values as parameters

2013-08-12 Thread Niphlod
it's really strange that you can't access the scheduler while being able to access the scheduler tables...they are defined in the scheduler ^___^ However, it's another good practice, assuming you have a 1:1 depending tasks. On Monday, August 12, 2013 7:51:57 PM UTC+2, Joe Barnhart wrote: > > I h

[web2py] Do you use web2py professionally?

2013-08-12 Thread alastor . haissem
Hello Web2py users! I heard a lot about web2py. I spent some time to test it, and I loved what I have seen. But compared to Django, web2py seems to be used only for personal websites, or small apps. Do you know if there are people or companies using web2py to build professionnal applications

[web2py] Re: Update record not working

2013-08-12 Thread Anthony
Is this part of an HTTP request to an app, or in an external script (outside of an HTTP request, you need to call db.commit() to commit transactions)? Anthony On Monday, August 12, 2013 1:28:48 PM UTC-4, Eduardo Cruz wrote: > > I'm trying to update a record: >> >> for station in stations: >>

[web2py] Re: I got those ol' datepicker blues!

2013-08-12 Thread Anthony
:-) On Monday, August 12, 2013 1:35:43 PM UTC-4, Joe Barnhart wrote: > > Wow, you are awesome Anthony! You come up with the best one-liners! > > -- Joe > > On Monday, August 12, 2013 6:12:04 AM UTC-7, Anthony wrote: >> >> Also: >> >> Field('birthday', 'date', >> widget=lambda f, v:

[web2py] Re: Form vars, request vars, hidden fields, oh my!

2013-08-12 Thread Anthony
You said you excluded the field from the form -- if that's true, then it will not be required to validate (on the other hand, if you set required=True or notnull=True in the field definition and attempt an insert without that field, you will get a DAL or db error). At this point I think you'll

[web2py] Re: Scheduler: Wait for another task to finish and use it's return-values as parameters

2013-08-12 Thread Joe Barnhart
I have a similar situation. I have one task that, when it runs, it inserts other tasks. So if task B depends on task A, I have task A insert the task B information into the scheduler just as it finishes. The "scheduler" object itself is not present, so I insert the tasks into the scheduler_ta

[web2py] Re: Form vars, request vars, hidden fields, oh my!

2013-08-12 Thread Joe Barnhart
Hmmm... No, the problem here is that form.validate fails because it lacks the 'xyzzy' field. I have to somehow get that field into its vars BEFORE the validate is called. I thought I understood this form stuff, but this is the aspect that is still getting me. 1. I tried overriding xyzzy.r

[web2py] Re: I got those ol' datepicker blues!

2013-08-12 Thread Joe Barnhart
Wow, you are awesome Anthony! You come up with the best one-liners! -- Joe On Monday, August 12, 2013 6:12:04 AM UTC-7, Anthony wrote: > > Also: > > Field('birthday', 'date', > widget=lambda f, v: SQLFORM.widgets.date.widget(f, v, _class= > 'string') > > Anthony > > On Monday, Augu

[web2py] Update record not working

2013-08-12 Thread Eduardo Cruz
I'm trying to update a record: > > for station in stations: > voice = "something" > station.update_record(voice=voice) > > but for some reason it's not in the db when I check with MySQL Workbench, any suggestions? -- --- You received this message because you are subscribed to

[web2py] Re: Scheduler: Wait for another task to finish and use it's return-values as parameters

2013-08-12 Thread D.
Thank you - I will follow this approach :-) Am Montag, 12. August 2013 17:08:18 UTC+2 schrieb Niphlod: > > until now no request for a feature like "task dependancies" has been > raised. > I usually deal with "the issue" with an additional task that "drives" all > the others. > Basically you need

[web2py] Re: Scheduler: Wait for another task to finish and use it's return-values as parameters

2013-08-12 Thread Niphlod
until now no request for a feature like "task dependancies" has been raised. I usually deal with "the issue" with an additional task that "drives" all the others. Basically you need to schedule all your tasks with enabled=False and then use the "boss" task to update with enabled=True only the one

[web2py] Re: executesql insert multiple rows

2013-08-12 Thread Brian M
Sorry, don't have an install of PostgreSQL handy to try. I think that this likely isn't included in DAL because of differing syntax and ability between the different databases and nobody having volunteered to sort it out and submit a patch. (For example i use MSSQL and such inserts are differen

Re: [web2py] Re: SQLFORM.grid always show column sorter arrows

2013-08-12 Thread Jim Steil
Submitted. Issue 1626. On Mon, Aug 12, 2013 at 9:57 AM, Niphlod wrote: > ok, then I guess it's doable. Would you please open a ticket to get the > feature request tracked ? I can do it in the evening. > > PS: until then another way is just to link the grid with the correct var > parameter > >

Re: [web2py] Re: SQLFORM.grid always show column sorter arrows

2013-08-12 Thread Niphlod
ok, then I guess it's doable. Would you please open a ticket to get the feature request tracked ? I can do it in the evening. PS: until then another way is just to link the grid with the correct var parameter Il giorno lunedì 12 agosto 2013 15:41:26 UTC+2, Jim S ha scritto: > > Well that answer

[web2py] InterfaceError: connection already closed

2013-08-12 Thread hiro
I have recently starting to get this error when accessing random pages and the admin interface. All I need to do to stop receiving the error is to wait for a while, and then everything works for a while again. Where should I start looking in order to get rid of this error? Traceback 1. 2. 3. 4

[web2py] Re: executesql insert multiple rows

2013-08-12 Thread ssuresh
Thanx Brian.. I too thought of something similar- concatenating to create the sql ..Since executing multiple statements is quite common, I thought something inbuilt will be there in web2py.. I dug through the code and found a executemany() function in gluon/contrib/ pg8000/dbapi.py ..Will it

[web2py] Re: how can a form have a dynamic number of form fields based on dropdown list selection?

2013-08-12 Thread Michael Beller
Update ... I found one problem: when I was dynamically adding form fields as html elements, I wasn't adding them as field objects to the form object on the postback so w2p didn't know about the fields for validation. But I still must be confused how components work. I load the form but the su

Re: [web2py] LDAP with username=True can still login with email

2013-08-12 Thread Richard Vézina
UP! On Fri, Aug 9, 2013 at 10:59 AM, Richard Vézina wrote: > Here the patch!! > > I have not been able to use the IS_NOT_EMAIL() validator from > validators.py didn't understand how validators are import in tools.py... > > NOTE : > About my precedent mail... the "auth_table.username.requires =

Re: [web2py] Re: SQLFORM.grid always show column sorter arrows

2013-08-12 Thread Jim S
Well that answer was confusing. Rereading Niphlod's question I should have responded: No, not for all the column headers, just for the one's included in the initial orderby on the SQLFORM.grid call. -Jim On Sunday, August 11, 2013 7:29:37 PM UTC-5, Jim S wrote: > > Yes, just for the active so

[web2py] Re: Form vars, request vars, hidden fields, oh my!

2013-08-12 Thread Anthony
> Take the field "xyzzy" for example (not its real name). It is a string > field and it's not even needed on the form since i know its value from > auth.user. So I left it off the form thinking I could populate it either > before or after displaying the form. Well, I can't set its default b

[web2py] Re: I got those ol' datepicker blues!

2013-08-12 Thread Anthony
Also: Field('birthday', 'date', widget=lambda f, v: SQLFORM.widgets.date.widget(f, v, _class= 'string') Anthony On Monday, August 12, 2013 4:19:20 AM UTC-4, Joe Barnhart wrote: > > That's a great find, Massimo, but reading it thru it seems the order can't > be mucked with programm

[web2py] Re: Database update doesn't reflect in view

2013-08-12 Thread Anthony
On Monday, August 12, 2013 4:37:08 AM UTC-4, sasogeek wrote: > how do i explicitly update the auth.user.money? > I thought that's what I did here "...{'money':auth.user.money+100}..." > No, your code updates the db.auth_user record *in the database*. auth.user is just an attribute of the auth ob

[web2py] Request: Course about Web2py & TDD + pledge for cash

2013-08-12 Thread Arnon Marcus
Have you seen this? www.google.co.il/url?q=http://www.kickstarter.com/projects/1369857650/real-python-for-web-development-featuring-web2py&sa=U&ei=7L8IUpv9JITBhAfO3ICgAg&ved=0CAgQFjAA&sig2=O3-v5BoCopi7PkTsHu1ruA&usg=AFQjCNETtaOj7l8Urfb41wH-_hxcATQg0w -- --- You received this message because yo

[web2py] Form vars, request vars, hidden fields, oh my!

2013-08-12 Thread Joe Barnhart
I have the mother of all confusing form issues. It seemed simple enough during the design phase... (Don't they always??) I have a table that contains registration information for this club. It's a lengthy amount of data and it must be renewed annually. I have a complete record of everyone's

[web2py] Scheduler: Wait for another task to finish and use it's return-values as parameters

2013-08-12 Thread D.
Dear community, in my app, users can chose from a list of different calculations to be run on a given set of data. Normally the order of those calculation is irrelevant and I just schedule all of the selected to be run by a pool of workers. However, I also need an option to specify that a cert

[web2py] Re: Database update doesn't reflect in view

2013-08-12 Thread sasogeek
how do i explicitly update the auth.user.money? I thought that's what I did here "...{'money':auth.user.money+100}..." On Sunday, 11 August 2013 17:54:14 UTC+1, Anthony wrote: > > Upon login, the auth.user object is stored in the session and is not > updated again until next login (i.e., updating

[web2py] Re: I got those ol' datepicker blues!

2013-08-12 Thread Joe Barnhart
That's a great find, Massimo, but reading it thru it seems the order can't be mucked with programmatically. Since this is a form with a custom formstyle, I put in a snipped to set my 'date' classes back to 'string' in the formstyle. It's a workaround, but I'm not looking for purity here, just f

[web2py] Re: I got those ol' datepicker blues!

2013-08-12 Thread Massimo Di Pierro
Perhaps this helps: http://stackoverflow.com/questions/3934570/order-of-execution-of-jquery-document-ready Looks like it should be possible to alter the order in which registered onload callbacks are executed. You want to remove "date" class before the web2py.js datepicker is called. On Monday,

[web2py] Re: Friendly URLs and routes.py

2013-08-12 Thread Massimo Di Pierro
I would use something like http://// where name is the IS_SLUG.urlify(user._first_name+'-'+user.last_name) and you can use for a quick user lookup without worries about naming conflicts. On Sunday, 11 August 2013 21:35:47 UTC+2, lesssugar wrote: > > I need to create user profile URL based