[web2py] Re: max size table that DAL can handle?

2015-03-16 Thread Dane Wright
I have a table which currently contains 10m+ records (local government spending in www.appgov.org). A native SQL count(*) will take 3-5 secs but reading all the records like this via the DAL will result in the system hanging. I try not to read too many of these records in any one online

[web2py] Re: How to get the file name when importing a csv file?

2013-06-24 Thread Dane Wright
Anthony - thank you very much - that works perfectly! Is this documented somewhere that I could have looked up myself? -- --- 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

[web2py] How to get the file name when importing a csv file?

2013-06-23 Thread Dane Wright
I'm importing a lot of csv files through Database Administration and would like to be reminded of which one was last imported. I was going to amend appadmin.py so that the response.flash on line 255 said data uploaded for +filename. But I just can't see where the filename is stored. I can see

[web2py] Access MySQL PythonAnywhere

2013-06-18 Thread Dane Wright
Yes I use MySQL on PythonAnywhere and so far it is working well. Can you describe your problem in more detail? -- --- 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

[web2py] Re: looking for volunteers to help proof-read book 5th ed.

2013-01-28 Thread Dane Wright
: Dane -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

[web2py] Re: looking for volunteers to help proof-read book 5th ed.

2013-01-27 Thread Dane Wright
and delete records from a single gadgets. Dane On Sunday, 20 January 2013 23:52:02 UTC, Massimo Di Pierro wrote: I am looking for help proofreading the final version of the book. It is almost done up to a final touch. The attached file contains the changes between the 4th edition and 5th

[web2py] Re: What is the best deployment method.

2011-08-05 Thread Dane
For me git + simple sh hooks has been an easy and effective method. On Aug 6, 12:18 am, Jason Brower encomp...@gmail.com wrote: I see three places that I have to work in a modern team based development. Local Machine: Where I host my own server and settings. Testing Machine: Server that should

[web2py] Problem with models in subdirectories

2011-06-20 Thread Dane
Hello, I'm migrating an app to a new server (ubuntu 10.10) and upgraded to the most newest web2py stable version as part of this. This has introduced a problem where models in subdirectories of the model folder don't seem to be getting executed. Files placed directly in the model folder run

[web2py] Re: Problem with models in subdirectories

2011-06-20 Thread Dane
was officially supported. Anthony On Monday, June 20, 2011 3:29:24 PM UTC-4, Dane wrote: Hello, I'm migrating an app to a new server (ubuntu 10.10) and upgraded to the most newest web2py stable version as part of this. This has introduced a problem where models in subdirectories

[web2py] Re: Problem with www-data ownership (or lack thereof)

2011-02-19 Thread Dane
Does fabric/mercurial have post-receive hooks like git? I use this do a recursive chown after every update to be safe. On Feb 18, 11:54 pm, pbreit pbreitenb...@gmail.com wrote: I just had a site outage after deploying some code changes. Somehow, some of my directories and files had become owned

[web2py] Re: Async http request in web2py

2011-02-18 Thread Dane
non-blocking call. On Feb 18, 8:52 am, KMax mkostri...@gmail.com wrote: asynchronous http and synchronous http What the difference ? On 18 фев, 10:37, Dane dane.schnei...@gmail.com wrote: Hi, I need to make an asynchronous http request to one of my controller functions in order

[web2py] Re: Async http request in web2py

2011-02-18 Thread Dane
. Anyway, this is not a definitive word on the subject. Massimo On Feb 18, 9:15 pm, Dane dane.schnei...@gmail.com wrote: Synchronous http makes the call and stops further execution until the result is returned. Async makes the call and optionally provides a callback so that further

[web2py] Async http request in web2py

2011-02-17 Thread Dane
=web2py+async+http+request#af4d1c0e8e8937d2 But the link to the lola function posted post by Massimo is broken. Can anyone supply a new link or explain a simple way to make async, ajax-like requests from within web2py? Thanks. -Dane

[web2py] When is db.commit() unnecessary?

2011-02-12 Thread Dane
Hello, wondering if someone could clarify when it's unnecessary to call db.commit()? I've noticed it is needed when doing inserts from the console, but it seems to be implicit in controller functions? Just looking for some quick clarification on this. Thanks!

[web2py] Re: When is db.commit() unnecessary?

2011-02-12 Thread Dane
, controllers and views only you need to db.commit() if you want to commit despite possible uncaught exceptions later in the same actions. If you use DAL in a script you always need to do db.commit() On Feb 12, 4:19 pm, Dane dane.schnei...@gmail.com wrote: Hello, wondering if someone could

