Sunday, April 22, 2012

Re: Testing an app without a models.py file

On Sat, Apr 21, 2012 at 10:25:20PM -0700, dor wrote:
> As of the latest version (1.4), this is impossible. What's the
> rationale behind it? Why isn't it fixed by now? If I make a fix,
> will it be accepted by the official team?

It is caused by the way Django loads and registers apps. Currently it
depends on each app having a models module. If I understand correctly,
the app loading refactor efforts [1] that have been around for a few
years now should fix this, among other things. The problem is, it is
quite a big change and it is not yet quite ready for merge.

You are welcome to check it out and do some testing, though, to help
it move forward.

In the meantime, I guess you'll have to keep adding empty models.py
files into such apps.

Michal


[1] https://code.djangoproject.com/ticket/3591

No comments:

Post a Comment