1 | >>> from django.core import meta
|
---|
2 | >>> class Tescik(meta.Model):
|
---|
3 | ... name = meta.CharField(maxlength=255)
|
---|
4 | ... order = meta.IntegerField(null=True)
|
---|
5 | ... def hello(self):
|
---|
6 | ... return "Hello WORLD!"
|
---|
7 | ...
|
---|
8 | >>> from django.models.biblia import tesciks
|
---|
9 | >>> print dir(tesciks)
|
---|
10 | ['AddManipulator', 'ChangeManipulator', 'Klass', 'Tescik', 'TescikDoesNotExist', '__doc__', '__file__', '__name__', '_get_sql_clause', 'get_count', 'get_in_bulk', 'get_iterator', 'get_list', 'get_object', 'get_values', 'get_values_iterator']
|
---|
11 | >>> tesciks.hello
|
---|
12 | Traceback (most recent call last):
|
---|
13 | File "<interactive input>", line 1, in ?
|
---|
14 | AttributeError: 'module' object has no attribute 'hello'
|
---|
15 | >>>
|
---|