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 precaution, and use version control on your code
> so you can revert if necessary.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/X-urJnLjzTY/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 wrote:
>> > Hi guys,
>> >
>> > I want to watch videos of talks from the recent Djangocon. But, I don't
>> > want to weed through all of them manually looking for the best ones. Did
>> > anyone make a "best of" list? Is there a way to sort by popularity or
>> > rating or something?
>>
>> Are they up yet? I mean the DjangoCon US. I haven't been able to find
>> them anywhere.
>>
>> --
>> víðir
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/52653204.9080708%40orn.li.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Keith Edmiston
> (512)970-7222
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/tcwu3hdjxxM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAP_gv7Jn0aH0osjoYfWpCvh4QqAvRUix7QE_d0_5G_s5XxNzqg%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVZrv9JyFwD%3DjbWjP6ZdLLsB3GSLW5cavhef3bYS%3DbjspA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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.djangoproject.com/accounts/password/reset/.
>
> Jacob
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 simplified example I gave? This might
help me figure out what I'm not understanding. One thing that might be
unclear with the example I gave, is that I meant I want to get a queryset
for `Desk` where every desk has an attribute names `favorite_or_nearby_chairs`
which contains the queryset of chairs that I desrcibed, prefetched.


Thanks,
Ram.

On Wed, Feb 25, 2015 at 11:18 PM, James Schneider 
wrote:

> I assume that you are talking about the select_related() and
> prefetch_related() queryset methods?
>
> https://docs.djangoproject.com/en/1.7/ref/models/querysets/#select-related
>
> https://docs.djangoproject.com/en/1.7/ref/models/querysets/#prefetch-related
>
> Both of those sections have excellent examples, and detail what the
> differences are (primarily joins vs. separate queries, respectively).
>
> For better help, you'll need to go into more detail about the queries you
> are trying to make, what you've tried (with code examples if possible), and
> the results/errors you are seeing.
>
> In general, I would try to get an initial queryset working and gathering
> the correct results first before looking at optimizations such as
> select_related(). Any sort of pre-fetching will only confuse the situation
> if the base queryset is incorrect.
>
> -James
>
> On Wed, Feb 25, 2015 at 12:05 PM, cool-RR  wrote:
>
>> Hi guys,
>>
>> I'm trying to solve a problem using the new `Prefetch` but I can't figure
>> out how to use it.
>>
>> I have these models:
>>
>> class Desk(django.db.models.Model):
>> pass
>>
>> class Chair(django.db.models.Model):
>> desk = django.db.models.Foreignkey('Desk', related_name='chair',)
>> nearby_desks = django.db.models.ManyToManyField(
>> 'Desk',
>> blank=True,
>> )
>>
>> I want to get a queryset for `Desk`, but it should also include a
>> prefetched attribute `favorite_or_nearby_chairs`, whose value should be
>> equal to:
>>
>> Chair.objects.filter(
>> (django.db.models.Q(nearby_desks=desk) |
>> django.db.models.Q(desk=desk)),
>> some_other_lookup=whatever,
>> )
>>
>> Is this possible with `Prefetch`? I couldn't figure out how to use the
>> arguments.
>>
>>
>> Thanks,
>> Ram.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/46d9fdb7-c008-4496-acda-ac7cb30b4a89%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/EuPduHjSNos/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVk7_6VBDoBE-qjLBwrBxiNeVdP6-fwwnOXV%3DvSA3HnCw%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVY7ffbsLKi5hCaNkGUNz%2B_A2vO-PueQfCGhB%3DJoKOERnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 simplified example I gave? This might
help me figure out what I'm not understanding. One thing that might be
unclear with the example I gave, is that I meant I want to get a queryset
for `Desk` where every desk has an attribute names `favorite_or_nearby_chairs`
which contains the queryset of chairs that I desrcibed, prefetched.


Thanks,
Ram.

On Wed, Feb 25, 2015 at 11:18 PM, James Schneider 
wrote:

