Re: [web2py] Re: Can website visitors update my languages files?

2016-01-14 Thread Michael Wolfe
OK. So the framework is updating the languages files in my app based on translations in other apps (e.g., admin and appadmin)? But only if a website visitor requests a page in that language, correct? So I'm imagining the following algorithm: - website visitor with a 'pl' language preference visi

Re: [web2py] Re: Can website visitors update my languages files?

2016-01-14 Thread Michael Wolfe
That makes sense. I guess my question is where do the translations themselves come from? For example, the following two lines were *added* to the Russian translation file: '%s rows deleted': '%s строк удалено', '%s rows updated': '%s строк изменено', I certainly did not add in the Cyrillic char

[web2py] fw:

2013-07-22 Thread Michael Wolfe
http://mrcarinsurance.co.za/bbemolh/ljpnjralx Michael Wolfe 7/23/2013 2:16:39 AM -- --- 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

Re: [web2py] Re: Syntax to INNER JOIN table to itself

2010-12-21 Thread Michael Wolfe
,left=SchoolDistrict.on(SchoolDistrict. > \ > id==District.district_id)) > print rows > > Makes this sql: > > SELECT district.description, school_district.description FROM > district LEFT JOIN district AS school_district ON (school_district.id > = district.district_id) WHER

Re: [web2py] Re: Syntax to INNER JOIN table to itself

2010-12-21 Thread Michael Wolfe
I'm actually running off of trunk already (latest changeset is 1410 (feb4ddb2d659), committed 14 hours ago). The book example only demonstrates using with_alias in LEFT JOINs. Is this a limitation? If it makes any difference, I am running dal.py as a standalone module for a non-web2py project.

Re: [web2py] Re: Remove link in MENU for current url

2010-10-30 Thread Michael Wolfe
Completely optional. On Sat, Oct 30, 2010 at 3:02 AM, annet wrote: > Does this mean that the current menu's behaviour will change, or is > this patch optional? > > Currently, I just style active links differently, and that works fine. > I have seen people who work with different browsers on diffe

Re: [web2py] Re: Remove link in MENU for current url

2010-10-29 Thread Michael Wolfe
offended either way. Thanks, Mike On Fri, Oct 22, 2010 at 4:38 PM, mdipierro wrote: > Can you please email me the patch? thanks. > > On Oct 22, 3:08 pm, Michael Wolfe > wrote: >> Following the sage advice of Jakob Nielsen, I wanted a way to turn off >> links that point

Re: [web2py] Re: web2py equivalent of Django's pluralize?

2010-10-27 Thread Michael Wolfe
Thanks for the link. I can certainly write a function that will do what I need. I just wanted to make sure I wasn't reinventing the wheel (at least with reference to web2py). -Mike On Wed, Oct 27, 2010 at 1:32 PM, Vidul Petrov wrote: > You may want to see this recipe: > http://code.activestat

[web2py] Remove link in MENU for current url

