PY-55110: Support Django project creation on targets.

``DjangoProjectCreatorAndConfigurator`` uses ``PythonTask`` which wasn't aware of targets and cast additional data to the legacy remote additional data -> CCE.

It now provides limited support for targets API, although we better get rid of it and migrate to the native targets api.

Merge-request: IJ-MR-94386
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 624fed3ff5e64133e6baa665a4a63bbbe1e0c825
This commit is contained in:
Ilya.Kazakevich
2022-09-13 16:13:21 +00:00
committed by intellij-monorepo-bot
parent 6296e7efee
commit f71071a634
6 changed files with 261 additions and 63 deletions

View File

@@ -142,10 +142,11 @@ public class PythonSdkUtil {
}
public static boolean isRemote(@Nullable String sdkPath) {
return isRemote(findSdkByPath(sdkPath));
}
/**
* Checks if SDK is legacy remote or remote bases on targets.
* Never assume {@link Sdk#getSdkAdditionalData()} has certain type if this method returns true.
* In most cases you are encouraged to obtain additional data and check it explicitly
*/
public static boolean isRemote(@Nullable Sdk sdk) {
return sdk != null && sdk.getSdkAdditionalData() instanceof PyRemoteSdkAdditionalDataMarker;
}