Plugin_Project_Django.ProjectDjango.Project

Module implementing the Django project support.

Global Attributes

None

Classes

DjangoNoSiteSelectedException Exception thrown to signal, that there is no current site.
Project Class implementing the Django project support.

Functions

None


DjangoNoSiteSelectedException

Exception thrown to signal, that there is no current site.

Derived from

Exception

Class Attributes

None

Methods

None
Up


Project

Class implementing the Django project support.

Derived from

QObject

Class Attributes

RecentApplicationsKey

Methods

Project Constructor
__adminIndex Private slot to print the admin-index template snippet.
__cleanup Private slot to clean out old data from the database.
__createApplication Private slot to create a new Django application.
__createCacheTables Private slot to create the tables for the SQL caching backend.
__createProject Private slot to create a new Django project.
__databaseFlush Private slot to return all database tables to the state just after their installation.
__databaseInspect Private slot to introspect the database and output a Django model module.
__databaseReset Private slot to reset the database tables of one or more applications.
__databaseSqlCreateEverything Private slot to print the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for one or more applications.
__databaseSqlCreateIndexes Private slot to print the CREATE INDEX SQL statements for one or more applications.
__databaseSqlCreateTables Private slot to print the CREATE TABLE SQL statements for one or more applications.
__databaseSqlCustom Private slot to print the custom table modifying SQL statements for one or more applications.
__databaseSqlDropTables Private slot to print the DROP TABLE SQL statements for one or more applications.
__databaseSqlFlushDatabase Private slot to print a list of statements to return all database tables to their initial state.
__databaseSqlResetApplication Private slot to print the DROP TABLE SQL, then the CREATE TABLE SQL for one or more applications.
__databaseSqlResetSequences Private slot to print the SQL statements for resetting sequences for one or more applications.
__databaseSynchronize Private slot to synchronize the database.
__diffSettings Private slot to show the changes made to the settings.py file.
__djangoInfo Private slot to show some info about Django.
__dumpData Private slot to dump the database data to a fixture.
__findSites Private method to determine the relative path to all manage.py scripts.
__getApplications Private method to ask the user for a list of application names.
__getLocale Private method to extract the locale out of a file name.
__getPythonExecutable Private method to determine the name of the Python executable.
__initDatabaseActions Private method to define the database related actions.
__initDatabaseMenu Private slot to initialize the database menu.
__initDatabaseSqlActions Private method to define the database SQL related actions.
__initDatabaseSqlMenu Private slot to initialize the database SQL submenu.
__initTestingActions Private method to define the testing actions.
__initTestingMenu Private slot to initialize the testing menu.
__initToolsActions Private method to define the tool actions.
__initToolsMenu Private slot to initialize the tools menu.
__loadData Private slot to load data from fixture files.
__loadRecentApplications Private method to load the recently used applications list.
__normalizeList Private method to normalize a list of file names.
__projectLanguageAdded Private slot handling the addition of a new language.
__runBrowser Private slot to start the default web browser with the server URL.
__runDatabaseClient Private slot to start a database client for a Django project.
__runPythonShell Private slot to start a Python console for a Django project.
__runServer Private slot to start the Django Web server.
__runTestServer Private slot to run a development server with data from a set of fixtures.
__runTestSuite Private slot to run the test suite for applications or the whole site.
__saveRecentApplications Private method to save the list of recently used applications list.
__selectSite Private method to select a site to work with.
__serverProcFinished Private slot connected to the finished signal.
__setCurrentSite Private slot to set the current site.
__showHelpIndex Private slot to show the help index page.
__site Private method to get the name of the current site.
__siteFilteredList Private method to filter a list of file names by site.
__sitePath Private method to calculate the full path of the Django site.
__sqlCommand Private method to perform an SQL creation function.
__startGlobalApplication Private slot to start a new global Django application.
__startLocalApplication Private slot to start a new local Django application.
__startProject Private slot to start a new Django project.
__testServerProcFinished Private slot connected to the finished signal of the test server.
__validate Private slot to validate all installed models.
compileCatalogs Public method to compile the message catalogs.
compileSelectedCatalogs Public method to update the message catalogs.
getDjangoVersion Public method to get the Django version.
getProjectPath Public method to get the path of the eric4 project.
getRecentApplications Public method to get the list of recent applications.
initActions Public method to define the Django actions.
initMenu Public slot to initialize the Django menu.
newForm Public method to create a new form.
projectClosed Public method to handle the closing of a project.
projectClosedHooks Public method to remove our hook methods.
projectOpenedHooks Public method to add our hook methods.
setMostRecentApplication Public method to set the most recently used applications entry.
startProjectOrApplication Public slot to start a new Django project or application.
updateCatalogs Public method to update the message catalogs.
updateSelectedCatalogs Public method to update the message catalogs.

