出现一些错误后,我删除了我的数据库,删除了所有的迁移文件(我离开了 init .py).现在,当我跑
python migrate.py makemigrations // It creates migrations correctly
python migrate.py migrate // It outputs "app.0001_initial OK"
Run Code Online (Sandbox Code Playgroud)
但绝对没有 表(与我的应用程序相关)被创建.只有那些与django相关的是.在迁移表中,我的应用程序迁移已标记完成,但没有像我说的那样创建表,这非常令人不快.
以下是我的迁移文件的摘录:
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-18 21:59
from __future__ import unicode_literals
import colorful.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Client',
fields=[
('id', models.AutoField(db_column='idtblclients', primary_key=True, serialize=False)),
('genre1', models.CharField(blank=True, max_length=10)),
('prenom1', models.CharField(blank=True, max_length=45)),
('nom1', …Run Code Online (Sandbox Code Playgroud) 使用旋转图像时
import skimage
result = skimage.transform.rotate(img, angle=some_angle, resize=True)
# the result is the rotated image with black 'margins' that fill the blanks
Run Code Online (Sandbox Code Playgroud)
该算法旋转图像但将新形成的背景保留为黑色,并且无法使用旋转功能选择新形成背景的颜色。
您知道如何在旋转图像之前选择背景颜色吗?
谢谢你。