Re: manage.py test and uninstalled apps

2015-11-18 Thread Claude Paroz
Hello Aymeric, To be clear, I don't contest in any way that design choice. I understand and approve it. I'm just pointing to this unwanted side-effect, wondering if anyone has ideas how to circumvent it, as I think it's a legitimate use case. I'm also aware that we have not much control over

Re: [Question] Many-To-Many query where only pk is returned

2015-11-18 Thread Josh Smeaton
It might be a bit early in the day for me, but isn't that query already optimised? That is, it's already eliminated a join. It hasn't joined to the "Especialidad" table, it's only joined to the intermediate table. I *think* the join to the intermediate table is necessary because there could be

Re: Feature proposal: selection of views and tables for inspectdb

2015-11-18 Thread Tim Graham
One correction, inspectdb doesn't currently create models for views, but this isn't the first time that code caused confusion, see https://code.djangoproject.com/ticket/25038. I agree that fixing the inspect SQL would be the ideal solution. José, I didn't follow the conversation closely enough

[Question] Many-To-Many query where only pk is returned

2015-11-18 Thread Cristiano Coelho
Hello there, Lets say I have these two models (sorry about the spanish names!) ( Django 1.8.6 and MySQL backend ) class Especialidad(models.Model): nombre = models.CharField(max_length=250, blank=False, unique=True) class Usuario(AbstractBaseUser): permisosEspecialidad =

Re: manage.py test and uninstalled apps

2015-11-18 Thread Aymeric Augustin
Hello Claude, Generally speaking, you cannot safely use a model that isn't defined in an application that is in INSTALLED_APPS. Django raises a warning when you import such a model. This restriction prevents situations where relations between models aren't set up correctly. There’s a string

manage.py test and uninstalled apps

2015-11-18 Thread Claude Paroz
Hello, I have a Django project with different apps and settings. Let's say settings A have A in INSTALLED_APPS but not B, and settings B have B in INSTALLED_APPS but not A. Note also that I cannot have both apps installed, for some reason. In that configuration and from Django 1.9, ./manage.py

Re: django.utils.version.get_version() discrepancy for Python 2 vs. Python 3

2015-11-18 Thread Aymeric Augustin
Considering the information provided by Donald, it’s pretty clear to me that we should switch to rc as proposed by Tim. -- Aymeric. > On 18 nov. 2015, at 01:26, Tim Graham wrote: > > Thanks Donald, updating setuptools was the factor I missed, not Python 2 vs. > 3. >