Hello, so I have worked with Django for over a year now, and wanted to give
Mezzanine a try but I have not gotten far with it. I'm just doing some
Field Injections and when I run a migrate command I get an error.
*settings.py*
EXTRA_MODEL_FIELDS = (
( "mezzanine.blog.models.BlogPost.featured_post",
"BooleanField",
("Featured Post",),
{"blank": False, "null": False, "default": False},
),
)
Operations to perform:
Synchronize unmigrated apps: customize, boot, filebrowser_safe, sitemaps,
staticfiles, grappelli_safe
Apply all migrations: core, redirects, django_comments, sessions, admin,
twitter, galleries, sites, auth, blog, generic, contenttypes, conf, forms,
pages
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying blog.0007_auto_20151119_0048...Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_from_command_line(sys.argv)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 354, in execute_from_command_line
utility.execute()
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/core/management/base.py",
line 394, in run_from_argv
self.execute(*args, **cmd_options)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/core/management/base.py",
line 445, in execute
output = self.handle(*args, **options)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 222, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 110, in migrate
self.apply_migration(states[migration], migration, fake=fake,
fake_initial=fake_initial)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 148, in apply_migration
state = migration.apply(state, schema_editor)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/migrations/migration.py",
line 115, in apply
operation.database_forwards(self.app_label, schema_editor, old_state,
project_state)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py",
line 62, in database_forwards
field,
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py",
line 179, in add_field
self._remake_table(model, create_fields=[field])
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py",
line 77, in _remake_table
self.effective_default(field)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
line 211, in effective_default
default = field.get_db_prep_save(default, self.connection)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py",
line 710, in get_db_prep_save
prepared=False)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py",
line 1482, in get_db_prep_value
value = self.get_prep_value(value)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py",
line 1461, in get_prep_value
value = super(DateTimeField, self).get_prep_value(value)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py",
line 1317, in get_prep_value
return self.to_python(value)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py",
line 1420, in to_python
parsed = parse_datetime(value)
File
"/home/project/newenv/local/lib/python2.7/site-packages/django/utils/dateparse.py",
line 93, in parse_datetime
match = datetime_re.match(value)
TypeError: expected string or buffer
I have tried removing the code in the settings.py and running
makemigration/migrate command but I continue to get the same error. I have
tried starting a new mezzanine project and still I get the same error. I
have been stuck on this for the past day. Thanks.
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.