A
A
alex_deerk2016-04-16 20:23:57
Django
alex_deerk, 2016-04-16 20:23:57

What is the apps.py file for in django?

As of Django 1.9, when creating a project, there is an apps.py file in the app folder.
What is it for?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
arctblake, 2016-04-16
@alex_deerk

The most obvious use is to make your own subclass of AppConfig and in the ready method to import some file, for example, signals.py, in which signal handlers are specified. Because if you just stupidly create a signals.py file, then Django will have no idea that such a file exists and that there are handlers

K
kazmiruk, 2016-04-16
@kazmiruk

https://docs.djangoproject.com/en/dev/ref/applicat...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question