Project (Constructor)

Project(plugin, parent = None)

Constructor

plugin
reference to the plugin object
parent
parent (QObject)

Project.__adminIndex

__adminIndex()

Private slot to print the admin-index template snippet.

Project.__cleanup

__cleanup()

Private slot to clean out old data from the database.

Project.__createApplication

__createApplication(applName, path, isGlobal = True)

Private slot to create a new Django application.

applName
name of the new application (string or QString)
path
the directory where the application should be created (string or QString)
isGlobal
flag indicating a standalone Django application (boolean)
Returns:
flag indicating a successful creation (boolean)

Project.__createCacheTables

__createCacheTables()

Private slot to create the tables for the SQL caching backend.

Project.__createProject

__createProject(projectName, path)

Private slot to create a new Django project.

projectName
name of the new project (string or QString)
path
the directory where the project should be created (string or QString)
Returns:
flag indicating a successful creation (boolean)

Project.__databaseFlush

__databaseFlush()

Private slot to return all database tables to the state just after their installation.

Project.__databaseInspect

__databaseInspect()

Private slot to introspect the database and output a Django model module.

Project.__databaseReset

__databaseReset()

Private slot to reset the database tables of one or more applications.

Project.__databaseSqlCreateEverything

__databaseSqlCreateEverything()

Private slot to print the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for one or more applications.

Project.__databaseSqlCreateIndexes

__databaseSqlCreateIndexes()

Private slot to print the CREATE INDEX SQL statements for one or more applications.

Project.__databaseSqlCreateTables

__databaseSqlCreateTables()

Private slot to print the CREATE TABLE SQL statements for one or more applications.

Project.__databaseSqlCustom

__databaseSqlCustom()

Private slot to print the custom table modifying SQL statements for one or more applications.

Project.__databaseSqlDropTables

__databaseSqlDropTables()

Private slot to print the DROP TABLE SQL statements for one or more applications.

Project.__databaseSqlFlushDatabase

__databaseSqlFlushDatabase()

Private slot to print a list of statements to return all database tables to their initial state.

Project.__databaseSqlResetApplication

__databaseSqlResetApplication()

Private slot to print the DROP TABLE SQL, then the CREATE TABLE SQL for one or more applications.

Project.__databaseSqlResetSequences

__databaseSqlResetSequences()

Private slot to print the SQL statements for resetting sequences for one or more applications.

Project.__databaseSynchronize

__databaseSynchronize()

Private slot to synchronize the database.

Project.__diffSettings

__diffSettings()

Private slot to show the changes made to the settings.py file.

Project.__djangoInfo

__djangoInfo()

Private slot to show some info about Django.

Project.__dumpData

__dumpData()

Private slot to dump the database data to a fixture.

Project.__findSites

__findSites()

Private method to determine the relative path to all manage.py scripts.

Returns:
list of sites (QStringList)

Project.__getApplications

__getApplications()

Private method to ask the user for a list of application names.

Returns:
list of application names (QStringList)

Project.__getLocale

__getLocale(filename)

Private method to extract the locale out of a file name.

filename
name of the file used for extraction (string or QString)
Returns:
extracted locale (string) or None

Project.__getPythonExecutable

__getPythonExecutable()

Private method to determine the name of the Python executable.

Returns:
Python executable (string)

Project.__initDatabaseActions

__initDatabaseActions()

Private method to define the database related actions.

Project.__initDatabaseMenu

__initDatabaseMenu()

Private slot to initialize the database menu.

Returns:
the menu generated (QMenu)

Project.__initDatabaseSqlActions

__initDatabaseSqlActions()

Private method to define the database SQL related actions.

Project.__initDatabaseSqlMenu

__initDatabaseSqlMenu()

Private slot to initialize the database SQL submenu.

Returns:
the menu generated (QMenu)

Project.__initTestingActions

__initTestingActions()

Private method to define the testing actions.

Project.__initTestingMenu

__initTestingMenu()

Private slot to initialize the testing menu.

Returns:
the menu generated (QMenu)

Project.__initToolsActions

__initToolsActions()

Private method to define the tool actions.

Project.__initToolsMenu

__initToolsMenu()

Private slot to initialize the tools menu.

Returns:
the menu generated (QMenu)

