class documentation
class Command(BaseCommand): (source)
Known subclasses: django.contrib.gis.management.commands.inspectdb.Command
Undocumented
Method | add |
Entry point for subclassed commands to add custom arguments. |
Method | get |
Given the database connection, the table name, and the cursor row description, this routine will return the given field type name, as well as any additional keyword parameters and notes for the field. |
Method | get |
Return a sequence comprising the lines of code necessary to construct the inner Meta class for the model corresponding to the given database table name. |
Method | handle |
The actual logic of the command. Subclasses must implement this method. |
Method | handle |
Undocumented |
Method | normalize |
Modify the column name to make it Python-compatible as a field name |
Class Variable | db |
Undocumented |
Class Variable | help |
Undocumented |
Class Variable | requires |
Undocumented |
Class Variable | stealth |
Undocumented |
Inherited from BaseCommand
:
Method | __init__ |
Undocumented |
Method | add |
Call the parser's add_argument() method, suppressing the help text according to BaseCommand.suppressed_base_arguments. |
Method | check |
Use the system check framework to validate entire Django project. Raise CommandError for any serious message (error or critical errors). If there are only light messages (like warnings), print them to stderr and don't raise an exception. |
Method | check |
Print a warning if the set of migrations on disk don't match the migrations in the database. |
Method | create |
Create and return the ``ArgumentParser`` which will be used to parse the arguments to this command. |
Method | execute |
Try to execute this command, performing system checks if needed (as controlled by the ``requires_system_checks`` attribute, except if force-skipped). |
Method | get |
Return the Django version, which should be correct for all built-in Django commands. User-supplied commands can override this method to return their own version. |
Method | print |
Print the help message for this command, derived from ``self.usage()``. |
Method | run |
Set up any environment changes requested (e.g., Python path and Django settings), then run this command. If the command raises a ``CommandError``, intercept it and print it sensibly to stderr. If the ``--traceback`` option is present or the raised ``Exception`` is not ``CommandError``, raise it. |
Class Variable | base |
Undocumented |
Class Variable | output |
Undocumented |
Class Variable | requires |
Undocumented |
Class Variable | suppressed |
Undocumented |
Instance Variable | stderr |
Undocumented |
Instance Variable | stdout |
Undocumented |
Instance Variable | style |
Undocumented |
Instance Variable | _called |
Undocumented |
overridden in
django.contrib.gis.management.commands.inspectdb.Command
Given the database connection, the table name, and the cursor row description, this routine will return the given field type name, as well as any additional keyword parameters and notes for the field.
def get_meta(self, table_name, constraints, column_to_field_name, is_view, is_partition):
(source)
¶
Return a sequence comprising the lines of code necessary to construct the inner Meta class for the model corresponding to the given database table name.