[web2py] Re: GROUP BY Date, Ignore Time

2011-05-30 Thread Neodudeman
Awesome. Exactly what I needed, thank you.

On May 29, 4:14 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 set = db(db.posts.id).select(db.posts.posted_date, count,
 groupby=db.posts.posted_date.year()|db.posts.posted_date.month()|
 db.posts.posted_date.day())

 On May 29, 2:42 pm, Neodudeman tams...@gmail.com wrote:







  Hi web2py; I've got some problems.
  I'm attempting to get a count of some rows based on thedate; but when
  I attempt the grouping, it includes thetimeas well, giving me a
  false count. (Since no two rows were created at the exact same second,
  the count never goes above 1 per 'date')

  Here's my current code:

  count = db.posts.id.count()
  set = db(db.posts.id).select(db.posts.posted_date, count,
  groupby=db.posts.posted_date)

  How can I change the groupby toignorethetimeportion of the
  posted_date?


[web2py] GROUP BY Date, Ignore Time

2011-05-29 Thread Neodudeman
Hi web2py; I've got some problems.
I'm attempting to get a count of some rows based on the date; but when
I attempt the grouping, it includes the time as well, giving me a
false count. (Since no two rows were created at the exact same second,
the count never goes above 1 per 'date')

Here's my current code:

count = db.posts.id.count()
set = db(db.posts.id).select(db.posts.posted_date, count,
groupby=db.posts.posted_date)

How can I change the groupby to ignore the time portion of the
posted_date?


[web2py] Re: Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-21 Thread Neodudeman
Thanks for your help! Was able to solve this.
Turns out that I was editing the wrong, but similar, view file.
Changing the variable from {{end = len(list)}} to {{right =
len(list)}} worked!

Thanks again.

On Mar 20, 9:45 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 I think this is creating the problem: {{end = len(list)}}

 This is to be considered in a bug in the template parser. I think I
 have fixed it in trunk (please check it).

 Meanwhile if you choose to stable, you can remove the spaces
 {{end=len(list)}} and the problem should go away.

 Massimo

 On Mar 20, 8:05 pm, Neodudeman tams...@gmail.com wrote:

  I searched my entire file for anything with the word 'end'

  Closest things were {{end = len(list)}} and !--End-- both of which
  I've changed, and I've still got the error.

  On Mar 20, 10:22 am, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:

   Do you have something like {{end}} in your view?

   The old template parse was more forgiving when it comes to invalid
   templates and did not support blocks.

   On Mar 20, 9:11 am, Neodudeman tams...@gmail.com wrote:

Hey guys, I'm stumped on this error that I'm getting.

I recently upgraded from Web2py 1.79 to 1.93, and when viewing a
certain, important, relatively complicated view file, I get this
error.

[The end tag is unmatched, please check if you have a starting
block tag]

And I can't, for the life of me, figure it out. The admin panel just
returns that the Socket Timed Out, in the rocket.py.

Could someone point me in the right direction, or maybe shed some
light on exactly what end tag it's talking about?


[web2py] Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-20 Thread Neodudeman
Hey guys, I'm stumped on this error that I'm getting.

I recently upgraded from Web2py 1.79 to 1.93, and when viewing a
certain, important, relatively complicated view file, I get this
error.

[The end tag is unmatched, please check if you have a starting
block tag]

And I can't, for the life of me, figure it out. The admin panel just
returns that the Socket Timed Out, in the rocket.py.

Could someone point me in the right direction, or maybe shed some
light on exactly what end tag it's talking about?


[web2py] Re: Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-20 Thread Neodudeman
I searched my entire file for anything with the word 'end'

Closest things were {{end = len(list)}} and !--End-- both of which
I've changed, and I've still got the error.

On Mar 20, 10:22 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Do you have something like {{end}} in your view?

 The old template parse was more forgiving when it comes to invalid
 templates and did not support blocks.

 On Mar 20, 9:11 am, Neodudeman tams...@gmail.com wrote:

  Hey guys, I'm stumped on this error that I'm getting.

  I recently upgraded from Web2py 1.79 to 1.93, and when viewing a
  certain, important, relatively complicated view file, I get this
  error.

  [The end tag is unmatched, please check if you have a starting
  block tag]

  And I can't, for the life of me, figure it out. The admin panel just
  returns that the Socket Timed Out, in the rocket.py.

  Could someone point me in the right direction, or maybe shed some
  light on exactly what end tag it's talking about?