Re: app_get_config(app_label).path as only way to get an app's path

2019-11-11 Thread Christian González
>  if there are more than one packages with the same label? > > Two apps cannot have the same label. One of them must be relabeled as > described > in  > https://docs.djangoproject.com/en/2.2/ref/applications/#django.apps.AppConfig.label. OMG. Are in great advantage - those who can read. > > If a

Re: app_get_config(app_label).path as only way to get an app's path

2019-11-11 Thread Aymeric Augustin
Hello Christian, > if there are more than one packages with the same label? Two apps cannot have the same label. One of them must be relabeled as described in https://docs.djangoproject.com/en/2.2/ref/applications/#django.apps.AppConfig.label

app_get_config(app_label).path as only way to get an app's path

2019-11-10 Thread Christian González
Hi all, I recently found a problem - maybe I didn't get everything, but the docs say that, if you want to get an app's path, you should use get_app_config(app_label).path. Now, passing the app_label is handy if you have few packages installed, but it comes to name clashes if there are multiple pa