我切换到Django 1.7.当我为我的应用程序尝试makemigrations时,它会崩溃.崩溃报告是:
Migrations for 'roadmaps': 0001_initial.py: - Create model DataQualityIssue - Create model MonthlyChange - Create model Product - Create model ProductGroup - Create model RecomendedStack - Create model RecomendedStackMembership - Create model RoadmapMarket - Create model RoadmapUser - Create model RoadmapVendor - Create model SpecialEvent - Create model TimelineEvent - Create model UserStack - Create model UserStackMembership - Add field products to userstack - Add field viewers to userstack - Add field products to recomendedstack - Add field product_group to product - Add field vendor to product - Add field product to dataqualityissue Traceback (most recent call last): File "manage.py",line 29,in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",line 385,in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",line 377,in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",line 288,in run_from_argv self.execute(*args,**options.__dict__) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",line 338,in execute output = self.handle(*args,**options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/makemigrations.py",line 124,in handle self.write_migration_files(changes) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/makemigrations.py",line 152,in write_migration_files migration_string = writer.as_string() File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/writer.py",line 129,in as_string operation_string,operation_imports = OperationWriter(operation).serialize() File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/writer.py",line 80,in serialize arg_string,arg_imports = MigrationWriter.serialize(item) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/writer.py",line 245,in serialize item_string,item_imports = cls.serialize(item) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/writer.py",line 310,in serialize return cls.serialize_deconstructed(path,args,kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/writer.py",line 221,in serialize_deconstructed arg_string,arg_imports = cls.serialize(arg) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/writer.py",line 323,in serialize raise ValueError("Cannot serialize function: lambda") ValueError: Cannot serialize function: lambda
我在https://code.djangoproject.com/ticket/22892找到了关于这个的说明
还有文档https://docs.djangoproject.com/en/dev/topics/migrations/#serializing-values的链接
但它并没有让我更清楚.错误消息没有给我一个线索在哪里寻找问题.
有没有办法如何检测究竟是什么线导致问题?
任何提示?