Re: Arbitrary GROUP BY fields

2019-10-18 Thread thinkwell
Thanks for your reply James. I wasn't able to get it to work. I posted on the new Django forum because it's easier to format code examples over there. Hopefully that clarifies things more... -- You

Re: Flakey tests and django.db.utils.InterfaceError: connection already closed

2016-04-11 Thread thinkwell
I'd parked this problem for quite some time, until it finally became incontestably necessary to wrestle the issue to the ground. What I found, after many hours of experimenting - too much like the random walk, I suppose, is that every time I overrode setUpClass, I also had to override

Re: What will be the replacement for .extra()?

2015-12-10 Thread thinkwell
So how would an query like this be written, with the new Query Expression API? Where a count of events by day is required but the date column is datetime? Triggers.objects.all().extra({"day": "date_trunc('day', date)"}).values_list ('name', 'severity', 'day').annotate(total=Count('severity'))

Flakey tests and django.db.utils.InterfaceError: connection already closed

2015-10-08 Thread thinkwell
I could use some assistance in troubleshooting a psycopg2.InterfaceError problem that has erratic behavior. Here is the test module suite that I'm running to test these models , and in this state all the tests in the module pass.

Re: Self-referential User relationship

2015-09-12 Thread thinkwell
Ok, I suppose never mind! I found this [django-friendship](https://github.com/revsys/django-friendship/) module and in reading their model layout, I'll be able to get done what I need to do. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Self-referential User relationship

2015-09-11 Thread thinkwell
Hello, I have to do a bit of a code rewrite and I want to measure twice and cut once with this. I need to store use extra information about each user, so I'm creating a profile. And each user can follow other users, so I create a ManyToMany field referencing the User model, and not "self"

One-time tasks at varying times with Uwsgi Spooler

2015-07-31 Thread thinkwell
I'm using django-uwsgi in my application, but I'm needing to run asynchronous tasks (one-time only) in my django app at varying times, based on user input. I tried passing in at "at" key to a_long_task.spool({'hello':'world',