Re: admin outperforms my view, why?

2009-03-09 Thread rtelep
Oh yeah, Transactions. django.db.transaction.commit_on_success http://docs.djangoproject.com/en/dev/topics/db/transactions/?from=olddocs#django-db-transaction-commit-on-success --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

admin outperforms my view, why?

2009-03-06 Thread rtelep
I've got a model with a FileField which accepts a csv file. In the save method on the model there's some code which creates or deletes a bunch of other objects based on data in the csv file. This happens post-save. When I upload the csv file through the admin the subsequent object creation is q

Re: Finding all Named URLs

2009-01-26 Thread rtelep
> sufficiently useful to add to the maintenance load of core. Sadly, > people asking about this type of thing frequently omit the use-case. My bad. I was thinking of testing. Run through all the URLs with the test client, look for anything funny... --~--~-~--~~~-

Finding all Named URLs

2009-01-26 Thread rtelep
I'm looking for a way to get a list of all named URLs in a given URLconf, including all "included" URLconfs. I have made one, but it's ridiculous. The fact that I imagine it makes me believe that it exists: >>> get_named_urls() ['home','login','logout','foo'...] --~--~-~--~~-

models.FileField and InMemoryUploadedFile

2008-12-11 Thread rtelep
I have a model Foo with an ImageField. I want to create new Foo object from request.FILES and POST from inside a view function. Ordinarily I would bind a form to request.FILES and request.POST to get that data: form = FooForm(request.FILES, request.POST) But I cannot do that in this case (circ