Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Yarin Kessler
with an older module and leaving it at that. On Mon, Apr 29, 2013 at 11:49 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Is this only with web2py? What if you import newrelic followed by httplib2 > in from shell or in wsgi before importing web2py? > > > On Mo

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Yarin Kessler
Cliff- No, we are not using virtualenv On Mon, Apr 29, 2013 at 10:23 PM, Cliff Kachinske wrote: > Are you using a virtualenv? > > Maybe you having a version clash between libs. > > -- > > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users"

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Yarin
M UTC-4, Ricardo Pedroso wrote: > > On Tue, Apr 30, 2013 at 12:41 AM, Yarin > > wrote: > > Ricardo- yes, importing httplib2 throws the same error, even without > > importing oauth. > > > > We've noticed that the problem does not arise with the ne

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Yarin
27;t cause error when httplib2 imported later newrelic.agent.initialize('/opt/web-apps/web2py/newrelic.ini')# DOES cause error On Monday, April 29, 2013 5:00:37 PM UTC-4, Ricardo Pedroso wrote: > > On Mon, Apr 29, 2013 at 9:30 PM, Yarin Kessler > > > wrote: > &g

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Yarin Kessler
> On Monday, April 29, 2013 9:45:21 PM UTC+2, Yarin wrote: >> >> We're trying to integrate New Relic with web2py. We installed it per >> their instructions for web2py running on >> mod_wsgi<https://newrelic.com/docs/python/python-agent-and-web2py

[web2py] New Relic module causing import error

2013-04-29 Thread Yarin
We're trying to integrate New Relic with web2py. We installed it per their instructions for web2py running on mod_wsgi, adding the following lines in wsgihandler.py: import newrelic.agent newrelic.agent.initialize('/opt/web-apps/web2py/

[web2py] Upgrade from 2.2.1 to 2.4.6 breaks requests library??

2013-04-22 Thread Yarin
Our application makes use of the Python requestslibrary to post http requests. As soon as we upgraded from 2.2.1 to 2.4.6 we started getting errors. Trace: File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/request

[web2py] Re: Multiple session objects being created for the same client IP

2013-04-17 Thread Yarin
even when data was not stored/changed. Therefore is the cookie was > not returned it would start making new session files/records. > > On Wednesday, 17 April 2013 08:26:30 UTC-5, Yarin wrote: >> >> 2.2.1 >> >> On Wednesday, April 17, 2013 9:16:41 AM UTC-4, Massimo Di

[web2py] Re: Multiple session objects being created for the same client IP

2013-04-17 Thread Yarin
of requests that don't send cookies? > > On Wednesday, April 17, 2013 9:08:48 AM UTC-4, Yarin wrote: >> >> (This question stems from an issue first brought up >> here<https://groups.google.com/forum/?fromgroups=#!topic/web2py/iAlrv6yaHWk> >> ) >> >

[web2py] Re: Multiple session objects being created for the same client IP

