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 packages with the
same label (but different names).

I happen to start a bigger project, and there are some packages
installed like "gdaps.frontend". Maybe one of my plugins later will be
named "medux.frontend". These two have a different name, but the same label.

Ok, I can simply do a

    from medux import frontend
    do_something_with(os.path.dirname(frontend.__file__))

But AppConfig.get_app_config() exactly should exist because I should NOT
do that.

How do I get the path of an app in a deterministic way, if there are
more than one packages with the same label? Is this a bug?

Thanks,

Christian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c8e6e354-7d02-835e-cd62-5d38102bd374%40nerdocs.at.


pEpkey.asc
Description: application/pgp-keys


Re: GitHub Actions

2019-11-10 Thread Mariusz Felisiak


> I would suggest to open a PR to GitHub now and to get the Fellows 
> involved. Ask them how to best integrate a trial without disturbing their 
> workflow. What do you guys think?
>
>
I'm going to play with GitHub actions in this week (or in the next one) but 
I'm still not convinced. It's fine to use them for linters, but for more 
complicated jobs it generates output that is less readable, IMO. You don't 
get a formatted table but a raw output, so you have to scroll down ~20k 
lines to check what went wrong. This can be really frustrating especially 
with more then one failure. Nevertheless I'm going to play with it.

Best
Mariusz


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6692d50f-b02d-4824-aa12-be22a20c3f0f%40googlegroups.com.