Test fixtures loaded ~100 times faster by overwriting BaseDatabaseCreation.create_test_db + question

2010-01-14 Thread Piotr Czachur
Guys, I was really unhappy to see how slow fixtures are loaded before every test. I'm not talking about initial_data stuff that is loaded just in beginning, and then reset by rollback. Fixtures used for unit tests are loaded on demand (fixtures = [f1, f2]), and this is really slow, because thousand

Re: Fixtures and multi-table inheritance

2009-12-04 Thread Piotr Czachur
To be more specific I created sample application called "animal": ### mypro/animal/models.py from django.db import models class Animal(models.Model): name = models.CharField(max_length=30, primary_key=True) class Cat(Animal): tail_length = models.DecimalField(max_digits=4, decimal_places=2)

Fixtures and multi-table inheritance

2009-12-03 Thread Piotr Czachur
I got two models in myapp: ### myapp/models.py class Animal(models.Model): name = models.CharField() class Cat(Animal): tail_length = models.DecimalField() ### This is Django multi-table inheritance, so both models have its tables in database in one-to-one relation. Is it possible to provi

Re: Application auth and storing user in request.

2009-11-24 Thread Piotr Czachur
On 24 Lis, 10:05, Piotr Czachur wrote: > Hi! > > Why in auth middleware, user is assigned to request.__class__.user, > but in auth context processor it's read from request.user ? Isn't it > inconsistent? I've found answer here: answer http://stackoverflow.com/ques

Application auth and storing user in request.

2009-11-24 Thread Piotr Czachur
Hi! Why in auth middleware, user is assigned to request.__class__.user, but in auth context processor it's read from request.user ? Isn't it inconsistent? Cheers, Piotrek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s