import django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
django.setup()
from django.apps import AppConfig


class MainAppConfig(AppConfig):
    name = 'main_app'

def ready(self):
    from actstream import registry
registry.register(self.get_model('Car'))
Django-activity-stream : Apps aren't loaded yet