2010-10-22 Thread Michael Wolfe
Following the sage advice of Jakob Nielsen, I wanted a way to turn off links that point to the current page within the menu (see #10 here: http://www.useit.com/alertbox/20031110.html). At the bottom of this e-mail, I'm including a proposed patch that would make this easier. I've added two optiona

Re: [web2py] Re: StackExchange for web2py community

2010-09-18 Thread Michael Wolfe
is the >> one who is going to address most of the issues ...lol!.. let him decide >> where he wants to be! >> >> >> On Sat, Sep 18, 2010 at 12:43 AM, Michael Wolfe >> wrote: >>> >>> I understand your concern, Massimo.  However, I think the sol

Re: [web2py] Re: StackExchange for web2py community

2010-09-17 Thread Michael Wolfe
I understand your concern, Massimo. However, I think the solution is not to ignore SO, but to try to get more knowledgeable web2py users answering questions there. You will still have general knowledge folks answering web2py questions, but the voting system should leave their answers at the botto

Re: [web2py] Re: per app routes

2010-09-02 Thread Michael Wolfe
Good to know. On Thu, Sep 2, 2010 at 10:58 AM, Jonathan Lundell wrote: > On Sep 2, 2010, at 7:40 AM, Michael Wolfe wrote: >> >> Great info.  Thanks for taking the time to explain. > > You're welcome. > > A caveat: I don't believe that the current logic is

Re: [web2py] Re: per app routes

2010-09-02 Thread Michael Wolfe
>> controller, insert default_function after assumed controller and >> before any potential function arguments >> 6. if nothing matches, return error >> >> Obviously my assumptions were not entirely correct.  I'm wondering if >> you could pass along a brief

Re: [web2py] Re: per app routes

2010-08-31 Thread Michael Wolfe
That didn't seem to quite do it. Visiting http://domain.com/ rewrites to http://domain.com/my_app/default/index/ instead of http://domain.com/my_app/default/search/. The URL is being substantively rewritten in the parse_url function (lines 802-807) of gluon/main.py: request.application = \

[web2py] XML+URL continuing problem

2010-08-20 Thread Michael Wolfe
Look at revisions 804, 808, and 811 in web2py's hg repos. R804: URL+XML, and oauth1.0 from Michele === (+6,-3) gluon/html.py === @@ -201,8 +201,8 @@ if regex_crlf.search(url): raise SyntaxError, 'CRLF Injection Detected' -return rewrite.filter_out(url, env) - +return XML(r

web2py@googlegroups.com

2010-08-16 Thread Michael Wolfe
12:41 PM, Michael Wolfe wrote: > >> I'm not sure anything can be done about it from within web2py (though >> Jonathan could certainly answer that better than I).  It appears to be >> a limitation of the rocket web server.  It may need to be taken up >> with the developmen

web2py@googlegroups.com

2010-08-16 Thread Michael Wolfe
I tried with the query string (?id=1) and I still got &requested_uri=None. In case I'm doing something non-standard that's contributing to the problem, here is my routes.py file (with comments and doctests removed): routes_in = ( ('/admin/$anything', '/admin/$anything'), ('/static/$anything',

web2py@googlegroups.com

2010-08-16 Thread Michael Wolfe
Massimo, I'm not sure anything can be done about it from within web2py (though Jonathan could certainly answer that better than I). It appears to be a limitation of the rocket web server. It may need to be taken up with the development team working on Rocket. Of course, if it's a problem with R

Re: [web2py] Re: Error trying to run db queries from on-line shell

2010-08-13 Thread Michael Wolfe
Ok. If it helps with the troubleshooting, I am getting the error when connecting to SQL Server, not SQLite. Not sure if the problem is db backend-specific, but I thought I'd throw it out there. Thanks for the quick response. On Fri, Aug 13, 2010 at 10:03 AM, mdipierro wrote: > nothing. this is

Re: [web2py] Re: Managing routes.py with mercurial checkout

2010-08-10 Thread Michael Wolfe
base Save and close the text file and you should be good to go. Enjoy! One final note. I am keeping a copy of routes.py in my myapp/private folder as Thadeus/Jonathan suggested. Seems like a smart best practice. On Tue, Aug 10, 2010 at 9:10 AM, Michael Wolfe wrote: > Rob, > > I haven&

Re: [web2py] Re: Managing routes.py with mercurial checkout

2010-08-10 Thread Michael Wolfe
Rob, I haven't used the bookmark extension. I'll go check that out. Thanks for the tip. -Mike On Mon, Aug 9, 2010 at 10:00 PM, Rob wrote: > You could use the hg bookmark extension and keep 2 local branches. > One branch for upstream code and the other branch for your own > changes.  Before you

Re: [web2py] Managing routes.py with mercurial checkout

2010-08-09 Thread Michael Wolfe
repository. Massimo does not use the hg import/export commands so you > don't even need to commit any contributions to your local version > anyways. > > -- > Thadeus > > > > > > On Mon, Aug 9, 2010 at 11:19 AM, Jonathan Lundell wrote: >> On Aug 9, 2010, at

Re: [web2py] Managing routes.py with mercurial checkout

2010-08-09 Thread Michael Wolfe
I thought about .hgignore as well, but your point is exactly right. It's a catch-22. Thanks for sharing your setup. On Mon, Aug 9, 2010 at 12:19 PM, Jonathan Lundell wrote: > On Aug 9, 2010, at 9:06 AM, Michael Wolfe wrote: > >> OK, but that still leaves a link to routes.py in the web2p

Re: [web2py] Managing routes.py with mercurial checkout

2010-08-09 Thread Michael Wolfe
OK, but that still leaves a link to routes.py in the web2py repository. Do you use the Pull --> Update --> Merge --> Commit approach then when you update your web2py repository? On Mon, Aug 9, 2010 at 11:40 AM, Jonathan Lundell wrote: > On Aug 9, 2010, at 8:20 AM, mwolfe02 wrote: > >> I'm just l

Re: [web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread Michael Wolfe
Touché! Point taken on the commercial software :) As a fall-back plan, there is an acceptable workaround. I can explicitly convert the floats I receive into Decimals. Based on Massimo's post, it looks like this will only be an issue for money fields returned from a .executesql statement. F

[web2py] LEFT JOIN a table to a SUM query

2010-07-23 Thread Michael Wolfe
Expanding on the LEFT OUTER JOIN example from here: http://web2py.com/book/default/section/6/6 How would I build a query using the DAL that would return the number of dogs each owner has? In MS Access, it is done most easily using two queries: DogsByOwnerID: SELECT dog.owner, Count(dog.name) AS

[web2py] LEFT JOIN query as object?

2010-07-22 Thread Michael Wolfe
I'm still learning web2py, so bear with me. I am trying to write a somewhat complex query and would like to build it as a series of smaller, easier to understand queries. web2py seems to support this beautifully for INNER JOINs and WHERE clauses as explained here: http://www.thadeusb.com/weblog/2

[web2py] Can I specify an existing named field as the autonumber ID in a legacy database?

2010-07-12 Thread Michael Wolfe
I have dozens of tables in an existing MSSQL database all with autonumber ID primary keys, but none that are named 'id'. They are instead named PropertyID, ClientID, etc. The official documentation seems to suggest renaming each of these fields to 'id'. However, that would require breaking hundr