PostgreSQL Partial Indexes package

2017-10-07 Thread Mattias Linnap
Hi django-developers, I have written a package that implements PostgreSQL and SQLite partial indexes on top of the new class-based indexes: https://github.com/mattiaslinnap/django-partial-index The most common use case is partial unique constraints, but I have a few projects where non-unique pa

Re: Feedback on improving GeoDjango docs

2016-04-04 Thread Mattias Linnap
Great to hear, GeoDjango documentation has always seemed half-finished to me, and only useful to people who are already familiar with GIS terminology. Based on my impressions from various forum posts over the years, beginners who are looking at GeoDjango: * Have never heard about OGC geometries,

Re: Configurable safety options for high performance Django systems

2014-11-24 Thread Mattias Linnap
Since your use case seems to be "avoid blocking the server when one pageview uses unexpectedly many resources", and you don't want to fix or optimise the actual application code, why not set these limits at a level where it makes sense? For example: * http://uwsgi-docs.readthedocs.org/en/latest

Re: Configurable safety options for high performance Django systems

2014-11-23 Thread Mattias Linnap
I thought I'd chime in since I run a Django app with fairly large tables (1M, 30M, 120M rows) on a fairly poor VPS (4GB ram, 2 cores, database and all services on one machine). I just don't see a situation where "safety limits on ORM queries" would improve things. Changing behaviour based on th

Re: 1.8 release planning

2014-10-23 Thread Mattias Linnap
My impression from the 1.7 release schedule was that there were many release blockers found in RC stage, and RC with known bugs released because of three combined reasons: * The release had a number of big new features, including app loading and migrations. * In alpha and beta stages, the tester

Re: What are the best reasons for when and why people should use Django?

2014-08-09 Thread Mattias Linnap
I'm not sure it's possible to make a case for Django vs. Rails on anything but personal preference. But it might be easier to argue why *Python* is a good language to learn, and therefore Django is the obvious web framework to use. For a very wide range of use cases, Python tends to be the secon

Re: Modify get_or_create() to use field lookups parameters for values

2014-07-26 Thread Mattias Linnap
One way to make it work in presence of field lookups would be to demand that the full values of mandatory fields must be present in the defaults dictionary. For example: Model.objects.get_or_create(name_iexact='hello', defaults={'name': 'Hello', 'slug': 'foo'}) or Model.objects.get_or_create(p