[web2py] Cache.disk() expiring unexpectedly

2011-02-10 Thread Dane
for duration with same result) And I'm accessing like this: cached = cache.disk(cache_key, lambda:None) if cached: return cached -Dane

[web2py] Re: Cache.disk() expiring unexpectedly

2011-02-10 Thread Dane
This is in my development environment on Windows 7 by the way. On Feb 10, 7:17 am, Dane dane.schnei...@gmail.com wrote: I'm trying to use cache.disk to cache a large TABLE object indefinitely. It seems to work fine at first, but then expires after a couple minutes. I'm setting it like

[web2py] Re: custom form without using database?

2011-02-10 Thread Dane
What about widgets? IS_IN_DB() for example. Is there a way to get those working with a regular FORM without using SQLFORM? On Feb 10, 8:22 am, Bruno Rocha rochacbr...@gmail.com wrote: I almost always use forms in this following way: *#Create a

[web2py] Re: Cache.disk() expiring unexpectedly

2011-02-10 Thread Dane
(cache_key, lambda:None, None) On Feb 10, 6:17 am, Dane dane.schnei...@gmail.com wrote: I'm trying to use cache.disk to cache a large TABLE object indefinitely. It seems to work fine at first, but then expires after a couple minutes. I'm setting it like this: cache.disk.clear

[web2py] JSON in templates

2011-02-10 Thread Dane
? This would be a very powerful feature if it worked straightforwardly. Thanks. -Dane

[web2py] Re: JSON in templates

2011-02-10 Thread Dane
On a more general note, it seems like tighter and tighter integration with the client and javascript, potentially even to the point of making it a first class citizen like db, would perhaps be one of the best directions web2py could go in my eyes. On Feb 10, 11:14 pm, Dane dane.schnei

[web2py] Re: Test if client has javascript

2011-02-09 Thread Dane
Make an ajax call on page load and set a session variable if the call gets through (session.has_js = True). On Feb 9, 3:33 am, ma...@rockiger.com rocki...@googlemail.com wrote: I am using disqus as comment system. This only works for client that have javascript enabled. I am programming a

[web2py] Bypassing tickets in development

2011-02-08 Thread Dane
. -Dane

[web2py] Re: Bypassing tickets in development

2011-02-08 Thread Dane
said he also likes the idea :D On Feb 9, 1:29 am, Dane dane.schnei...@gmail.com wrote: Would it be possible to set a flag for bypassing the ticketing system and just displaying errors on the page during development? The current system is nice for production, but it's a bit of hassle

[web2py] Re: Django vs web2py pain points