2013-04-17 Thread Yarin
2.2.1 On Wednesday, April 17, 2013 9:16:41 AM UTC-4, Massimo Di Pierro wrote: > > Which web2py version? > > On Wednesday, 17 April 2013 08:08:48 UTC-5, Yarin wrote: >> >> (This question stems from an issue first brought up >> here<https://groups.google.com

[web2py] Re: "MySQL server has gone away" errors happening more and more with db-based sessions?

2013-04-17 Thread Yarin
Yes- I've documented this issue in a new question - please see: https://groups.google.com/d/msg/web2py/A7P4HoST-Lg/NZ3kmTTwVG0J On Wednesday, April 17, 2013 3:08:38 AM UTC-4, Niphlod wrote: > > everyone with a different unique_key ? > > On Wednesday, April 17, 2013 12:43:3

[web2py] Multiple session objects being created for the same client IP

2013-04-17 Thread Yarin
(This question stems from an issue first brought up here ) We store user sessions in the DB using the web2py_session_{app} table. Inspecting the table, we've noticed a strange pattern happening over and over again: Many of

[web2py] Re: "MySQL server has gone away" errors happening more and more with db-based sessions?

2013-04-16 Thread Yarin
This makes no sense. I did not log into my app from 13 different devices today. Why would a single user connecting from a single device have so many session records?? On Tuesday, April 16, 2013 6:21:56 PM UTC-4, Yarin wrote: > > Largest session_data fields were 12 KiB > > On Tu

[web2py] Re: "MySQL server has gone away" errors happening more and more with db-based sessions?

2013-04-16 Thread Yarin
Largest session_data fields were 12 KiB On Tuesday, April 16, 2013 5:49:45 PM UTC-4, Niphlod wrote: > > either than a large blob/object in the session I really can't see how an > update so simple (syntax-wise) takes 50 seconds (when the minimum reported > time is 0.8ms) on mysql end. > edit: did

[web2py] Re: "MySQL server has gone away" errors happening more and more with db-based sessions?

2013-04-16 Thread Yarin
s the session . can you confirm that this would be >> the case (i.e. your app does a lot of session.whatever changes) ? >> >> On Tuesday, April 16, 2013 11:09:50 PM UTC+2, Yarin wrote: >>> >>> We've had our production application running problem free for

[web2py] Re: User specific sessions

2013-02-26 Thread Yarin
:34:34 PM UTC-5, Anthony wrote: > > You could use auth.settings.login_onaccept and > auth.settings.logout_onlogout functions to clear the items from session > that you don't want to persist. > > On Tuesday, February 26, 2013 8:59:46 PM UTC-5, Yarin wrote: >> >&

[web2py] User specific sessions

2013-02-26 Thread Yarin
Normally when storing variables within the session object, they will persist throughout the entire browser session lifetime, regardless of whether a user is logged in. What's the best way to implement user-specific session storage- i.e. variables I want stored in session for as long as a partic

Re: [web2py] Re: Scheduler: help us test it while learning

2013-02-25 Thread Yarin Kessler
Sweet- looking forward to using the API. Schema changes a pain but done for right reasons. Can you give more explanation of the immediate=True param? As for patterns- a basic event calendar would be good demo Thanks for the great work Niphlod On Sat, Feb 23, 2013 at 1:21 PM, Niphlod wrote: > r

[web2py] Re: Purpose of creating group for each user?

2013-02-14 Thread Yarin
e in web2py for auth permissions. Turns > out most users (including me) do not use them and prefer to set simpler ad > hoc permission rules. In case there is no problem in disabling user groups. > > On Friday, 1 February 2013 15:42:49 UTC-6, Yarin wrote: >> >> The >> documenta

[web2py] Re: Error when trying to access membership table: 'Row' object has no

2013-02-13 Thread Yarin
? > are you using auth.define_tables(username=None) ? > is there some "non-standard" db connection / auth tables definitions ? > > On Wednesday, February 13, 2013 9:59:57 PM UTC+1, Yarin wrote: >> >> I'm getting a >> 'Row' object has no attribute

[web2py] Error when trying to access membership table: 'Row' object has no

2013-02-13 Thread Yarin
I'm getting a 'Row' object has no attribute 'username' error when I try to access the membership table in the db admin screens. This is happening on a project that *used* to use username as the login field but does not anymore (*username* column is no longer part of the auth_user table). Any

Re: [web2py] Re: Why aren't email/username fields unique?

2013-02-10 Thread Yarin Kessler
y a user friendly error message on the form rather than > causing a database operational error and a 500 response. > > Anthony > > > On Sunday, February 10, 2013 11:11:39 AM UTC-5, Yarin wrote: >> >> Why are email/username fields not created with (unique=True) by default?

[web2py] Why aren't email/username fields unique?

2013-02-10 Thread Yarin
Why are email/username fields not created with (unique=True) by default? Since these fields are use to identify users, non-unique values would clearly break auth. (Side note: where is the code for defining the default auth table fields located?- can't find it anywhere) -- --- You received t

[web2py] Re: Purpose of creating group for each user?

2013-02-01 Thread Yarin
ups. > > On Friday, 1 February 2013 15:42:49 UTC-6, Yarin wrote: >> >> The >> documentation<http://web2py.com/books/default/chapter/29/09#Authorization>states: >> >> "The creation of the group can be disabled with >> >> auth.settings.create_user_g

[web2py] Purpose of creating group for each user?

2013-02-01 Thread Yarin
The documentationstates: "The creation of the group can be disabled with auth.settings.create_user_groups = None although we do not suggest doing so." Massimo also says here

Re: [web2py] Re: calendar.js incompatible with moment.js

2012-12-24 Thread Yarin
xed only in trunk. If you experienced problems with dates, > upgrade calendar.js. > > Massimo > > On Sunday, 23 December 2012 15:57:27 UTC-6, Yarin wrote: >> >> 10 4 - Submitted issue to moment.js: >> https://github.com/timrwood/moment/issues/556 >> >> On

Re: [web2py] Re: calendar.js incompatible with moment.js

2012-12-23 Thread Yarin
nd therefore they both put and share functions in the global namespace. > > On Sunday, 23 December 2012 00:26:15 UTC-6, Yarin wrote: >> >> Not errors, just incorrect results- fails to parse dates, and returns >> isValid() false when testing valid date strings- see my bug rep

Re: [web2py] Re: calendar.js incompatible with moment.js

2012-12-22 Thread Yarin Kessler
he chrome console? > > > On Saturday, 22 December 2012 20:41:43 UTC-6, Yarin wrote: >> >> We've found that the popular date library moment.js fails on date parsing >> when used alongside the calendar.js file included by default with web2py >> projects. >> >&g

[web2py] calendar.js incompatible with moment.js

2012-12-22 Thread Yarin
We've found that the popular date library moment.js fails on date parsing when used alongside the calendar.js file included by default with web2py projects. I've submitted a bug report: http://code.google.com/p/web2py/issues/detail?id=1243 We removed calendar.js from our projects, but I'm uncle

[web2py] Changing subject line of email verification email

2012-10-17 Thread Yarin
I'd like to change the subject line of the email verification sent on registration- is that possible? --

[web2py] Re: inserting/updating NULL values via db admin screens

2012-10-16 Thread Yarin
> On Monday, 15 October 2012 19:50:31 UTC-5, Yarin wrote: >> >> Is it possible to work with NULL values via the DB admin screens? >> >> I've got a bunch of string fields that should default to NULL, but >> everytime I try to insert a record through the admi

[web2py] inserting/updating NULL values via db admin screens

2012-10-15 Thread Yarin
Is it possible to work with NULL values via the DB admin screens? I've got a bunch of string fields that should default to NULL, but everytime I try to insert a record through the admin screens they wind up as empty strings. Worse, existing records that have NULL values get those values replac

[web2py] Re: Problem with securing sessions

2012-10-04 Thread Yarin
Massimo- quick fix: *session.forget()* must be *current.session.forget()*, otherwise throws error On Thursday, October 4, 2012 8:11:23 AM UTC-4, Yarin wrote: > > Great- I've updated/simplified my other recommendations on > SSL<https://groups.google.com/d/msg/web2py/me1e5d6Dud

Re: [web2py] Re: Improving SSL Support

2012-10-04 Thread Yarin Kessler
Awesome thanks Massimo- will test tonight On Thu, Oct 4, 2012 at 4:13 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > OK. check trunk. Auth(db,secure=True). > > > On Thursday, 4 October 2012 13:01:51 UTC-5, Yarin wrote: >> >> Yes exactly >> >

[web2py] Re: Improving SSL Support

2012-10-04 Thread Yarin
sgi_url_scheme in ['https', 'HTTPS'] or env.https=='on' or > request.env.http_x_forwarded_proto in ['https', 'HTTPS'] > > address the first issue? > > Massimo > > On Thursday, 4 October 2012 07:05:17 UTC-5, Yarin wrote: >&g

[web2py] Re: Problem with securing sessions

2012-10-04 Thread Yarin
dnesday, 3 October 2012 10:51:40 UTC-5, Yarin wrote: >> >> Niphlod- Thanks, you're correct- that's exactly what's happening. >> >> We should then update the *requires_https()* implementation: >> >> *gluon/globals.py:* >> def requires

[web2py] Re: Improving SSL Support

2012-10-04 Thread Yarin
uth.secure = True convenience setting, which would call requires_https() while the user is logged in, and on all login/registration methods. I'll update the ticket On Friday, September 21, 2012 2:26:36 PM UTC-4, Yarin wrote: > > Done http://code.google.com/p/web2py/issues/detail?id=1

[web2py] Re: Problem with securing sessions

2012-10-03 Thread Yarin
Niphlod- Thanks, you're correct- that's exactly what's happening. We should then update the *requires_https()* implementation: *gluon/globals.py:* def requires_https(self): """ If request comes in over HTTP, redirect it to HTTPS and secure the session. """ if not global_settin

[web2py] Re: Problem with securing sessions

2012-10-01 Thread Yarin
to send it back > (but I'm not sure how them behave in "mixed" mode, i.e. some requests to > http and some to https.) > I'm going to test it. > > On Monday, October 1, 2012 7:07:17 PM UTC+2, Yarin wrote: >> >> Forget 2 its irrelevant- I'm only

[web2py] Re: Problem with securing sessions

2012-10-01 Thread Yarin
of behaviour is more a browser's one than a web2py one, but > perhaps something can be adjusted. > Are you saying that on step 3) browser sends no cookie back to web2py ? > > ps: are you sure twitter uses cookies with "Secure;" ? > > Il giorno lunedì 1 ottobre 2

[web2py] Problem with securing sessions

2012-10-01 Thread Yarin
I'm bumping up against a problem in the session.secure() implementation. If a session is secured, and then the app is hit with an http request, the session is blown out. This happens even if the session isn't modified by the http request and even if it is immediately redirected to https. The co

[web2py] Re: web2py 2.0 DAL no longer usable for mysql stored procedures

2012-09-27 Thread Yarin
Done: http://code.google.com/p/web2py/issues/detail?id=1037 On Thursday, September 27, 2012 4:33:37 PM UTC-4, Massimo Di Pierro wrote: > > Is this issue still open? If so, can you open a ticket about it? > > Massimo > > On Monday, 24 September 2012 14:38:14 UTC-5, Yarin wrote:

[web2py] Re: web2py 2.0 DAL no longer usable for mysql stored procedures

2012-09-24 Thread Yarin
x27;'' import contrib.pymysql as pymysql sql = """CALL TestSproc();""" conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd= 'root', db='test') cur = conn.cursor(pymysql.cursors.DictCursor)

[web2py] web2py 2.0 DAL no longer usable for mysql stored procedures

2012-09-23 Thread Yarin
After upgrading to web2py 2.0, we can no longer use the DAL or mysql adapters to make MySQL stored procedure calls. In web2py 1.x I had reportedhow mysql stored procedures weren't working for us in certain circumstances- however

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
Done http://code.google.com/p/web2py/issues/detail?id=1023 On Friday, September 21, 2012 2:05:41 PM UTC-4, Massimo Di Pierro wrote: > > Yarin, please open an issue on google code as suggested enhancement so ti > does not get lost. Also feel free to move the discussion on web2py >

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
alue from auth # (hack - look at end of login() function in tools.py. This belongs in Auth itself.): login_next_path = auth.next or auth.settings.login_next # Build an absolute, HTTP url from it: login_next_url = URL(scheme='http',c='

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
t; > Yes but how do you detect if is_proxied reliably? > > On Friday, 21 September 2012 10:28:26 UTC-5, Yarin wrote: >> >> FYI this is the enforcer function we wrote for our implementation- >> basically a rewrite of request.requires_https(): >> >> def force_https(

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
xit: if trust_proxy and request.env.http_x_forwarded_proto in ['https', 'HTTPS' ]: return # Redirect to HTTPS: redirect(URL(scheme='https', args=request.args, vars=request.vars)) On Friday, September 21, 2012 9:53:36 AM UTC-4, Yarin w

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
t *all* the traffic is proxied. On Friday, September 21, 2012 8:40:35 AM UTC-4, Massimo Di Pierro wrote: > > Can you suggest a way to detect that? > > On Thursday, 20 September 2012 13:56:55 UTC-5, Yarin wrote: >> >> @Massimo - that'd be great. >> >> One m

[web2py] Re: Improving SSL Support

2012-09-20 Thread Yarin
> hosting facility in the world. speed vs security just to not leak > password (but leak cookie) is not a dealbreaker in 2012 for us (at least > until python shared hosting improves the coverage). An addendum to the > 37signals link you posted before: is dated 2008! Even IE8

[web2py] Re: Improving SSL Support

2012-09-20 Thread Yarin
is. > > I think we should have auth.settings.force_ssl_login > and auth.settings.force_ssl_login. > We could add secure=True option to existing requires validators. > > This should not be enforced from localhost. > > > On Thursday, 20 September 2012 09:07:14 UTC-5, Yarin wrote: >&

Re: [web2py] Re: Monitoring scheduler with supervisord

2012-09-20 Thread Yarin Kessler
You the man On Thu, Sep 20, 2012 at 12:13 PM, Niphlod wrote: > no free time at home to test on every platform, but the code part is done. > in a few days. > > > On Thursday, September 20, 2012 6:09:59 PM UTC+2, Yarin wrote: >> >> Any luck with this Simone? >> &g

[web2py] Re: Monitoring scheduler with supervisord

2012-09-20 Thread Yarin
Any luck with this Simone? On Friday, September 14, 2012 12:39:19 PM UTC-4, Niphlod wrote: > > ok, give me a few hours, I need to get home first :P > --

[web2py] Re: Improving SSL Support

2012-09-20 Thread Yarin
the fact that SSL certificate allows your site to be > "trustworthy" (user A knows that the site at http*S*://example.com is > managed by Yarin). > If you are trustworthy for only *some *of the urls, you publish something > at http*S*://example.com and something at http://e

[web2py] Improving SSL Support

2012-09-20 Thread Yarin
A proposal for improving SSL support in web2py For authenticated web applications, there are two "grades" of SSL implementions: Forcing SSL on login, vs forcing SSL on the entire authenticated session. In the first case, HTTPS is forced on login/registration, but reverts back to HTTP upon aut

[web2py] Re: Monitoring scheduler with supervisord

2012-09-14 Thread Yarin
Sure that works for me On Friday, September 14, 2012 12:25:02 PM UTC-4, Niphlod wrote: > > well, maybe we can support not spawning if -K is followed by one app only. > Thoughts ? > > On Friday, September 14, 2012 6:16:08 PM UTC+2, Yarin wrote: >> >> Right, I was just v

[web2py] Re: Monitoring scheduler with supervisord

2012-09-14 Thread Yarin
rkers started with one command through web2py. > If you want to manage the workers through supervisord with the standard > config you have to use this script. > > On Friday, September 14, 2012 5:41:47 PM UTC+2, Yarin wrote: >> >> @Niphlod- I was hoping this "embedded mod

[web2py] Re: web2py book on github

2012-09-14 Thread Yarin
@Alan- delete the html file completely from the static_chaps folder- that's what worked for me On Friday, September 14, 2012 11:48:53 AM UTC-4, Alan Etkin wrote: > > there's no "development app". The book app is the one in production :p . >> It caches the output of markmin pages to avoid cpu usag

[web2py] Re: Monitoring scheduler with supervisord

2012-09-14 Thread Yarin
> > sys.path = [path]+[p for p in sys.path if not p==path] > > from gluon.shell import run > from gluon import main > import logging > > logging.getLogger().setLevel(logging.INFO) > > if __name__ == '__main__': > code = "from gluon import

[web2py] Re: web2py book on github

2012-09-13 Thread Yarin
based. it is file based. The syntax is markmin as documented in the > bok itself. > > Massimo > > > > > -- >From 0f2eef084252b641eae8e5b671ad06c1b715f0ed Mon Sep 17 00:00:00 2001 From: Yarin Kessler Date: Thu, 13 Sep 2012 17:10:51 -0400 Subject: [PATCH] Squ

Re: [web2py] Filtering on NULL values in DAL query

2012-09-05 Thread Yarin
Thanks. Massimo we need this in the docs. On Wednesday, September 5, 2012 2:38:26 PM UTC-4, rochacbruno wrote: > > On Wed, Sep 5, 2012 at 3:12 PM, Marin Pranjić > > > wrote: > >> it is db.table.field != None >> >> operator ~ is used for ORDER BY and it maps to DESC. > > > Yes, my bad, you are ri

[web2py] Filtering on NULL values in DAL query

2012-09-05 Thread Yarin
Is this documented anywhere? --

[web2py] Re: Async processing options

2012-08-31 Thread Yarin
real problem is that if the function - myprohibitedfunction - takes a long > time, the webserver can "see" it as a blocked thread/process and terminate > it abruptly. That's the main reason behind the existence of all various > tasks schedulers (and cron scripts). >

[web2py] Async processing options

2012-08-31 Thread Yarin
I have an app where the user uploads a large photo using web2py's normal upload mechanism. After that, the program needs to do some image manipulation, upload it to cloudfiles, and update the db when it's complete. But I don't want to require the user to wait around for all that to finish befor

Re: [web2py] Re: Versioning static files or other options for browser cache reloading

2012-08-30 Thread Yarin
. > Incidentally, I had a different scaffolding app for 1.99.7 that didn't use > response.include_files(), so that's because it was working for me in > 1.99.7. Sorry. > > On Thursday, August 30, 2012 10:55:10 PM UTC+2, Yarin wrote: >> >> Niphlod- here you

Re: [web2py] Re: Versioning static files or other options for browser cache reloading

2012-08-30 Thread Yarin
he path without using > the URL function it should be ok. > > Please check also that you have response.optimize_css & co. disabled: they > somewhat cache around your files for some time. That implementation is > buggy in my POV. > > On Thursday, August 30, 2012 9:38:51 PM

Re: [web2py] Re: Versioning static files or other options for browser cache reloading

2012-08-30 Thread Yarin
So it seems like response.files has a problem with appended vars? Even when I spell out the URL entirely, it never gets output: response.files.append("/css/main.css?v=123") # Doesn't get output response.files.append("/css/main.css") # Does get output Assuming this is why rocha used html. Can we

Re: [web2py] Re: Accessing auth_user the first time a user logs in

2012-08-30 Thread Yarin Kessler
ed) you can also hook into the on_login and check if > auth_event holds a record of the user "logged in". > > > On Thursday, August 30, 2012 6:41:27 PM UTC+2, Yarin wrote: >> >> We have to perform a series of checks and updates on an auth_user record >> as soon as

[web2py] Versioning static files or other options for browser cache reloading

2012-08-30 Thread Yarin
I'm trying to apply a version number to my CSS files as a way to force browsers to load the latest version, but the following examples never get outputted even though they create valid URLs: response.files.append(URL('static','css/main.css', vars=dict(v='1208301'))) or response.files.append(URL(

[web2py] Accessing auth_user the first time a user logs in

2012-08-30 Thread Yarin
We have to perform a series of checks and updates on an auth_user record as soon as their registration has been verified. Previously, we had not required verification and had done everything in register_onaccept: def first_thing(form): """ Performs a series of checks for newly registered use

[web2py] Re: web2py 2.0.2 is out

2012-08-30 Thread Yarin
Congratulations and many thanks to Massimo and all contributors - the best framework keeps getting better --

Re: [web2py] Re: Avoiding loading models for the public portion of a site

2012-08-29 Thread Yarin
need for that specific >>> controller. >>> >>> However from your last statement you said you wish to use web2py to >>> determine if someone is logged in, in that case you will require at least >>> the auth tables loaded. >>> >>> >>> On T

[web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
ll, best to serve the static > site direct through Nginx/Apache. Otherwise, as you note, conditional > models may not work so waiting for "lazy tables" might be best (should be > any day now in 2.0). > > On Tuesday, August 28, 2012 8:55:35 PM UTC-7, Yarin wrote: >&g

Re: [web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
7;t see how that can be a solution. Thanks On Tuesday, August 28, 2012 11:56:27 PM UTC-4, Bruce Wade wrote: > > Hi Yarin, > > Using conditional models will allow you to not load any models when you > don't need them. Your idea of moving the brochure part of the site so it > d

[web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
il"). > > > On Tuesday, August 28, 2012 6:52:12 PM UTC-7, Yarin wrote: >> >> A basic architecture question: >> >> We're putting together a typical web app where non-logged in users reach >> a public-facing basic 'brochure' site, and then log i

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
8, 2012 11:31:22 PM UTC-4, Massimo Di Pierro wrote: > > oops. Do not have a solution other than use two apps or move all public > controllers under the same file or use lazy_tables. > > On Tuesday, 28 August 2012 22:28:09 UTC-5, Yarin wrote: >> >> But my app has 13 private co

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
; > models/private/db.py > > They will not load when you call actions in public. > > Massimo > > On Tuesday, 28 August 2012 22:19:03 UTC-5, Yarin wrote: >> >> And now I'm also not sure how to go about separating the public site into >> a separate applicati

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
st 28, 2012 11:09:43 PM UTC-4, Yarin wrote: > > Thanks guys but don't understand how conditional models could be applied > here. I thought conditional models were models specific to a single > controller/function? My app has many controllers that use the models, and > only a f

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
lic.html > > - You can use lazy_tables and not worry about it. > > > On Tue, Aug 28, 2012 at 10:52 PM, Yarin >wrote: > >> A basic architecture question: >> >> We're putting together a typical web app where non-logged in users reach >> a public-facing b

[web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
A basic architecture question: We're putting together a typical web app where non-logged in users reach a public-facing basic 'brochure' site, and then log in to reach the 'real' application. With such a setup, it makes no sense to be loading models for the public portion of the site, as it's j

[web2py] Re: DAL calls fail after first stored procedure call

2012-08-27 Thread Yarin
t; > Anthony > > On Monday, August 27, 2012 4:37:42 PM UTC-4, Yarin wrote: >> >> This is an issue with pymsql: >> http://code.google.com/p/pymysql/issues/detail?id=72, >> https://github.com/petehunt/PyMySQL/blob/master/pymysql/cursors.py >> >> Running ag

[web2py] Re: DAL calls fail after first stored procedure call

2012-08-27 Thread Yarin
ve > to monkeypatch it for security. > > Massimo > > On Monday, 27 August 2012 14:20:00 UTC-5, Yarin wrote: >> >> This is MySQL using the default driver, whatever that is. I'm going to >> test on other drivers/dbs and will report back.. >> >> On Mon

[web2py] Re: DAL calls fail after first stored procedure call

2012-08-27 Thread Yarin
py does not do another else but pass your SQL to the driver and > fetch responses. > > Is this SQLITE? In any case, I suggest you try the native driver APIs. > > On Monday, 27 August 2012 09:37:45 UTC-5, Yarin wrote: >> >> Once we call a stored procedure through

[web2py] Re: DAL calls fail after first stored procedure call

2012-08-27 Thread Yarin
Villas- Thanks but no it doesn't- tried that.. On Monday, August 27, 2012 1:53:32 PM UTC-4, villas wrote: > > Just a thought - does db.commit() help? > Rgds, D > > On Monday, August 27, 2012 3:37:45 PM UTC+1, Yarin wrote: >> >> Once we call a stored procedure thr

[web2py] Re: DAL calls fail after first stored procedure call

2012-08-27 Thread Yarin
Pretty desperate on this one- brought everything to a screeching halt. We need to be able to call more than one stored procedure per request. Anybody got any ideas? On Monday, August 27, 2012 10:37:45 AM UTC-4, Yarin wrote: > > Once I call a stored procedure through the DAL, any subs

[web2py] DAL calls fail after first stored procedure call

2012-08-27 Thread Yarin
Once I call a stored procedure through the DAL, any subsequent calls are returning None results. *Basic stored procedure:* BEGIN SELECT * FROM people; END *Works:* def test(): sql = "CALL GetPeople();" sproc_results = db_test.executesql(sql) return str(sproc_results) *Works:* def test

[web2py] Re: DAL not returning results on temp table query

2012-08-27 Thread Yarin
; Anyway splitting those lines in multiple db.executesql()s is working >> great. >> >> On Saturday, August 25, 2012 5:58:40 PM UTC+2, Yarin wrote: >>> >>> I'm trying to execute some SQL from the DAL that relies on a temp table: >>> >>> C

Re: [web2py] Re: Defining stored procedures

2012-08-26 Thread Yarin Kessler
+1 On Sun, Aug 26, 2012 at 8:55 PM, Andrew wrote: > Thanks Anthony, Wasn't aware of that one, and it looks quite useful. > > > > On Monday, August 27, 2012 6:29:55 AM UTC+12, Anthony wrote: >> >> Often wondered about this too. You would also have to call them with >>> executesql. >>> So shoul

Re: [web2py] Re: Defining stored procedures

2012-08-25 Thread Yarin Kessler
the query. > > Anthony > > > On Saturday, August 25, 2012 5:56:10 PM UTC-4, Yarin wrote: >> >> I'm assuming there's probably no support for defining stored procedures >> using DAL functions. Instead I was going to try to create them in raw sql >> using

[web2py] Defining stored procedures

2012-08-25 Thread Yarin
I'm assuming there's probably no support for defining stored procedures using DAL functions. Instead I was going to try to create them in raw sql using executesql whenever migrate was turned on. Just wondering if this is the best technique, or someone has another idea --

Re: [web2py] Re: DAL not returning results on temp table query

2012-08-25 Thread Yarin Kessler
s the last ) >> in your executesql() wrapped string you'll be fine. If some of your lines >> returns results, then the driver doesn't know what set to actually return. >> Anyway splitting those lines in multiple db.executesql()s is working >> great. >> >

[web2py] Re: DAL not returning results on temp table query

2012-08-25 Thread Yarin
ou have only one statement (and it's the last ) > in your executesql() wrapped string you'll be fine. If some of your lines > returns results, then the driver doesn't know what set to actually return. > Anyway splitting those lines in multiple db.executesql()s is working

[web2py] DAL not returning results on temp table query

2012-08-25 Thread Yarin
I'm trying to execute some SQL from the DAL that relies on a temp table: CREATE TEMPORARY TABLE tmp LIKE people; INSERT INTO tmp SELECT * FROM people; INSERT INTO tmp SELECT * FROM people; SELECT * FROM tmp; This code works fine in a SQL panel, but fails when used in the DAL: def test():

[web2py] Re: Clearing session for single user

2012-08-21 Thread Yarin
> a) sessions are created also for not registered users > b) one registered user can have multiple sessions (one in chrome, the > other in firefox), even in multiple devices (desktop, nettop, tablet, cell > phone, etc) and they are considered (rightfully) valid. > > On Tuesday, Au

Re: [web2py] Clearing session for single user

2012-08-21 Thread Yarin
out of the > box if you opt for it), you can delete entry of user from it to disconnect > him instantly, without affecting other users. > this table has a name like : web2py_session_YourApplicationName > > Regards > > On Tue, Aug 21, 2012 at 6:22 PM, Yarin >wrote: > >

[web2py] Clearing session for single user

2012-08-21 Thread Yarin
Is it possible to clear a session for a single user? Currently, if we need to block user access, we must delete the user record or set registration key = "blocked", and then clear session for the entire site. Is there a better way? --

Re: [web2py] Re: Scheduler: help us test it while learning

2012-08-20 Thread Yarin
server doesn't > reply). The mail should be sent anyway, possibly as soon as the email > server is available again here's where the retry_failed comes handy. Of > course if it fails e.g. for 10 times it's better to stop trying and inspect > the email server :P >

Re: [web2py] Rendering views manually

2012-08-20 Thread Yarin
wow im an idiot.. thanks On Monday, August 20, 2012 5:27:59 PM UTC-4, ian douglas wrote: > > > On 08/20/2012 02:17 PM, Yarin wrote: > > > def index(): > > global my_var > my_var = "something" > content = '''My Page > {{=my_va

[web2py] Rendering views manually

2012-08-20 Thread Yarin
Im trying to follow the example given herefor manually rendering views. I have this code in my controller: def index(): global my_var my_var = "something" content = '''My Page {{=my_var}} {{=request.raw_arg

Re: [web2py] Clarification on using classes in models

2012-08-20 Thread Yarin
clarified in the same > thread as the original link Yarin posted. > > Anthony > > On Monday, August 20, 2012 3:12:57 PM UTC-4, rochacbruno wrote: >> >> You can define classes on models or controllers, the only caveat is that >> you can never import that classes in to

  1   2   3   >