diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py
index 0a45d75..7a128d9 100644
a
|
b
|
STATICFILES_FINDERS = (
|
583 | 583 | # Make sure to use a trailing slash. |
584 | 584 | # Examples: "http://foo.com/static/admin/", "/static/admin/". |
585 | 585 | ADMIN_MEDIA_PREFIX = '/static/admin/' |
| 586 | |
| 587 | TABLE_PREFIX = None |
diff --git a/django/db/models/options.py b/django/db/models/options.py
index 2f64c56..1bb32f4 100644
a
|
b
|
class Options(object):
|
108 | 108 | # If the db_table wasn't provided, use the app_label + module_name. |
109 | 109 | if not self.db_table: |
110 | 110 | self.db_table = "%s_%s" % (self.app_label, self.module_name) |
| 111 | if settings.TABLE_PREFIX: |
| 112 | self.db_table = "%s_%s" % (settings.TABLE_PREFIX, self.db_table) |
111 | 113 | self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) |
112 | 114 | |
113 | 115 | def _prepare(self, model): |
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 8bf0a4e..b72eb92 100644
a
|
b
|
It must end in a slash if set to a non-empty value.
|
1680 | 1680 | |
1681 | 1681 | See :setting:`STATIC_ROOT`. |
1682 | 1682 | |
| 1683 | .. setting:: TABLE_PREFIX |
| 1684 | |
| 1685 | TABLE_PREFIX |
| 1686 | ---------- |
| 1687 | |
| 1688 | Default: ``None`` |
| 1689 | |
| 1690 | Prefix that will be added to all table names, if db_table property is not set |
| 1691 | explicitly. |
| 1692 | |
| 1693 | By default Django generates table name concatenating application name and |
| 1694 | model name. If not ``None``, this will be prepended to the result. |
| 1695 | |
1683 | 1696 | .. setting:: TEMPLATE_CONTEXT_PROCESSORS |
1684 | 1697 | |
1685 | 1698 | TEMPLATE_CONTEXT_PROCESSORS |