> I assume that you are talking about the select_related() and
> prefetch_related() queryset methods?
>
> https://docs.djangoproject.com/en/1.7/ref/models/querysets/#select-related
>
> https://docs.djangoproject.com/en/1.7/ref/models/querysets/#prefetch-related
>
> Both of those sections have excellent examples, and detail what the
> differences are (primarily joins vs. separate queries, respectively).
>
> For better help, you'll need to go into more detail about the queries you
> are trying to make, what you've tried (with code examples if possible), and
> the results/errors you are seeing.
>
> In general, I would try to get an initial queryset working and gathering
> the correct results first before looking at optimizations such as
> select_related(). Any sort of pre-fetching will only confuse the situation
> if the base queryset is incorrect.
>
> -James
>
> On Wed, Feb 25, 2015 at 12:05 PM, cool-RR  wrote:
>
>> Hi guys,
>>
>> I'm trying to solve a problem using the new `Prefetch` but I can't figure
>> out how to use it.
>>
>> I have these models:
>>
>> class Desk(django.db.models.Model):
>> pass
>>
>> class Chair(django.db.models.Model):
>> desk = django.db.models.Foreignkey('Desk', related_name='chair',)
>> nearby_desks = django.db.models.ManyToManyField(
>> 'Desk',
>> blank=True,
>> )
>>
>> I want to get a queryset for `Desk`, but it should also include a
>> prefetched attribute `favorite_or_nearby_chairs`, whose value should be
>> equal to:
>>
>> Chair.objects.filter(
>> (django.db.models.Q(nearby_desks=desk) |
>> django.db.models.Q(desk=desk)),
>> some_other_lookup=whatever,
>> )
>>
>> Is this possible with `Prefetch`? I couldn't figure out how to use the
>> arguments.
>>
>>
>> Thanks,
>> Ram.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/46d9fdb7-c008-4496-acda-ac7cb30b4a89%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/EuPduHjSNos/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVk7_6VBDoBE-qjLBwrBxiNeVdP6-fwwnOXV%3DvSA3HnCw%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVaoYtOF5XJ2y_LOcokmn%3DfPEkqLBktYMtKVPaxCrFf-cA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2015-02-26 Thread Ram Rachum
There may be a big number of chairs, and I don't want all the chairs
prefetched. I want to have the database filter them according to the
queryset I specified in a single call, I don't want to filter them in
Python or make a new call to filter them.

Thanks,
Ram.

On Thu, Feb 26, 2015 at 1:48 PM, aRkadeFR  wrote:

