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 > database first as a pre

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: > >> On 10/21/2013 03:50 PM, cool-RR wrot

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 forgotten your password, see > https://www.d

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 si

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 si

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

2015-02-26 Thread Ram Rachum
>> >> Should be relatively simple. Just add a .select_related('nearby_desks') >> to your existing query and that should pull in the associated Desk object >> in a single query. You can also substitute in prefetch_related(), although >> you'll still have t

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 wrote: > Can your s

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 > --forloop.counter/first/last/etc > > --

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 wrote: > On Fri, Feb 14, 2014 at 1:08 PM, Ram Rachum wrote: > > Thanks! > > > > But empty and the various forloop don't concern me because they're {{ }} > > rather than {% %}, they don't start a bl

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 > multi-select mode > > On

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 keyboard controlled in > ch

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 admin is represented

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 ( > https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmi

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') b = > Client.objects.

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 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, 2014 at 2:29 AM, S

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 long as they've been in

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: 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 mor