Django Tips

The following knowledge tips of Django need to be paid attention to.

1.parse_command_line

1
2
3
DATABASE_ROUTERS
from tornado.options import parse_command_line
parse_command_line()

2.declare a class at runtime

1
DynamicClass = type('DynamicClass', (), {'spam': 'eggs'})

3.