>  I may not have completely understand your problem, but
> why not prefetching all the chairs? and then with the (new)
> attribute favorite_or_nearby_chairs loading only the favorite
> or nearby one?
>
> like:
> @property
> def favorite_or_nearby_chairs(self):
> for chair in self.chair_set.all():
>   #filter...
>   ans += ...
> return ans
>
> It will only hit the DB once thanks to the first join of desk
> <-> chair.
>
>
> On 02/26/2015 11:28 AM, cool-RR wrote:
>
> James, you misunderstood me.
>
>  There isn't supposed to be a `favorite_or_nearby_chairs` attribute.
> That's the new attribute I want the prefetching to add to the `Desk`
> queryset that I need. Also, I don't understand why you'd tell me to add a `
> .select_related('nearby_desks')` to my query. Are you talking about the
> query that starts with `Chair.objects`? I'm not looking to get a `Chair`
> queryset. I'm looking to get a `Desk` queryset, which has a prefetched
> attribute `favorite_or_nearby_chairs` which contains the `Chair` queryset
> I wrote down.
>
>
>  Thanks,
> Ram.
>
> On Thursday, February 26, 2015 at 6:02:15 AM UTC+2, James Schneider wrote:
>>
>> Well, the Desk model you provided is blank, but I'll believe you that
>> there's a favorite_or_nearby_chairs attribute. ;-)
>>
>> 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 two queries at that point.
>>
>> If you 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"  wrote:
>>
>>> 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 simplified example I gave? This
>>> might help me figure out what I'm not understanding. One thing that might
>>> be unclear with the example I gave, is that I meant I want to get a
>>> queryset for `Desk` where every desk has an attribute names 
>>> `favorite_or_nearby_chairs`
>>> which contains the queryset of chairs that I desrcibed, prefetched.
>>>
>>>
>>>  Thanks,
>>> Ram.
>>>
>>> On Wed, Feb 25, 2015 at 11:18 PM, James Schneider 
>>> wrote:
>>>
>>>>  I assume that you are talking about the select_related() and
>>>> prefetch_related() queryset methods?
>>>>
>>>>  https://docs.djangoproject.com/en/1.7/ref/models/
>>>> querysets/#select-related
>>>> https://docs.djangoproject.com/en/1.7/ref/models/
>>>> querysets/#prefetch-related
>>>>
>>>>  Both of those sections have excellent examples, and detail what the
>>>> differences are (primarily joins vs. separate queries, respectively).
>>>>
>>>>  For better help, you'll need to go into more detail about the queries
>>>> you are trying to make, what you've tried (with code examples if possible),
>>>> and the results/errors you are seeing.
>>>>
>>>>  In general, I would try to get an initial queryset working and
>>>> gathering the correct results first before looking at optimizations such as
>>>> select_related(). Any sort of pre-fetching will only confuse the situation
>>>> if the base queryset is incorrect.
>>>>
>>>>  -James
>>>>
>>>> On Wed, Feb 25, 2015 at 12:05 PM, cool-RR  wrote:
>>>>
>>>>> Hi guys,
>>>>>
>>>>>  I'm trying to solve a problem using the new `Prefetch` but I can't
>>>>> figure out how to use it.
>>>>>
>>>>>  I have these models:
>>>>>
&g

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 seats be part of multiple trains?
>
> Is there a reason you defined a ManyToMany from Train to Seat instead of a
> ForeignKey from Seat to Train?
>
> If your schema was defined as the latter the following could probably work
> (given you only want the first Seat of each Train object):
>
> trains =
> Train.objects.prefetch_related(first_seats=Seat.objects.order_by('train',
> 'order').distinct('train'))
> for train in trains:
> first_seat = train.first_seats[0]
>
> Else given you've explicitly defined a TrainSeat model to handle the
> through relationship to store the order:
>
> class TrainSeat(models.Model):
> train = models.ForeignKey(Train, related_name='train_seats')
> seat = models.ForeignKey(Seat)
> order = models.PositiveIntegerField()
>
> trains =
> Train.objects.prefetch_related(first_train_seats=Prefetch('train_seats',
> TrainSeat.objects.select_related('seat').order_by('train',
> 'order').distinct('train'))
> for train in trains:
> first_seat = train.first_train_seats[0].seat
>
> Hope it helps.
>
> Simon
>
> Le lundi 2 mars 2015 17:23:29 UTC-5, cool-RR a écrit :
>>
>> Hi,
>>
>> Say that I have a model Train and it has a ManyToMany to model Seat. I'm
>> looking at a queryset of Train and I want to do a prefetch_related on it,
>> but I don't want to get all the Seat objects; I want only the first Seat
>> object for each Train object.  Is this possible with prefetch_related
>> and/or Prefetch? How?
>>
>> To clarify: My goal here is to save on querysets while still being able
>> to retrieve the first Seat object in each `train.seats`.
>>
>>
>> Thanks,
>> Ram.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/-wwfdhi0qXU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b3fcf574-9024-46f9-9499-c6e67d2e3a4b%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVbDj%2B0tqufFoj37aZ8m%3Do59y6%2BM2vxT%3DQxEWRvTAL403Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/ZgStwyheqn4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b1240d02-cca8-46dd-8326-2550468e0a78%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVbp94Y7kRVncFGzu_cOqcXu%2B2DybgkkvFCzXkYz-vACHw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 block.
> >
> > Anything else?
> >
>
> If you are truly interested, look at the source for
> django/template/defaulttags.py.
>
> Start by looking at calls to parser.parse(..), eg for the ifequal tag:
>
> def do_ifequal(parser, token, negate):
> bits = list(token.split_contents())
> if len(bits) != 3:
> raise TemplateSyntaxError("%r takes two arguments" % bits[0])
> end_tag = 'end' + bits[0]
> nodelist_true = parser.parse(('else', end_tag))
> token = parser.next_token()
> if token.contents == 'else':
> nodelist_false = parser.parse((end_tag,))
> parser.delete_first_token()
> else:
> nodelist_false = NodeList()
> val1 = parser.compile_filter(bits[1])
> val2 = parser.compile_filter(bits[2])
> return IfEqualNode(val1, val2, nodelist_true, nodelist_false, negate)
>
> This, plus some investigation, should give you what you want.
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/ZgStwyheqn4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFHbX1KgdA4Wp83%3D4Ypud%2BGqNbULEMk6_1BHzYkAVs46EwTe9A%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVaoY06DE5WPQBezxLJW%3DryyO%3DczqNG9rsxntiO9mM01KQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>>
>> Hi,
>>
>> How do I control the admin ManyToManyField widget with the keyboard?
>>
>>
>> Thanks,
>> Ram.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVa8OiZ1GnNQiCET-rtW4q44oMpbJW3MYAErrY1hgLG-yg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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
> chromium, and it is a known bug/non-implementation:
>
> http://code.google.com/p/chromium/issues/detail?id=90172
>
>
> On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>
>> 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 Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:

 Hi,

  How do I control the admin ManyToManyField widget with the keyboard?


 Thanks,
 Ram.

>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/django-users/VxFrne7x92E/unsubscribe.
>>>  To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>>
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%
>>> 40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVZQC34oGdVvgBJ9P1qzbvZJhC34BB_KKma69Jp3A-MP6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 as a
> select-multiple html widget - is that what we are talking about?
>
> The action that I described in my first message to select multiple
> elements in a select-multiple widget works in Firefox, Opera, and with a
> modifier in IE. It does not work in Chromium as indicated by the issue I
> linked to in the last message.
>
> Please let me know if I am missing something in your question.
>
> Regards,
> ~CK
>
>
> On Wednesday, February 26, 2014 3:48:25 PM UTC-6, cool-RR wrote:
>
>> 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 chromium, and it is a known bug/non-implementation:
>>>
>>> http://code.google.com/p/chromium/issues/detail?id=90172
>>>
>>>
>>> On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>>>
 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 Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>>
>> Hi,
>>
>>  How do I control the admin ManyToManyField widget with the keyboard?
>>
>>
>> Thanks,
>> Ram.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/django-users/VxFrne7x92E/unsubscribe.
>  To unsubscribe from this group and all its topics, send an email to
> django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
>
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40goog
> legroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/django-users/VxFrne7x92E/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%
>>> 40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6f425681-d3ec-45c4-9157-32047554d759%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVb7D6Vyn2B2cgC26c5%3DdQ-378NMiHR6s-u072iNPaVZOg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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.ModelAdmin.filter_horizontal),
> it is not the standard admin ManyToMany widget. I just tested it in user
> permissions. I just got it to work by selecting(multiple) elements in one
> widget, tabbing to the move arrow, and clicking enter.
> Maybe that will work for you?
>
> Regards,
> ~CK
>
> On Wednesday, February 26, 2014 4:03:41 PM UTC-6, cool-RR wrote:
>
>> 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 as a
>>> select-multiple html widget - is that what we are talking about?
>>>
>>> The action that I described in my first message to select multiple
>>> elements in a select-multiple widget works in Firefox, Opera, and with a
>>> modifier in IE. It does not work in Chromium as indicated by the issue I
>>> linked to in the last message.
>>>
>>> Please let me know if I am missing something in your question.
>>>
>>> Regards,
>>> ~CK
>>>
>>>
>>> On Wednesday, February 26, 2014 3:48:25 PM UTC-6, cool-RR wrote:
>>>
 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 chromium, and it is a known bug/non-implementation:
