def handle(self, *args, **options): management.call_command('makemigrations', django_micro.get_app_label()) management.call_command('migrate', run_syncdb=True) with ContentFile('foo', name='foo') as f: p = Post.objects.create(title='foo', file=f) print('cf closed?', f.closed) print('same?', f is p.file) print('closed?', p.file.closed) print('content', p.file.read()) print('closed?', p.file.closed) print('cf closed?', f.closed) print('#######################') """
class Meta: app_label = django_micro.get_app_label()
class Meta: app_label = get_app_label() ordering = ['-id']
class Meta: app_label = get_app_label() ordering = ('-create_date',)
class Meta: app_label = get_app_label()
class Meta: db_table = 'assets' app_label = get_app_label()