Re: timesince 'depth' parameter

2020-05-23 Thread Claude Paroz
Le samedi 23 mai 2020 16:41:04 UTC+2, Toby Such a écrit : > > Maybe the logic for calculating the time before formatting could be taken > out of the function? That way it would be far easier to implement your own > custom versions of the function without copying and pasting, and makes the > code

Re: Additional column in Queryset with condition

2020-05-23 Thread Saurabh Adhikary
Hey Adam, Thanks for your reply. While writing this code I have found a bug . I shall start a new thread for that then. Thanks , Saurabh On Sat, May 23, 2020, 8:11 PM Adam Johnson wrote: > Hi! > > I think you've found the wrong mailing list for this post. This mailing > list is for discussi

Re: Additional column in Queryset with condition

2020-05-23 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for discussing the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely t

Re: timesince 'depth' parameter

2020-05-23 Thread Toby Such
I see your point but its tricky to know where you draw the line. Where do months stand? That answer will change depending on the project requirements. I wonder if there is a way of changing how the "time_strings" parameter works to control the depth more granularly but this does put a higher ov

Additional column in Queryset with condition

2020-05-23 Thread Saurabh Adhikary
Hello , I need some advice / tips. I am in a fix. I have 2 databases & I want to join 2 tables of that. *As we know the foreign key concept with 2 separate databases is not possible. * Basically what I want is to add a custom column to a queryset and pass the *current row.name

Add support for image processing

2020-05-23 Thread arman _assassins
Yo. The world is going full virtual. But the world isn't ready for it yet. For example I've been working on this project that business is done from behind your monitor. Literally. But for any body to do business with anyone they're going to need some security in the real world. Like what I'm tryi

Re: timesince 'depth' parameter

2020-05-23 Thread Mark Bailey
+1 There are lots of subtleties for how it can behave, and I have written my own when I want specific behaviour. Other times I want something quick, and I've used timesince, and usually just put up with the fact that it's a bit longer than I want. Having that control would make it a lot more

Re: timesince 'depth' parameter

2020-05-23 Thread Matthias Kestenholz
The same could be said for "1 day, 23 hours" vs "1 day". The way I implemented it in a former project was to only switch to days after 48 hours, and/or only switch to years after 24 months etc. Best regards, Matthias On Sat, May 23, 2020 at 12:00 PM Tom Forbes wrote: > I like this idea. Howeve

Re: timesince 'depth' parameter

2020-05-23 Thread Tom Forbes
I like this idea. However while `depth=1` makes sense for shorter time periods where the difference between `4 hours` and `4 hours and 3 minutes ago` is not required to be displayed, when you get a value that is over a year ago it loses a lot of granularity. The difference between `1 year` and `

Re: timesince 'depth' parameter

2020-05-23 Thread Adam Johnson
+1 I belive I’ve copy-paste-modified timesince in a past project to implement “depth=1” On Sat, 23 May 2020 at 10:04, Tobias Kunze wrote: > On 20-05-22 19:02:02, Toby Such wrote: > >Looks like other people seemed to have the same idea as me for a little > >fix, seems to me like it should be par

Re: timesince 'depth' parameter

2020-05-23 Thread Tobias Kunze
On 20-05-22 19:02:02, Toby Such wrote: >Looks like other people seemed to have the same idea as me for a little >fix, seems to me like it should be part of core Django. And yes I do admit >its a small thing but if it was actually useful some more people might use >it? Sounds good to me, especi