| Conditions | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from django.db import connection, migrations |
||
| 8 | def define_fake_model(name='TestModel', fields=None): |
||
| 9 | attributes = { |
||
| 10 | 'app_label': 'localized_fields', |
||
| 11 | '__module__': __name__, |
||
| 12 | '__name__': name |
||
| 13 | } |
||
| 14 | |||
| 15 | if fields: |
||
| 16 | attributes.update(fields) |
||
| 17 | model = type(name, (LocalizedModel,), attributes) |
||
| 18 | |||
| 19 | return model |
||
| 20 | |||
| 47 |