Creating test databases in parallel

2020-04-01 Thread cool-RR
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

Prefetching a single item

2015-03-02 Thread cool-RR
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

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

2015-02-26 Thread cool-RR
, >>> 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 confus

Can the new `Prefetch` solve my problem?

2015-02-25 Thread cool-RR
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',

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

2014-03-16 Thread cool-RR
Hi everyone, I understand that there's no way to get the intersection of two querysets in Django. Whenever I need to get the intersection of two querysets, I need to refactor my code to get pure Qs for those querysets and intersect those. This can be annoying sometimes. My question: Is there

Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread cool-RR
Hi, How do I control the admin ManyToManyField widget with the keyboard? 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

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

2014-02-13 Thread cool-RR
Hi guys, Can someone please give me a list of default Django template tags that have "mid-block" behavior like `else`? I mean tags where instead of simply having a start tag and an end tag, you have an optional tag in the middle that divides the whole thing to blocks. I can think of: if

Djangocon videos

2013-10-21 Thread cool-RR
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? Thanks, Ram. -- You received this message

Changing SECRET_KEY for a project that was already launched

2013-03-06 Thread cool-RR
Hi guys, I have a project online whose SECRET_KEY was compromised. I obviously want to change it. Would anything bad happen if I change it? Would some things not work? Is it safe to just change it? Anything I should do? Thanks, Ram. -- You received this message because you are subscribed to

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

2011-07-26 Thread cool-RR
Hello, How do I change my user password on Django's bug tracker? Thanks, Ram. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Z1HJTz2KIkEJ. To post to

Why is django-registration 0.8 not on PyPI?

2011-05-18 Thread cool-RR
Hey, Does anyone know what's up with django-registration 0.8 not being on PyPI? Ram. -- 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

Re: What is `sys.path` supposed to be?

2010-09-17 Thread cool-RR
On Sep 17, 10:13 am, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On 16 sep, 18:06, cool-RR <ram.rac...@gmail.com> wrote: > > > Hello! > > > There's something that's bothering me: > > > When developing a Django application, what is `sys.pa

What is `sys.path` supposed to be?

2010-09-16 Thread cool-RR
Hello! There's something that's bothering me: When developing a Django application, what is `sys.path` supposed to contain? The directory which contains the project, or the directory of the project, or both? What led me to this question is a failure when using `urlresolvers.reverse`. It's

Re: Is the Django book written in ReST/Sphinx?

2010-06-01 Thread cool-RR
On Mon, May 17, 2010 at 2:00 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Mon, May 17, 2010 at 7:06 AM, cool-RR <ram.rac...@gmail.com> wrote: > > I'm just working on a book for my own project, and I was wondering: Is > > the Django book written in Re

Is the Django book written in ReST/Sphinx?

2010-05-16 Thread cool-RR
I'm just working on a book for my own project, and I was wondering: Is the Django book written in ReST/Sphinx? I am considering whether I should write my book with that. Thanks, Ram. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Making a "Common causes for translation problems"

2010-03-20 Thread cool-RR
. On Sat, Mar 20, 2010 at 8:17 AM, Russell Keith-Magee <freakboy3...@gmail.com > wrote: > On Fri, Mar 19, 2010 at 9:16 PM, cool-RR <ram.rac...@gmail.com> wrote: > > Hello Django community, > > > > I have started compiling a list, "Common causes for translation >

Making a "Common causes for translation problems"

2010-03-19 Thread cool-RR
Hello Django community, I have started compiling a list, "Common causes for translation problems". Where would be a good place to put this list so people who have a problem with their translations will be most likely to encounter it? Ram Rachum. -- You received this message because you are

Re: Forcing HTTPS in admin

2010-03-01 Thread cool-RR
I did the middleware to do this, but I figured that making the admin encrypted would be a common enough task that it should be a builtin option in the admin. So anyway, +1 for that. On Mar 1, 5:21 pm, Malcolm Box wrote: > You could, but doing it on the front-end webserver

Re: Serving https with runserver

2010-03-01 Thread cool-RR
Adnan, I'm really baffled by your response. No, my reasons for using SSL here is not because I'm afraid someone will sniff my data, We are talking here about `runserver`, which is the development server which is never used for production. The goal of `runserver` is to be able to easily test how

Re: Serving https with runserver

2010-02-28 Thread cool-RR
ur normal virtual > host and then use reverse proxy: > >     ProxyPass /http://localhost:8000/ >     ProxyPassReverse /http://localhost:8000/ > > On Feb 28, 5:09 pm, cool-RR <ram.rac...@gmail.com> wrote: > > > > > Why doesn't runserver automatically serve in http

Serving https with runserver

2010-02-28 Thread cool-RR
Why doesn't runserver automatically serve in https as well as http? It would have been useful. Ram. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Forcing HTTPS in admin

2010-02-28 Thread cool-RR
Does `admin` provide a way to force using it through https? I'd want it to simply redirect a user which doesn't use https to the same address, except with https instead of http. Is there something like this built into `admin`? Ram. -- You received this message because you are subscribed to the

A dark color scheme for the admin site

2010-02-14 Thread cool-RR
Hello, Does anyone have a ready-made template with a dark color scheme for the admin site? Ideally I'd want something where the text is light grey and the background is dark grey, but I'd settle for anything light-on-dark. -- You received this message because you are subscribed to the Google

Re: How to set queryset on the second step of a form wizard?

2008-08-22 Thread rr
http://dpaste.com/73317/ I have dpasted it on the link above Cheers Roy On Aug 21, 2:30 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 21, 11:56 am, rr <[EMAIL PROTECTED]> wrote: > > > The url is herehttp://dpaste.com/72961/ > > I don't see anything

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread rr
The url is here http://dpaste.com/72961/ -r On Aug 21, 9:39 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 21, 2:06 am, rr <[EMAIL PROTECTED]> wrote: > > > sorry for being annoying > > > It doesn't work, complains about > > 'ChannelTypeForm

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread rr
sorry for being annoying It doesn't work, complains about 'ChannelTypeForm' object has no attribute 'cleaned_data' when submit on the second step(step1) http://dpaste.com/72840/ -r On Aug 21, 1:51 am, rr <[EMAIL PROTECTED]> wrote: > Don't worry.Formworks now. Thanks a lot. >

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
Don't worry. Form works now. Thanks a lot. But would be great if you can explain it a bit on how your code works and the sequence of how process_steps and get_form works as I see it seems called a few time between steps Thanks =) -r On Aug 21, 1:42 am, rr <[EMAIL PROTECTED]> wrote: >

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
It seems it has been called 3 times when submit in the second step What is the sequence of the call of process_step and get_form? the docs didn't explain much about this Thanks in Advance!! -r On Aug 20, 4:59 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 20, 12:57 pm, rr <[EMAIL

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
Thanks Rajesh But...it doesn't work It complains about form0 doesn't have cleaned_data. I guess form0 = super(MyFormWizard, self).get_form(0, data=data) only gives you a form with no data?! On Aug 20, 11:06 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > Depending onstep1's

How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
Hi Guru, Depending on step 1's selection, I want to set the queryset of one of the fields (a ModelChoiceField) e.g. class StepOneForm(forms.Form): channelType = forms.ModelChoiceField(queryset=ChannelType.objects.all()) class StepTwoForm(forms.Form): channel = forms.ModelChoiceField()