Project.__loadData

__loadData()

Private slot to load data from fixture files.

Project.__loadRecentApplications

__loadRecentApplications()

Private method to load the recently used applications list.

Project.__normalizeList

__normalizeList(filenames)

Private method to normalize a list of file names.

filenames
list of file names to normalize (list of string or QString)
Returns:
normalized file names (list of string)

Project.__projectLanguageAdded

__projectLanguageAdded(code)

Private slot handling the addition of a new language.

code
language code of the new language (string or QString)

Project.__runBrowser

__runBrowser()

Private slot to start the default web browser with the server URL.

Project.__runDatabaseClient

__runDatabaseClient()

Private slot to start a database client for a Django project.

Project.__runPythonShell

__runPythonShell()

Private slot to start a Python console for a Django project.

Project.__runServer

__runServer()

Private slot to start the Django Web server.

Project.__runTestServer

__runTestServer()

Private slot to run a development server with data from a set of fixtures.

Project.__runTestSuite

__runTestSuite()

Private slot to run the test suite for applications or the whole site.

Project.__saveRecentApplications

__saveRecentApplications()

Private method to save the list of recently used applications list.

Project.__selectSite

__selectSite()

Private method to select a site to work with.

Returns:
selected site (QString)

Project.__serverProcFinished

__serverProcFinished()

Private slot connected to the finished signal.

Project.__setCurrentSite

__setCurrentSite(site)

Private slot to set the current site.

site
name of the site (string or QString)

Project.__showHelpIndex

__showHelpIndex()

Private slot to show the help index page.

Project.__site

__site()

Private method to get the name of the current site.

Returns:
name of the site (string)
Raises DjangoNoSiteSelectedException:
raised, if no site is selected

Project.__siteFilteredList

__siteFilteredList(filenames)

Private method to filter a list of file names by site.

filenames
list of file names to be filtered (list of string or QString)
Returns:
file names belonging to the current site (list of string)

Project.__sitePath

__sitePath()

Private method to calculate the full path of the Django site.

Returns:
path of the site (string)
Raises DjangoNoSiteSelectedException:
raised, if no site is selected

Project.__sqlCommand

__sqlCommand(title, command, requestApps = True)

Private method to perform an SQL creation function.

title
dialog title (string or QString)
command
Django sql... command (string or QString)
requestApps
flag indicating to request a list of applications to work on (boolean)

Project.__startGlobalApplication

__startGlobalApplication()

Private slot to start a new global Django application.

Project.__startLocalApplication

__startLocalApplication()

Private slot to start a new local Django application.

Project.__startProject

__startProject()

Private slot to start a new Django project.

Project.__testServerProcFinished

__testServerProcFinished()

Private slot connected to the finished signal of the test server.

Project.__validate

__validate()

Private slot to validate all installed models.

Project.compileCatalogs

compileCatalogs(filenames)

Public method to compile the message catalogs.

filenames
list of filenames (not used)

Project.compileSelectedCatalogs

compileSelectedCatalogs(filenames)

Public method to update the message catalogs.

filenames
list of filenames

Project.getDjangoVersion

getDjangoVersion()

Public method to get the Django version.

Returns:
Django version as a tuple

Project.getProjectPath

getProjectPath()

Public method to get the path of the eric4 project.

Returns:
path of the eric4 project (string)

Project.getRecentApplications

getRecentApplications()

Public method to get the list of recent applications.

Returns:
list of recent applications entries (QStringList)

Project.initActions

initActions()

Public method to define the Django actions.

Project.initMenu

initMenu()

Public slot to initialize the Django menu.

Returns:
the menu generated (QMenu)

Project.newForm

newForm(path)

Public method to create a new form.

path
full directory path for the new form file (string)

Project.projectClosed

projectClosed()

Public method to handle the closing of a project.

Project.projectClosedHooks

projectClosedHooks()

Public method to remove our hook methods.

Project.projectOpenedHooks

projectOpenedHooks()

Public method to add our hook methods.

Project.setMostRecentApplication

setMostRecentApplication(applStr)

Public method to set the most recently used applications entry.

applStr
applications entry (QString)

Project.startProjectOrApplication

startProjectOrApplication()

Public slot to start a new Django project or application.

Project.updateCatalogs

updateCatalogs(filenames)

Public method to update the message catalogs.

filenames
list of filenames (not used)

Project.updateSelectedCatalogs

updateSelectedCatalogs(filenames)

Public method to update the message catalogs.

filenames
list of filenames
Up