Re: Creating test databases in parallel

2020-04-02 Thread Ram Rachum
When you say "shrinking your test databases", what do you mean exactly? I'm a bit of a newbie on that part of Django. On Wed, Apr 1, 2020 at 8:13 PM Thomas Lockhart wrote: > If you are trying to optimize the test flow, then you may want to spend > some time shrinking your test databases to a

Re: Creating test databases in parallel

2020-04-01 Thread Ram Rachum
This is a general article about concurrency in Python. I'm very good with concurrency in Python, I'm asking about a specific case here. On Wed, Apr 1, 2020 at 1:20 PM Motaz Hejaze wrote: > Long article somehow , but very informative ... > > https://realpython.com/python-concurrency/ > > On Wed,

Re: Prefetching a single item

2015-03-04 Thread Ram Rachum
Thanks Simon! That worked. I would say it's a bit devious though, and it was nice if there was a method that didn't use `distinct`, which has its own issues. (And can't be used for any number of items other than 1 in this case.) On Tue, Mar 3, 2015 at 7:15 AM, Simon Charette

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread Ram Rachum
u are trying to profile your site, I would recommend the >> Django-debug-toolbar. That should tell you whether or not that query set is >> the culprit. >> >> -James >> On Feb 25, 2015 1:28 PM, "Ram Rachum" <r...@rachum.com> wrote: >> >>> Hi

Fwd: Can the new `Prefetch` solve my problem?

2015-02-25 Thread Ram Rachum
Hi James, I've read the docs but I still couldn't figure it out. My queryset works great in production, I'm trying to optimize it because our pageloads are too slow. I know how to use querysets in Django pretty well, I just don't know how to use `Prefetch`. Can you give me the solution for the

Re: Can the new `Prefetch` solve my problem?

2015-02-25 Thread Ram Rachum
Hi James, I've read the docs but I still couldn't figure it out. My queryset works great in production, I'm trying to optimize it because our pageloads are too slow. I know how to use querysets in Django pretty well, I just don't know how to use `Prefetch`. Can you give me the solution for the

Re: Is there a good reason why Django querysets can't be intersected?

2014-03-17 Thread Ram Rachum
Wonderful! Followup question: Is there any reason why ~ isn't supported? (It's supported on Q, but not QuerySet.) On Mon, Mar 17, 2014 at 3:17 AM, James Bennett wrote: > QuerySets have supported the '&' operator (as measured by implementing the > __and__() method) for as

Re: Is there a good reason why Django querysets can't be intersected?

2014-03-16 Thread Ram Rachum
Also, is it a recently added feature? On Mon, Mar 17, 2014 at 2:33 AM, Ram Rachum <r...@rachum.com> wrote: > Oh my fucking God I'm an idiot. I distinctly remember it not working. > Happy it's working! > > Is it implemented efficiently? > > > > On Mon, Mar 17, 2

Re: Is there a good reason why Django querysets can't be intersected?

2014-03-16 Thread Ram Rachum
Oh my fucking God I'm an idiot. I distinctly remember it not working. Happy it's working! Is it implemented efficiently? On Mon, Mar 17, 2014 at 2:29 AM, Shawn Milochik wrote: > It seems to work for me: > > a = Client.objects.filter(name__istartswith='a')

Re: Controlling admin ManyToManyField widget with keyboard

2014-02-27 Thread Ram Rachum
Ah, that works. It's not as nice as being able to move them without a tab dance, but it works. On Thu, Feb 27, 2014 at 12:40 AM, C. Kirby wrote: > Oh, sorry. That widget uses ModelAdmin.filter_horizontal ( >

Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread Ram Rachum
The widget is a combination of two multiple select boxes and arrows to move items between boxes. I have no issues with the selecting part. I have an issue with the moving part. On Wed, Feb 26, 2014 at 11:58 PM, C. Kirby wrote: > I don't think I am. A ManyToMany relation in

Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread Ram Rachum
Are you sure that you're not confusing the behavior of the select box with the toggle action? Because I'm having trouble with the toggle action, not the select box. On Wed, Feb 26, 2014 at 8:08 PM, C. Kirby wrote: > It appears that multi-select form widgets cannot be

Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread Ram Rachum
Sorry, space doesn't do the toggle. (Windows 7 Chrome.) On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby wrote: > While holding Ctrl (Command on a Mac), click the spacebar on the relations > you want to select. > Spacebar handles the toggle action, ctrl(command) keeps you in >

Re: List of default Django tags that are "mid-block" like else

2014-02-15 Thread Ram Rachum
Thanks! On Fri, Feb 14, 2014 at 4:27 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Fri, Feb 14, 2014 at 1:08 PM, Ram Rachum <r...@rachum.com> wrote: > > Thanks! > > > > But empty and the various forloop don't concern me because they're {{ }} > &

Re: List of default Django tags that are "mid-block" like else

2014-02-14 Thread Ram Rachum
Thanks! But empty and the various forloop don't concern me because they're {{ }} rather than {% %}, they don't start a block. Anything else? On Fri, Feb 14, 2014 at 12:19 AM, C. Kirby wrote: > Not sure if this is what you mean, but: > > for > --empty >

Re: Djangocon videos

2013-10-21 Thread Ram Rachum
Thanks Keith. But I don't see how to sort there! On Mon, Oct 21, 2013 at 5:45 PM, Keith Edmiston wrote: > http://www.youtube.com/playlist?list=PLtqtTJ4wP09YOFqm_lBCoQtmS6S0omW3J > > > On Mon, Oct 21, 2013 at 8:54 AM, Víðir Valberg Guðmundsson > wrote: > >>

Re: Changing SECRET_KEY for a project that was already launched

2013-03-07 Thread Ram Rachum
Thanks! On Wed, Mar 6, 2013 at 11:36 PM, Shawn Milochik wrote: > Are you using it as the key for any encrypted fields, or anything > other than the built-in stuff Django does with session cookies? > > If not, I don't think you'll have a problem. Of course, back up your >

Re: How do I change my user password on Django's bug tracker?

2011-07-29 Thread Ram Rachum
Thanks! On Thu, Jul 28, 2011 at 8:51 PM, Jacob Kaplan-Moss wrote: > On Tue, Jul 26, 2011 at 7:07 AM, cool-RR wrote: > > How do I change my user password on Django's bug tracker? > > https://www.djangoproject.com/accounts/password/change/ > > If you've