Got it working. Thanks for the help.
On Jul 12, 6:28 pm, mdipierro wrote:
> No need. You should be able to just do
>
> db.define_table('property',Field('PropertyID','id'),)
>
> i.e. add an extra field of type 'id' with the proper name. Let us know
> if this works.
>
> Massimo
>
> On 12 Lug,
It turns out the error I got it was for a different syntactical
mistake I'd made. The relevant error is slightly different:
TypeError: 'Rows' object is not callable
I assume this is because the .select() method returns a 'Rows' object?
On Jul 22, 4:09 pm, Michael Wolfe
wrote:
> I'm still learn
db.dog.id)
> where = db(db.friend.name == "fred")
> ... continue and do some stuff with the "where" query object
> results = where.select(db.friend.ALL, left = lefton)
>
> --
> Thadeus
>
> On Thu, Jul 22, 2010 at 4:10 PM, mwolfe02
> wrote:
>
The example under Grouping and Counting returns:
Alex 2
Bob 1
In other words, it performs an INNER JOIN not an OUTER JOIN. This is
a critical difference. In this simple example we don't get a row of
information for 'Carl' because he owns no dogs. It may not be a big
deal for such a simple, co
.freeze" wrote:
> Does this work?
> count = db.dog.id.count()
> rows=db().select(db.person.name, count, groupby=db.person.id,
> left=db.dog.on(db.person.id==db.dog.owner))
>
> On Jul 23, 2:08 pm, mwolfe02 wrote:
>
>
>
> > The example under Grouping and Cou
I need to be able to perform multiple LEFT JOINs on sub-SUM queries.
For example:
SELECT C.Name, O.TotalOrderAmt, R.TotalRefundAmt
FROM Customers AS C
LEFT JOIN (SELECT CustomerID, Sum(Amount) AS TotalOrderAmt FROM Orders
GROUP BY CustomerID) O ON C.id = O.CustomerID
LEFT JOIN (SELECT CustomerID,
I'd vote for CHAPTERS as well, with the previously mentioned caveat
that searches would need to be able to jump to the relevant section(s)
within a chapter.
Also, I think a fixed (ie, non-scrolling and always on-screen) sidebar
with the current chapter's section table of contents allowing easy
nav
Very nice! I especially like the yellow highlighting of the search
terms. Maybe this is nitpicking or you just haven't gotten that far
yet, but I think the index should be in case-insensitive alphabetical
order.
Also, I don't know if you're taking feedback on specific content yet,
but I think th
There's a generic except: in dal.py/sql.py that prevents SyntaxErrors
from being reported.
For example,
db = DAL('mssql://user:p...@127.0.0.1/')
results in:
RuntimeError: Failure to connect to DB. Tried 5 times
instead of:
SyntaxError: Invalid URI string in SQLDB: mssql://user:p...@127.0.0.1/
When I follow a ticket link it goes to http: instead of https:. Can I
configure Apache to recognize http://1.2.3.4/admin/ and automatically
redirect to https://1.2.3.4?
This is more an annoyance than anything, but it has gotten really
annoying. I'm testing my new app in its future production env
glaringly obvious now...
On Jul 29, 5:20 pm, mwolfe02 wrote:
> When I follow a ticket link it goes to http: instead of https:. Can I
> configure Apache to recognizehttp://1.2.3.4/admin/and automatically
> redirect tohttps://1.2.3.4?
>
> This is more an annoyance than anything, but it ha
For background, refer to related questions on SO:
http://stackoverflow.com/questions/3364699/
http://stackoverflow.com/questions/3371795/
I'm developing my app on Windows, but will be deploying it on a Linux
server. The following lines are from the top of my db.py:
if os.name=='posix': #Ubuntu
x.com/products/python/mxODBC/
>
> 2010/7/30 mwolfe02
>
>
>
> > For background, refer to related questions on SO:
> >http://stackoverflow.com/questions/3364699/
> >http://stackoverflow.com/questions/3371795/
>
> > I'm developing my app on Windows, but will be d
alue))
> ...
>
> so technically even if the database where to return float (wrong),
> web2py should still return decimal. Is this the case for you?
>
> On Jul 30, 8:35 am, mwolfe02 wrote:
>
>
>
> > For background, refer to related questions on
> > SO:http://stackov
.8.30/TaxDB', migrate=False)
On Jul 30, 10:43 am, mwolfe02 wrote:
> I'm using .executesql. I added a line to sql.py for debugging
> purposes. It returns the second column of the first row of results (a
> SUM of a SQL Server money column):
>
> diff --git a/gluo
where I can leverage the DAL, I think web2py will handle things just
> fine.
>
> I'm going to post a message to the FreeTDS message board and see what
> I can learn.
>
> On Fri, Jul 30, 2010 at 11:08 AM, Michele Comitini
>
>
>
> wrote:
>
> > 2010/7/30
I'm having the same issue logging in. Any resolution/workaround?
Thanks,
Mike
On Jul 31, 5:49 am, LordMax wrote:
> HI
>
> I'll see some imagesnotrendered.
>
> for example onhttp://web2py.com/book/default/chapter/01#Model-View-Controller
>
> On source page they are linked like:
> /book2/static/b
I wrote this simple website using Django (http://
www.heberlings.com/). As part of the navigation, I wanted to turn off
the link for the currently active page. If you visit the site and
click on a couple of the menu items on the left side of the page, you
will see what I mean.
To implement this
re command as root). I fought with that for a long time before
realizing I could pass that setting in the web2py connection string:
db = DAL('mssql://user:p...@dbserver.domain.com/DBName?
DRIVER=FreeTDS;TDS_Version=8.0')
Hopefully this information will be useful to someone.
On Jul 3
.function=='info',URL(r=request,f=info'),
> []),
> ]
>
> The latter code can go in menu.py but you can place it in any mode.
> MENU(...) takes arguments that allows you to customize the class of
> the amd . It also handles submenu (the [] above are
> subm
According to the web2py book, routes.py should not be used in
production environment (http://web2py.com/book/default/chapter/04?
search=lighttpd). Instead, Apache/lighttpd web server rewrite is
suggested.
I assumed this was due to some overhead that using routes.py would
incur. However, massimo's
athan Lundell wrote:
>
>
>
> > On Aug 8, 2010, at 2:35 PM, mwolfe02 wrote:
>
> > > According to the web2py book, routes.py should not be used in
> > > production environment (http://web2py.com/book/default/chapter/04?
> > > search=lighttpd). Instead,
I'm just looking for a best practice here. I am running web2py using
a clone of the repository https://web2py.googlecode.com/hg/. This has
worked really well for me. However, I just added a routes.py file.
Clearly, I want to version control this file, but that requires
committing the change to m
I'm trying to run a very simple select query from the built-in web-
based shell, but I keep getting the following error: The cursor's
connection has been closed.
Here is the full traceback:
Traceback (most recent call last):
File "", line 1, in
File "...\web2py\gluon\sql.py", line 3214, in
I'm trying to use routes_onerror, but requested_uri keeps coming
through as None (subject of this e-mail is the query string from the
redirect). I searched through the source code and could not find
where this is supposed to be set. I stepped through using WinPDB and
there is simply no entry in r
any control
over. I hope I can save someone else some trouble in the future.
-Mike
On Aug 16, 12:52 pm, mwolfe02 wrote:
> I'm trying to use routes_onerror, but requested_uri keeps coming
> through as None (subject of this e-mail is the query string from the
> redirect). I searched
I'm still debugging now, but there seems to be an issue using the
special $anything token inside app-specific routes_in. It appears
that the incoming URL is being applied to each app-specific routes_in
one at a time before it is applied against routes_app.
I'll try to include more details later,
31, 12:31 pm, mwolfe02 wrote:
> I'm still debugging now, but there seems to be an issue using the
> special $anything token insideapp-specificroutes_in. It appears
> that the incoming URL is being applied to eachapp-specificroutes_in
> one at a time before it is applied against rou
gt; On Aug 31, 2010, at 10:01 AM, mwolfe02 wrote:
>
> >> More clues... When web2py loads, rewrite.params.routes_in gets set as
> >> follows:
>
> >> - items from base routes_in are appended first
> >> - then items fromapp-specificroutes_in are appended
com/ I receive the 'invalid function' page
instead of rewriting to http://domain.com/my_app/default/search/. I'm
debugging now and will post back when I learn more.
-Mike
On Aug 31, 2:04 pm, mwolfe02 wrote:
> This fixed the problems I was having. I'll let you know if I run
ll be heading home for the day soon and won't be
> > working on this project again until Thursday. So if you don't get a
> > response from me for awhilethat's why.
>
> OK. I'll take a closer look. It's helpful to know that it's getting 'index'
I'm not sure if this is the officially correct way to do this, but I
implemented this functionality by making a change to layout.html:
I replaced these lines:
- {{=A(T('login'),_href=URL(r=request,c='default',f='user/login'))}} |
- {{=A(T('register'),_href=URL(r=request,c='default',f='
My vote:
- ask questions on StackOverflow using the existing web2py tag
- follow the questions using this RSS feed:
http://stackoverflow.com/feeds/tag/web2py
I like StackOverflow a lot and I think it is a much better interface
than Google Groups. I asked my first few questions about web2py on S
I'm troubleshooting my routes_onerror by starting with a simple case,
redirecting everything to a status page for debugging:
routes_onerror = [(r'*/*', r'/status/'),]
When I type the following url into the browser:
http://127.0.0.1:8000/faq
I get redirected to this url:
http://127.0.0.1:8000/s
I'm using a legacy tables and trying to use the shortcut method of
returning a row/record by passing the value of the ID field directly
to the table. It appears that 'id' is still hardcoded into the logic
at some level, though. This works:
db.mytable(db.mytable.my_id==1)
But this does not:
db
th this table definition:
db.define_table('mytable',
Field('my_id', 'id')
)
This line:
hasattr(db.mytable, '_primarykey') # returns False
It seems like the above line should return True and
db.mytable._primarykey should equal 'my_id'. Which makes m
marykey) or
[self._db[t]['id'].name] or ['id'])])
sql_s += ' TOP %i' % lmax
elif self._db._dbname == 'firebird':
if not attributes.get('orderby', None) and
w2p_tablenames:
On Sep 21, 5:10 pm, mwolfe02 wrote:
> w
;orderby', None) and
w2p_tablenames:
On Sep 22, 10:16 am, mdipierro wrote:
> actually I just fixed it in trunk for a few APIs which will cover the
> case you described.
> There are still a few cases where a custom ID name breaks something.
>
> Massimo
>
> On Sep
I just spent several hours troubleshooting why my application seemed
to be randomly hanging when I was running both the Rocket Server and
the shell. It came down to the fact that I was performing db io
(Create/Update/Delete) in the shell and not explicitly committing it.
I was misled by this line
I think one of the keys to getting a csszengarden-type database of
base.css files is to have an html page dedicated to showcasing all of
the different styles. Would it be worth having a separate
css_sampler.html file that accomplishes this so that the main page
does not have to get too cluttered..
I really like the idea of a bold, simple image to represent the
framework. I'm just not convinced a ship is the right image.
Maybe it would be more helpful to the few good logo designers on this
list (of which Branko is certainly one), for us to propose different
images. I'll list what I feel (p
(e.g., like the old logo).
>
> Anthony
>
> On Oct 26, 11:27 am, mwolfe02 wrote:
>
>
>
>
>
>
>
> > I really like the idea of a bold, simple image to represent the
> > framework. I'm just not convinced a ship is the right image.
>
> > Maybe it wo
How do you do this in web2py:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#pluralize
Thanks,
Mike
When I run the doctest for my routes file (python routes.py) after
updating to changeset 1054 or later, I receive the following error
message:
Traceback (most recent call last):
File "routes.py", line 103, in
from gluon.rewrite import select, load, filter_url, filter_out,
filter_err, compil
I have a legacy table with a three-character primary key and a three-
character self-referencing field. I'm trying to implement the
following sql using the DAL:
SELECT District.Description, SchoolDistrict.Description
FROM District.DistrictID
INNER JOIN District AS SchoolDistrict
ON District.Schoo
I'm receiving an invalid syntax error when running from Windows. I do not
receive the error when running the same code from my Webfaction account on
CentOS. The error appears to be related to compiling of the code. I assume
the compile code is taking issue with the HTML helper functions whi
I receive the following traceback when trying to run some pretty
straightforward code:
Traceback (most recent call last):
File "M:\My Documents\EstateCommander\web2py\gluon\restricted.py", line 208,
in restricted
ccode = compile2(code,layer)
File "M:\My Documents\EstateCommander\web2py\g
Right on both counts, Bruno. Thanks. I thought I was running the same
Python version in both environments, but I was not. I am running Python
2.7.3 in my linux environment (which works without error) and Python 2.5.5
on Windows (where I was receiving the error).
Your workaround was effective
Are there any shared hosts with Python 2.4 support where it is NOT
possible to upgrade to Python 2.5 or later? If not, then I support
Jonathan Lundell's suggestion of providing a simple recipe to move to
a later Python.
On second thought, how universal would such a 'recipe' be? Will it
vary grea
+1 Productivity by design
On Mar 15, 2:13 pm, danto wrote:
> 2011/3/15 mart
>
>
>
>
>
>
>
>
>
> > Just throwing in my 2 cents worth,
>
> > Personally, I kind of like the that it says Enterprise, but as
> > mentioned here, depends on who's reading it. This is my first try in
> > world if open sou
> IMNSHO, "Productivity by Design" sucks.
>
> It is vague, wishy-washy, and banal. It could be said of every web
> development tool from Apache to Zope. It fails to capture any of
> web2py's essential advantages.
I disagree. I think it speaks to the very thing that sets web2py
apart from every
Someone please correct me if I'm wrong, but I believe the Pattern-
Based System supports URL re-writing different domains to different
applications.
On Jun 14, 1:56 pm, Francisco Costa wrote:
> > If you use the parameter-based URL rewrite system
> > (seehttp://web2py.com/book/default/chapter/04#
I've got a live web2py application under Mercurial version control. When I
did my latest commit, I noticed there were several changes to the following
two files (the Polish and Russian translation files):
/languages/pl.py
/languages/ru-ru.py
I did not make these changes. The changes look like
53 matches
Mail list logo