i am try to run some piece of code when starting an apache server or django development server. I am using the AppConfig class to do this..(following the docs). But while starting the server i am get the following error.
django.core.exceptions.ImproperlyConfigured: '{app_name}.apps.MyAppConfig' must supply a name attribute.
following is the sample code:
from django.apps import AppConfig
class MyAppConfig(AppConfig):
def ready():
#my stuff
I don't have any idea about the error.