ProjectDjango/Project.py

branch
eric7
changeset 203
07abb6af9048
parent 202
b06794ae2a92
child 204
ef2a6680ad2a
equal deleted inserted replaced
202:b06794ae2a92 203:07abb6af9048
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 contextlib
11 import glob
11 import os 12 import os
12 import re 13 import re
13 import shutil 14 import shutil
14 15
15 from PyQt6.QtCore import ( 16 from PyQt6.QtCore import (
2867 2868
2868 dia = DjangoDialog(title, showInput=True, parent=self.__ui) 2869 dia = DjangoDialog(title, showInput=True, parent=self.__ui)
2869 res = dia.startProcess(args, path) 2870 res = dia.startProcess(args, path)
2870 if res: 2871 if res:
2871 dia.exec() 2872 dia.exec()
2873 if not dryRun:
2874 # Append generated migrations only if no dry-run was done.
2875 migrationFiles = glob.glob(
2876 os.path.join(
2877 self.__ericProject.getProjectPath(),
2878 "**/[0-9][0-9][0-9][0-9]*.py"
2879 ),
2880 recursive=True,
2881 )
2882 for migrationFile in migrationFiles:
2883 self.__ericProject.appendFile(migrationFile)
2872 2884
2873 def __squashMigrations(self): 2885 def __squashMigrations(self):
2874 """ 2886 """
2875 Private slot to squash migrations. 2887 Private slot to squash migrations.
2876 """ 2888 """

eric ide

mercurial