pycharm inspectdb 问题
来源:5-4 剩余app model注册
qq_青椒肉丝_2
2017-03-14
manage.py@jkTax > inspectdb "C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\bin\runnerw.exe" D:\mxonline\mx\Scripts\python.exe "C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\helpers\pycharm\django_manage.py" inspectdb D:/jkTax # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free to rename the models, but don't rename db_table values or field names. from __future__ import unicode_literals from django.db import models class AuthGroup(models.Model): name = models.CharField(unique=True, max_length=80) class Meta: managed = False db_table = 'auth_group' class AuthGroupPermissions(models.Model): group_id = models.IntegerField() permission_id = models.IntegerField() class Meta: managed = False db_table = 'auth_group_permissions' unique_together = (('group_id', 'permission_id'),) class AuthPermission(models.Model): name = models.CharField(max_length=255) content_type_id = models.IntegerField() codename = models.CharField(max_length=100) class Meta: managed = False db_table = 'auth_permission' unique_together = (('content_type_id', 'codename'),) class AuthUser(models.Model): password = models.CharField(max_length=128) last_login = models.DateTimeField(blank=True, null=True) is_superuser = models.IntegerField() username = models.CharField(unique=True, max_length=150) first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.CharField(max_length=254) is_staff = models.IntegerField() is_active = models.IntegerField() date_joined = models.DateTimeField() class Meta: managed = False db_table = 'auth_user' class AuthUserGroups(models.Model): user_id = models.IntegerField() group_id = models.IntegerField() class Meta: managed = False db_table = 'auth_user_groups' unique_together = (('user_id', 'group_id'),) class AuthUserUserPermissions(models.Model): user_id = models.IntegerField() permission_id = models.IntegerField() class Meta: managed = False db_table = 'auth_user_user_permissions' unique_together = (('user_id', 'permission_id'),) class DjNsrxx(models.Model): id = models.AutoField(db_column='Id', primary_key=True) # Field name made lowercase. nsrsbh = models.CharField(db_column='NSRSBH', max_length=20, blank=True, null=True) # Field name made lowercase. nsrmc = models.CharField(db_column='NSRMC', max_length=255, blank=True, null=True) # Field name made lowercase. djzclx_dm = models.CharField(db_column='DJZCLX_DM', max_length=3, blank=True, null=True) # Field name made lowercase. nsrzt_dm = models.CharField(db_column='NSRZT_DM', max_length=2, blank=True, null=True) # Field name made lowercase. hy_dm = models.CharField(db_column='HY_DM', max_length=4, blank=True, null=True) # Field name made lowercase. jdxz_dm = models.CharField(db_column='JDXZ_DM', max_length=9, blank=True, null=True) # Field name made lowercase. zgswj_dm = models.CharField(db_column='ZGSWJ_DM', max_length=11, blank=True, null=True) # Field name made lowercase. zgswskfj_dm = models.CharField(db_column='ZGSWSKFJ_DM', max_length=11, blank=True, null=True) # Field name made lowercase. class Meta: managed = False db_table = 'dj_nsrxx' class DjNsrxxCopy(models.Model): id = models.AutoField(db_column='Id', primary_key=True) # Field name made lowercase. nsrsbh = models.CharField(db_column='NSRSBH', max_length=20, blank=True, null=True) # Field name made lowercase. nsrmc = models.CharField(db_column='NSRMC', max_length=255, blank=True, null=True) # Field name made lowercase. djzclx_dm = models.CharField(db_column='DJZCLX_DM', max_length=3, blank=True, null=True) # Field name made lowercase. nsrzt_dm = models.CharField(db_column='NSRZT_DM', max_length=2, blank=True, null=True) # Field name made lowercase. hy_dm = models.CharField(db_column='HY_DM', max_length=4, blank=True, null=True) # Field name made lowercase. jdxz_dm = models.CharField(db_column='JDXZ_DM', max_length=9, blank=True, null=True) # Field name made lowercase. zgswj_dm = models.CharField(db_column='ZGSWJ_DM', max_length=11, blank=True, null=True) # Field name made lowercase. zgswskfj_dm = models.CharField(db_column='ZGSWSKFJ_DM', max_length=11, blank=True, null=True) # Field name made lowercase. class Meta: managed = False db_table = 'dj_nsrxx_copy' class DjNsrxxCopy1(models.Model): id = models.AutoField(db_column='Id', primary_key=True) # Field name made lowercase. nsrsbh = models.CharField(db_column='NSRSBH', max_length=20, blank=True, null=True) # Field name made lowercase. nsrmc = models.CharField(db_column='NSRMC', max_length=255, blank=True, null=True) # Field name made lowercase. djzclx_dm = models.CharField(db_column='DJZCLX_DM', max_length=3, blank=True, null=True) # Field name made lowercase. nsrzt_dm = models.CharField(db_column='NSRZT_DM', max_length=2, blank=True, null=True) # Field name made lowercase. hy_dm = models.CharField(db_column='HY_DM', max_length=4, blank=True, null=True) # Field name made lowercase. jdxz_dm = models.CharField(db_column='JDXZ_DM', max_length=9, blank=True, null=True) # Field name made lowercase. zgswj_dm = models.CharField(db_column='ZGSWJ_DM', max_length=11, blank=True, null=True) # Field name made lowercase. zgswskfj_dm = models.CharField(db_column='ZGSWSKFJ_DM', max_length=11, blank=True, null=True) # Field name made lowercase. class Meta: managed = False db_table = 'dj_nsrxx_copy1' class DjangoAdminLog(models.Model): action_time = models.DateTimeField() object_id = models.TextField(blank=True, null=True) object_repr = models.CharField(max_length=200) action_flag = models.SmallIntegerField() change_message = models.TextField() content_type_id = models.IntegerField(blank=True, null=True) user_id = models.IntegerField() class Meta: managed = False db_table = 'django_admin_log' class DjangoContentType(models.Model): app_label = models.CharField(max_length=100) model = models.CharField(max_length=100) class Meta: managed = False db_table = 'django_content_type' unique_together = (('app_label', 'model'),) class DjangoMigrations(models.Model): app = models.CharField(max_length=255) name = models.CharField(max_length=255) applied = models.DateTimeField() class Meta: managed = False db_table = 'django_migrations' class DjangoSession(models.Model): session_key = models.CharField(primary_key=True, max_length=40) session_data = models.TextField() expire_date = models.DateTimeField() class Meta: managed = False db_table = 'django_session' class Test1(models.Model): id = models.AutoField(db_column='Id', primary_key=True) # Field name made lowercase. nsrmc = models.CharField(db_column='NSRMC', max_length=255, blank=True, null=True) # Field name made lowercase. class Meta: managed = False db_table = 'test1' Process finished with exit code 0
我在pycharm 下运行 inspectdb models,结果是打印在解释栏而不是直接写入models,老师是这样吗?还是我用错了
写回答
1回答
-
bobby
2017-03-15
直接用inspectdb > models.py啊 重定向符
00
相似问题