Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法升级Django CMS项目_Django_Django South_Django Cms_Migrate - Fatal编程技术网

无法升级Django CMS项目

无法升级Django CMS项目,django,django-south,django-cms,migrate,Django,Django South,Django Cms,Migrate,我正在尝试将Django CMS从2.2.x升级到2.3.5,并将Django从1.3.x升级到1.4.3 当我尝试使用“从南方迁移”时,出现了一个错误,我无法开始工作 Error in migration:googlemap:0012_auto__add_field_googlemap_width__add_field_googlemap_height__chg_field Traceback (most recent call last): File "manage.py", lin

我正在尝试将Django CMS从2.2.x升级到2.3.5,并将Django从1.3.x升级到1.4.3

当我尝试使用“从南方迁移”时,出现了一个错误,我无法开始工作

Error in migration:googlemap:0012_auto__add_field_googlemap_width__add_field_googlemap_height__chg_field Traceback (most recent call last): File "manage.py", line 19, in execute_from_command_line(sys.argv) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line utility.execute() File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute output = self.handle(*args, **options) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/management/commands/migrate.py", line 108, in handle ignore_ghosts = ignore_ghosts, File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/__init__.py", line 213, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/migrators.py", line 235, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/migrators.py", line 310, in migrate_many result = self.migrate(migration, database) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate result = self.run(migration) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/migrators.py", line 107, in run return self.run_migration(migration) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in return (lambda: direction(orm)) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/cms/plugins/googlemap/migrations/0012_auto__add_field_googlemap_width__add_field_googlemap_height__chg_field.py", line 19, in forwards keep_default=False) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/db/sqlite3.py", line 31, in add_column field.column: self._column_sql_for_create(table_name, name, field, False), File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/db/generic.py", line 44, in _cache_clear return func(self, table, *args, **opts) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/db/sqlite3.py", line 103, in _remake_table ", ".join(["%s %s" % (self.quote_name(cname), ctype) for cname, ctype in definitions.items()]), File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/south/db/generic.py", line 273, in execute cursor.execute(sql, params) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/django/db/backends/util.py", line 44, in execute sql = self.db.ops.last_executed_query(self.cursor, sql, params) File "/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/django/db/backends/__init__.py", line 595, in last_executed_query return smart_unicode(sql) % u_params TypeError: not enough arguments for format string
您可以发布:/Users/fguimara/.virtualenvs/twist2/lib/python2.7/site-packages/cms/plugins/googlemap/models.py吗?看起来这可能是一个问题,你的South版本与谷歌地图上django cms的插件模型相冲突:当然。。。我将编辑postOk。。。完成。正如我所说,这是使用pip安装的,没有修改。我的南方版本是0.7.6
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin


class GoogleMap(CMSPlugin):
   """
   A google maps integration
   """
   title = models.CharField(_("map title"), max_length=100, blank=True,
                         null=True)

   address = models.CharField(_("address"), max_length=150)
   zipcode = models.CharField(_("zip code"), max_length=30)
   city = models.CharField(_("city"), max_length=100)

   content = models.CharField(_("additional content"), max_length=255,
                     blank=True,
                     help_text=_('Displayed under address in the bubble.'))
   ZOOM_LEVELS = map(lambda c: (c, str(c)), range(22))
   zoom = models.PositiveSmallIntegerField(_("zoom level"),
                                        choices=ZOOM_LEVELS, default=13)

   lat = models.DecimalField(_('latitude'), max_digits=10, decimal_places=6,
                          null=True, blank=True,
                          help_text=_('Use latitude & longitude to fine '
                                      'tune the map position.'))
   lng = models.DecimalField(_('longitude'), max_digits=10, decimal_places=6,
                          null=True, blank=True)

   route_planer_title = models.CharField(_("route planer title"),
                           max_length=150, blank=True, null=True,
                           default=_('Calculate your fastest way to here'))
   route_planer = models.BooleanField(_("route planer"), default=False)

   width = models.CharField(_('width'), max_length=6, default='100%',
                       help_text=_('Plugin width (in pixels or percent).'))
   height = models.CharField(_('height'), max_length=6, default='400px',
                          help_text=_('Plugin height (in pixels).'))

   def __unicode__(self):
       return u"%s (%s, %s %s)" % (self.get_title(), self.address,
                                self.zipcode, self.city,)

   def get_title(self):
       if self.title is None:
           return _("Map")
       return self.title

   def get_lat_lng(self):
       if self.lat and self.lng:
           return (self.lat, self.lng)