On Tuesday, June 21, 2016 at 2:34:11 PM UTC+2, Aymeric Augustin wrote:
> Regarding database connections, if you weren’t using Django, you’d have to > create a database connection with something like `psycopg2.connect()` and > dispose of it with `connection.close()` when you no longer need it. When > you’re using the Django ORM, database connections are opened automatically > when needed. You still have to close them manually if you aren’t working > within the traditional request-response cycle. > Yes, I'm using ORM. The connections are opening silently in main process/thread. I've tried to close them manually, but I've had some kind of problems (don't remember what kind of), probably with wrapped `close()`. > If the implicit connection establishment is causing trouble, it shouldn’t > be hard to write a custom database backend that doesn’t have this behavior. > Maybe this will help. It's worth trying someday. > Spreading FUD about Django’s supposed unsuitability for non-trivial > projects isn’t going to help with your issues and isn’t going to create a > context where people will look forward to helping you, so please consider > avoiding gratuitous attacks if you need further help. > This not a FUD but the honest advice. And not an attack but statement of a fact. It's nothing personal. There are much more problems with Django used in some kind of projects, especially in long-term projects. I wrote about those many times and almost always I've got two answers: 1) do not upgrade 2) this will not be changed. Oh, and third - "write yourself", and I'm writing and rewriting old good parts of Django and not talking about this (this is only what I can do in that case). But I belive this is a only matter of time. I remember how big was resistance of implementing `model.reload()`. 7 years of talking about that, right? And here we go - it is available from v1.8 as "refresh_from_db()" :) So let's hope for the best :) Marcin -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/559e8fdc-d49c-49c9-b71d-f2d9973ae085%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
