mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-22 17:16:34 +03:00
Explain how table names are determined
This commit is contained in:
parent
3b82f31ec2
commit
48d7dfe661
14
README.rst
14
README.rst
|
@ -34,6 +34,20 @@ It is possible to provide a default value for a field, instead of its "natural"
|
||||||
|
|
||||||
See below for the supported field types and table engines.
|
See below for the supported field types and table engines.
|
||||||
|
|
||||||
|
Table Names
|
||||||
|
***********
|
||||||
|
|
||||||
|
The table name used for the model is its class name, converted to lowercase. To override the default name,
|
||||||
|
implement the ``table_name`` method::
|
||||||
|
|
||||||
|
class Person(models.Model):
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def table_name(cls):
|
||||||
|
return 'people'
|
||||||
|
|
||||||
Using Models
|
Using Models
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user