5 |
5 |
6 """ |
6 """ |
7 Module implementing the Django project support. |
7 Module implementing the Django project support. |
8 """ |
8 """ |
9 |
9 |
|
10 import contextlib |
10 import os |
11 import os |
11 import re |
12 import re |
12 import shutil |
13 import shutil |
13 import contextlib |
|
14 |
14 |
15 from PyQt6.QtCore import QObject, QTimer, QUrl, QFileInfo, QIODeviceBase |
15 from PyQt6.QtCore import QObject, QTimer, QUrl, QFileInfo, QIODeviceBase |
16 from PyQt6.QtGui import QDesktopServices |
16 from PyQt6.QtGui import QDesktopServices |
17 from PyQt6.QtWidgets import QMenu, QInputDialog, QLineEdit, QDialog |
17 from PyQt6.QtWidgets import QMenu, QInputDialog, QLineEdit, QDialog |
18 from PyQt6.QtCore import QProcess as QProcessPyQt |
18 from PyQt6.QtCore import QProcess as QProcessPyQt |
19 |
19 |
20 from EricWidgets.EricApplication import ericApp |
20 from eric7 import Preferences, Utilities |
21 from EricWidgets import EricMessageBox, EricFileDialog |
21 |
22 from EricGui.EricAction import EricAction |
22 try: |
23 |
23 from eric7.EricGui import EricPixmapCache |
24 from Globals import isWindowsPlatform |
24 except ImportError: |
|
25 from UI import PixmapCache as EricPixmapCache |
|
26 from eric7.EricGui.EricAction import EricAction |
|
27 from eric7.EricWidgets import EricMessageBox, EricFileDialog |
|
28 from eric7.EricWidgets.EricApplication import ericApp |
|
29 from eric7.Globals import isWindowsPlatform |
25 |
30 |
26 from .DjangoDialog import DjangoDialog |
31 from .DjangoDialog import DjangoDialog |
27 |
|
28 import Preferences |
|
29 import Utilities |
|
30 import UI.PixmapCache |
|
31 |
32 |
32 |
33 |
33 class DjangoNoSiteSelectedError(Exception): |
34 class DjangoNoSiteSelectedError(Exception): |
34 """ |
35 """ |
35 Exception thrown to signal, that there is no current site. |
36 Exception thrown to signal, that there is no current site. |
1580 ).format(version, url), |
1581 ).format(version, url), |
1581 modal=True, |
1582 modal=True, |
1582 buttons=EricMessageBox.Ok, |
1583 buttons=EricMessageBox.Ok, |
1583 ) |
1584 ) |
1584 msgBox.setIconPixmap( |
1585 msgBox.setIconPixmap( |
1585 UI.PixmapCache.getPixmap( |
1586 EricPixmapCache.getPixmap( |
1586 os.path.join( |
1587 os.path.join( |
1587 "ProjectDjango", "icons", "django64-{0}".format(self.__iconSuffix) |
1588 "ProjectDjango", "icons", "django64-{0}".format(self.__iconSuffix) |
1588 ) |
1589 ) |
1589 ) |
1590 ) |
1590 ) |
1591 ) |