Importing models in app config module

49 views
Skip to first unread message

Torsten Bronger

unread,
Oct 23, 2014, 11:12:23 AM10/23/14
to django...@googlegroups.com
Hallöchen!

https://docs.djangoproject.com/en/dev/ref/applications/ says:

You cannot import models in modules that define application
configuration classes, but you can use get_model() to access a
model class by name, like this:

Does this also apply to models of other apps? In particular, I need
import django.contrib.auth.models in my ready() method. Importing
it seems to work. So is this the way to go?

Tschö,
Torsten.

--
Torsten Bronger Jabber ID: torsten...@jabber.rwth-aachen.de
or http://bronger-jmp.appspot.com

Collin Anderson

unread,
Oct 24, 2014, 8:29:11 AM10/24/14
to django...@googlegroups.com
Hi Torsten,

I believe that's ok.

Collin

Reply all
Reply to author
Forward
0 new messages