Django 2.0 Access Models (CREATE/REMOVE/FILTER) Standalone [without manage.py shell]
Django 2.0 Access Models (CREATE/REMOVE/FILTER) Standalone [without manage.py shell] I have a Django project and I wanted to generate some objects (from the models) What I'm trying to get at : Standalone Python Script to create bunch of objects and/or filter,delete. after importing the model with from apps.base.models import MyModel and setting up the configuration as the previous StackOverflow Questions suggested I was not able to run the script. from apps.base.models import MyModel import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myProject.settings") import django django.setup() from apps.base.models import MyModel Please note that this is on Django version 2.0.6 [Django 2.0+] . Correct settings have been used, ( i.e. myProject.settings ) myProject.settings After properly configuring everything else I get the following error: RuntimeError: Model class apps.base.models.MyModel doesn't declare an explicit app_label and isn't in an applicat...