Changeset 607
- Timestamp:
- 09/02/05 13:26:16 (3 years ago)
- Files:
-
- django/trunk/django/core/management.py (modified) (12 diffs)
- django/trunk/docs/django-admin.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/management.py
r550 r607 13 13 {%% endif %%}''' 14 14 15 APP_ARGS = '[ app app...]'15 APP_ARGS = '[modelmodule ...]' 16 16 17 17 # Use django.__path__[0] because we don't know which directory django into … … 102 102 final_output.append('\n'.join(table_output)) 103 103 return final_output 104 get_sql_create.help_doc = "Prints the CREATE TABLE SQL statements for the given app(s)."104 get_sql_create.help_doc = "Prints the CREATE TABLE SQL statements for the given model module name(s)." 105 105 get_sql_create.args = APP_ARGS 106 106 … … 148 148 149 149 return output[::-1] # Reverse it, to deal with table dependencies. 150 get_sql_delete.help_doc = "Prints the DROP TABLE SQL statements for the given app(s)."150 get_sql_delete.help_doc = "Prints the DROP TABLE SQL statements for the given model module name(s)." 151 151 get_sql_delete.args = APP_ARGS 152 152 … … 154 154 "Returns a list of the DROP TABLE SQL, then the CREATE TABLE SQL, for the given module." 155 155 return get_sql_delete(mod) + get_sql_all(mod) 156 get_sql_reset.help_doc = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app(s)."156 get_sql_reset.help_doc = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given model module name(s)." 157 157 get_sql_reset.args = APP_ARGS 158 158 … … 177 177 output.append(_get_permission_insert(name, codename, opts)) 178 178 return output 179 get_sql_initial_data.help_doc = "Prints the initial INSERT SQL statements for the given app(s)."179 get_sql_initial_data.help_doc = "Prints the initial INSERT SQL statements for the given model module name(s)." 180 180 get_sql_initial_data.args = APP_ARGS 181 181 … … 189 189 output.append("SELECT setval('%s_%s_seq', (SELECT max(%s) FROM %s));" % (klass._meta.db_table, f.column, f.column, klass._meta.db_table)) 190 190 return output 191 get_sql_sequence_reset.help_doc = "Prints the SQL statements for resetting PostgreSQL sequences for the given app(s)."191 get_sql_sequence_reset.help_doc = "Prints the SQL statements for resetting PostgreSQL sequences for the given model module name(s)." 192 192 get_sql_sequence_reset.args = APP_ARGS 193 193 … … 202 202 (unique, klass._meta.db_table, f.column, klass._meta.db_table, f.column)) 203 203 return output 204 get_sql_indexes.help_doc = "Prints the CREATE INDEX SQL statements for the given app(s)."204 get_sql_indexes.help_doc = "Prints the CREATE INDEX SQL statements for the given model module name(s)." 205 205 get_sql_indexes.args = APP_ARGS 206 206 … … 208 208 "Returns a list of CREATE TABLE SQL and initial-data insert for the given module." 209 209 return get_sql_create(mod) + get_sql_initial_data(mod) 210 get_sql_all.help_doc = "Prints the CREATE TABLE and initial-data SQL statements for the given app(s)."210 get_sql_all.help_doc = "Prints the CREATE TABLE and initial-data SQL statements for the given model module name(s)." 211 211 get_sql_all.args = APP_ARGS 212 212 … … 260 260 # sys.stderr.write("A content type called '%s.%s' was found in the database but not in the model.\n" % (app_label, row[0])) 261 261 print "DELETE FROM content_types WHERE package='%s' AND python_module_name = '%s';" % (app_label, row[0]) 262 database_check.help_doc = "Checks that everything is installed in the database for the given app(s) and prints SQL statements if needed."262 database_check.help_doc = "Checks that everything is installed in the database for the given model module name(s) and prints SQL statements if needed." 263 263 database_check.args = APP_ARGS 264 264 … … 282 282 output.append('{% endif %}') 283 283 return output 284 get_admin_index.help_doc = "Prints the admin-index template snippet for the given app(s)."284 get_admin_index.help_doc = "Prints the admin-index template snippet for the given model module name(s)." 285 285 get_admin_index.args = APP_ARGS 286 286 … … 322 322 sys.exit(1) 323 323 db.db.commit() 324 install.help_doc = "Executes ``sqlall`` for the given app(s) in the current database."324 install.help_doc = "Executes ``sqlall`` for the given model module name(s) in the current database." 325 325 install.args = APP_ARGS 326 326 … … 377 377 378 378 def startapp(app_name, directory): 379 "Creates a Django app for the given project_name in the given directory."379 "Creates a Django app for the given app_name in the given directory." 380 380 # Determine the project_name a bit naively -- by looking at the name of 381 381 # the parent directory. django/trunk/docs/django-admin.txt
r539 r607 23 23 list of all available actions and options. 24 24 25 Most actions take a list of " app"s. An "app," in this case, is the name of26 a file containing Django models. For example, if you have a model module called 27 ``myproject/apps/polls/pollmodels.py``, the "app" in this case would be 28 ``"pollmodels"``.25 Most actions take a list of "modelmodule"s. A "modelmodule," in this case, is 26 the name of a file containing Django models. For example, if you have a model 27 module called ``myproject/apps/polls/pollmodels.py``, the "modelmodule" in this 28 case would be ``"pollmodels"``. 29 29 30 30 Available actions 31 31 ================= 32 32 33 adminindex [ app app...]33 adminindex [modelmodule modelmodule ...] 34 34 ------------------------ 35 35 36 Prints the admin-index template snippet for the given app(s).36 Prints the admin-index template snippet for the given model module(s). 37 37 38 38 Use admin-index template snippets if you want to customize the look and feel of … … 76 76 works in PostgreSQL. 77 77 78 install [ app app...]78 install [modelmodule modelmodule ...] 79 79 --------------------- 80 80 81 Executes the equivalent of ``sqlall`` for the given app(s).81 Executes the equivalent of ``sqlall`` for the given model module(s). 82 82 83 83 runserver [optional port number, or ipaddr:port] … … 116 116 django-admin.py runserver 1.2.3.4:7000 117 117 118 sql [ app app...]118 sql [modelmodule modelmodule ...] 119 119 ----------------- 120 120 121 Prints the CREATE TABLE SQL statements for the given app(s).121 Prints the CREATE TABLE SQL statements for the given model module(s). 122 122 123 sqlall [ app app...]123 sqlall [modelmodule modelmodule ...] 124 124 -------------------- 125 125 126 Prints the CREATE TABLE and initial-data SQL statements for the given app(s).126 Prints the CREATE TABLE and initial-data SQL statements for the given model module(s). 127 127 128 sqlclear [ app app...]128 sqlclear [modelmodule modelmodule ...] 129 129 ---------------------- 130 130 131 Prints the DROP TABLE SQL statements for the given app(s).131 Prints the DROP TABLE SQL statements for the given model module(s). 132 132 133 sqlindexes [ app app...]133 sqlindexes [modelmodule modelmodule ...] 134 134 ------------------------ 135 135 136 Prints the CREATE INDEX SQL statements for the given app(s).136 Prints the CREATE INDEX SQL statements for the given model module(s). 137 137 138 sqlinitialdata [ app app...]138 sqlinitialdata [modelmodule modelmodule ...] 139 139 ---------------------------- 140 140 141 Prints the initial INSERT SQL statements for the given app(s).141 Prints the initial INSERT SQL statements for the given model module(s). 142 142 143 sqlreset [ app app...]143 sqlreset [modelmodule modelmodule ...] 144 144 ---------------------- 145 145 146 Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app(s).146 Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given model module(s). 147 147 148 sqlsequencereset [ app app...]148 sqlsequencereset [modelmodule modelmodule ...] 149 149 ------------------------------ 150 150 151 151 Prints the SQL statements for resetting PostgreSQL sequences for the given 152 app(s).152 model module(s). 153 153 154 154 See http://simon.incutio.com/archive/2004/04/21/postgres for more information.