>
> http://code.google.com/p/chromium/issues/detail?id=90172
>
>
> On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>
>> 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 Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:

 Hi,

  How do I control the admin ManyToManyField widget with the
 keyboard?


 Thanks,
 Ram.

>>>  --
>>> You received this message because you are subscribed to a topic in
>>> the Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/django-users/VxFrne7x92E/unsubscribe.
>>>  To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>>
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/f8d87dca-9ee6
>>> -44f3-b9bc-da7eef05fccc%40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%40goog
> legroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/django-users/VxFrne7x92E/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/6f425681-d3ec-45c4-9157-32047554d759%
>>> 40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed

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.filter(name__iendswith='t')
> print a.count()   print
> b.count()
>
>
> c = a & b print
> c.count()
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/SHT4Fka0uwQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAOzwKwE8d%3DJNaP%3DLzsCwYQOvpkGOvumU0mCNv7sOZ0jKhyvw8Q%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVaiTjsHS3rpnYEbVS6_w7YQzH45n3aS2cmDOk8fGnyEpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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, Shawn Milochik wrote:
>
>> It seems to work for me:
>>
>> a = Client.objects.filter(name__istartswith='a')   b =
>> Client.objects.filter(name__iendswith='t')
>> print a.count()   print
>> b.count()
>>
>>
>> c = a & b print
>> c.count()
>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/SHT4Fka0uwQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAOzwKwE8d%3DJNaP%3DLzsCwYQOvpkGOvumU0mCNv7sOZ0jKhyvw8Q%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAOzwKwE8d%3DJNaP%3DLzsCwYQOvpkGOvumU0mCNv7sOZ0jKhyvw8Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVbURmS9Cvb2uZUpcXSMd9Hqkwuk9Dm7RvdTbfDrG3aBKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 Django; the implementation
> dates all the way back to 0.95.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/SHT4Fka0uwQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL13Cg-gDwDCW5oB1jeeaGrMBNGrCGST0TMiwDh2idC317THMQ%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVb%2BJCkJ7eonuZCfbkO7BMgWhwcam%2BeP-5x5yc_LSSpX-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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, 1 Apr 2020, 11:25 am cool-RR,  wrote:
>
>> Hi guys,
>>
>> I'm trying to optimize our Django testing workflow.
>>
>> We have 7 different databases, and Django spends a lot of time on these
>> lines:
>>
>>
>> Creating test database for alias 'main_database'...
>> Creating test database for alias 'foo_database'...
>> Creating test database for alias 'bar_database'...
>> Creating test database for alias 'baz_database'...
>>
>>
>> This is especially annoying when you're running just one test, but have
>> to wait 1:30 minutes just for these test databases.
>>
>> *Is there any way to speed this up? *Either by parallelizing it or in
>> any other way. A few months ago I tried some naive code that parallelizes
>> these actions, but it failed. (Unfortunately I don't have the error message
>> saved.)
>>
>>
>> Thanks,
>> Ram.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/6619ce10-6a0e-4fde-8d2c-fb81e6e2bd2c%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/-djWwBB5xac/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-c9dGVSG69K%3DNN3GUuVDrAGacLijQeDD6ZFUU3LXNPL3Q%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVZdXOhz1G2ja%2B0MPxE9USfU-6UhROufy%2BHVVTc-GYhZDA%40mail.gmail.com.


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 more manageable size. Or have
> two sets; abbreviated and full, with the larger one to exercise your
> (unknown) edge cases.
>
> hth
>
> - Tom
>
> On Apr 1, 2020, at 2:25 AM, cool-RR  wrote:
>
> Hi guys,
>
> I'm trying to optimize our Django testing workflow.
>
> We have 7 different databases, and Django spends a lot of time on these
> lines:
>
>
> Creating test database for alias 'main_database'...
> Creating test database for alias 'foo_database'...
> Creating test database for alias 'bar_database'...
> Creating test database for alias 'baz_database'...
>
>
> This is especially annoying when you're running just one test, but have to
> wait 1:30 minutes just for these test databases.
>
> *Is there any way to speed this up? *Either by parallelizing it or in any
> other way. A few months ago I tried some naive code that parallelizes these
> actions, but it failed. (Unfortunately I don't have the error message
> saved.)
>
>
> Thanks,
> Ram.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6619ce10-6a0e-4fde-8d2c-fb81e6e2bd2c%40googlegroups.com
> 
> .
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/-djWwBB5xac/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/43DDD6E9-EAA8-4162-BDB3-665F3CCA00E0%40gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVaX%2B737m4G-pXtvhvor00fD-3yknvCc%3DngnThZL0Jz5Bw%40mail.gmail.com.