2011-02-07 Thread Dane
In my opinion, the only advantages Django has are its admin interface and the perks of a bigger and more established community, including more stable documentation, better results when you google, a big community on stack overflow, more name recognition (people won't hesitate to let you do their

[web2py] Re: Deleting a cookie

2011-02-07 Thread Dane
date to a past date. The next time a user makes a request to a page within the domain or path that set the cookie, the browser will determine that the cookie has expired and remove it. On Feb 7, 1:28 am, Dane dane.schnei...@gmail.com wrote: Hello, I've got my own user system (not using

[web2py] Re: Deleting a cookie

2011-02-07 Thread Dane
the cookie by setting the cookie's expiration date to a past date. The next time a user makes a request to a page within the domain or path that set the cookie, the browser will determine that the cookie has expired and remove it. On Feb 7, 1:28 am, Dane dane.schnei...@gmail.com wrote

[web2py] Deleting a cookie

2011-02-06 Thread Dane
Hello, I've got my own user system (not using Auth), and I'm trying to implement a Remember Me option with cookies. It's working fine when the user selects 'Yes' for remember me. Setting and detecting the cookie is no problem, but I can't find a way to delete the cookie when the user logs out or

[web2py] Re: Getting started

2011-02-06 Thread Dane
I advise beginning with the book as it's pretty easy to follow and has the most up-to-date documentation you'll find. You can do some fairly cool stuff just following the patterns in the book, but before attempting anything serious you should spend some time studying and getting comfortable with

[web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Dane
I'm doing something similar for configuration, but I'd really like to find a way to detect this setting automatically instead of setting a flag which just adds needless complexity to my git deployments. All I really need is a way to reliably check the full url of my app as the client sees it, and

[web2py] Re: Detecting test vs. production environments

2011-02-02 Thread Dane
Where does REMOTE_HOST live? On Feb 2, 10:46 am, Vinicius Assef vinicius...@gmail.com wrote: Try to check the REMOTE_HOST. If it is localhost, it is local. On Wed, Feb 2, 2011 at 6:09 AM, Dane dane.schnei...@gmail.com wrote: I'm doing something similar for configuration, but I'd

[web2py] MySQL VARCHAR lengths not being set

2011-02-02 Thread Dane
need to do or is this a bug in the MySQL adapter? Thanks. -Dane

[web2py] Re: MySQL VARCHAR lengths not being set

2011-02-02 Thread Dane
Thank you. Fix from that thread did the trick. On Feb 3, 1:02 am, Anthony abasta...@gmail.com wrote: See this recent discussion:https://groups.google.com/d/topic/web2py/tL8gnapo6fg/discussion On Thursday, February 3, 2011 12:39:45 AM UTC-5, Dane wrote: Hello, I have many fields

[web2py] Detecting test vs. production environments

2011-02-01 Thread Dane
--obviously this isn't good for a lot of reasons, not least because I also need to differentiate now between staging and production environments both on the linux server. Thanks. -Dane

[web2py] Issues with DAL and MySQL on production (works locally)

2011-01-23 Thread Dane
tables, fake for the others, etc. etc. No luck. Any ideas? -Dane

[web2py] Re: Issues with DAL and MySQL on production (works locally)

2011-01-23 Thread Dane
for the others, etc. etc. No luck. Any ideas? -Dane

[web2py] Web2py templates for HamlPY

2011-01-09 Thread Dane
Hey all, thought you might be interested to know that I just patched a project HamlPy, a library for converting a pythonic haml-like syntax to django templates/html, to work with web2py templates. It allows for a less crufty, indentation-based syntax. Because it's indentation-based, {{ pass }} is

[web2py] Get Auto-Generated Column Value on Insert or Update

2010-10-09 Thread Dane
Hello, I have a db.table.insert and a db(query).update that both generate timestamp columns. Is there a way for me to get the generated values of these without hitting the db again? Thanks.

[web2py] Re: Routes.py on GAE

2010-05-12 Thread Dane
Looks like same problem I've been having. On May 10, 5:23 pm, Chris S sanders.ch...@gmail.com wrote: Does routes.py work on GAE?  I've recently deployed an app which used the 5-line routes.py from the book for routing robots.txt and favicon.icon.  I just wanted to get rid of that 100% error

[web2py] Re: amfast rtmp example

2010-05-12 Thread Dane
Did you see the example of producer/consumer messaging on GAE? That's killer. On May 11, 12:26 am, mdipierro mdipie...@cs.depaul.edu wrote: you can already use pyqmf with web2py. I am not sure about rtmp. It is not a protocol that should be encouraged. http already provide range

[web2py] Routes.py not working when deployed to GAE

2010-05-08 Thread Dane
/crossdomain.xml gives a 404. The rest of the deployed app is working fine. Any ideas? Thanks, Dane

[web2py] Re: Routes.py not working when deployed to GAE

2010-05-08 Thread Dane
...@cs.depaul.edu wrote: Can you try? routes_in = ((/crossdomain.xml', '/init/static/crossdomain.xml'),) On May 8, 11:58 am, Dane dane.schnei...@gmail.com wrote: Hello, In my routes.py file, I have this line: routes_in = (('.*:/crossdomain.xml', '/init/static/crossdomain.xml

[web2py] Integrating GeoModel on AppEngine

2010-03-30 Thread Dane
Hey all, I need to do some geospatial queries for my current project. Unfortunately, GAE doesn't allow multiple numerical comparisons in one query, so proximity queries based on latitude/longitude columns are out. GeoModel to the rescue (http://code.google.com/p/geomodel/). By extending

[web2py] Re: Query by list of ids on GAE

2010-03-27 Thread Dane
(table_name, id, _app=u'appname') return gae.get(keys) On Mar 26, 11:50 pm, mdipierro mdipie...@cs.depaul.edu wrote: Not through the dal but if you find out how to do it using GAE API, post an example here and we can look into implementing it. Massimo On 26 Mar, 18:31, Dane

[web2py] Re: Query by list of ids on GAE

2010-03-27 Thread Dane
Also the result objects use some sort of wrapper class, similar to the web2py row object. Properties are accessed by dot syntax. Id is accessed by result.key().id() On Mar 27, 5:31 am, Dane dane.schnei...@gmail.com wrote: Hooray, I can contribute something! It's just a matter of converting

[web2py] How to best design a date/geographic proximity query on GAE?

2010-03-26 Thread Dane
' event_ids 6.) Assemble many-to-manys 7.) Return to client Thoughts on this approach? Many thanks for reading and any advice you can give. -Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com

[web2py] Query by list of ids on GAE

2010-03-26 Thread Dane
Can this be done through the DAL? I see there is a get() method on google.appengine.ext.db that can take multiple keys, but that syntax confuses me. -Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web

[web2py] Re: Where do you use web2py?

2010-03-15 Thread Dane
I'm building an app for finding ultimate frisbee tournaments, leagues, and pickup games by date, geographical proximity, and other criteria on GAE with a Flex front end. Hope to eventually expand to team, league, and tournament management with online payments, and add a play diagramming tool and

[web2py] Adding script to the head when extending layout.html

2010-02-04 Thread Dane
with web2py that I've found myself missing a django feature--blocks make this trivial. Ideas? Thanks, Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group

[web2py] Re: Adding script to the head when extending layout.html

2010-02-04 Thread Dane
Thanks, I'll check it out. On Feb 4, 9:45 am, DenesL denes1...@yahoo.ca wrote: See section 5.4 in the book. It explains page layout including blocks. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py] Re: Changing redirect for @auth.requires_login()

2010-02-03 Thread Dane
: auth.settings.login_next = URL(...) On Feb 3, 12:03 am, Dane dane.schnei...@gmail.com wrote: Hey all, I've been using the @auth.requires_login() decorator and I love the simplicity. It was also pretty easily to hook it into google account authentication after a bit of searching on this group. My

[web2py] Re: Changing redirect for @auth.requires_login()

2010-02-03 Thread Dane
compte...@gmail.com wrote: db.py On Wed, Feb 3, 2010 at 11:12 AM, Dane dane.schnei...@gmail.com wrote: Thanks, and where would I set this to get a redirect to the function being accessed? In the body of the controller function itself? I'm new to python and decorators, but I assumed nothing

[web2py] Re: Changing redirect for @auth.requires_login()

2010-02-03 Thread Dane
compte...@gmail.com wrote: db.py On Wed, Feb 3, 2010 at 11:12 AM, Dane dane.schnei...@gmail.com wrote: Thanks, and where would I set this to get a redirect to the function being accessed? In the body of the controller function itself? I'm new to python and decorators, but I assumed nothing

[web2py] Re: Changing redirect for @auth.requires_login()

2010-02-03 Thread Dane
On Wed, Feb 3, 2010 at 12:08 PM, Dane dane.schnei...@gmail.com wrote: Thanks, but I still don't understand.. if I set it in db.py, won't that permanently send all my login redirects to the same function? But I want the redirect to change depending on the part of the site my users try

[web2py] Changing redirect for @auth.requires_login()

2010-02-02 Thread Dane
them to be redirected to the decorated controller function they initially tried to access. Any ideas? Thanks. -Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from

[web2py] Using XML templates with AMF

2010-01-29 Thread Dane
through an amf function? Thanks! -Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread Dane
Also note I'm running on GAE, in case that makes a difference. On Jan 29, 6:44 pm, Dane dane.schnei...@gmail.com wrote: Hello, I'm building a web2py backend for a Flex site, and I would like to send some of my data as XML since it's hierarchical in nature and AS3 has great xml manipulation

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread Dane
, mdipierro mdipie...@cs.depaul.edu wrote: Did you look into web2py services? @service.amfrpc3('domain') def somefunction(a,b,c):       return a+b+c On Jan 29, 5:44 pm, Dane dane.schnei...@gmail.com wrote: Hello, I'm building a web2py backend for a Flex site, and I would like to send

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread Dane
Great, nice and simple. Thanks. On Jan 29, 9:52 pm, Thadeus Burgess thade...@thadeusb.com wrote: @service.amfrpc3('domain') def somefunction(param):    return response.render(filename='mytemplate.xml', context=dict(items)) -Thadeus On Fri, Jan 29, 2010 at 8:28 PM, Dane dane.schnei

[web2py] Validating Remote Data (from Flex)

2010-01-13 Thread Dane
wondering if there's a DRY method I could use instead. Thanks! -Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr

[web2py] Re: Validating Remote Data (from Flex)

2010-01-13 Thread Dane
Thank you. That worked like a charm. On Jan 13, 1:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: Try form.accepts(flexItem,formname=None) On Jan 13, 12:06 pm, Dane dane.schnei...@gmail.com wrote: Hello, I've been learning Web2Py and liking it a lot. Thanks for your hard work Mossimo