How to add models in devel?

53 views
Skip to first unread message

Yijun Lu

unread,
Feb 7, 2015, 1:02:52 PM2/7/15
to eve...@googlegroups.com
I can use /game/manage.py to add new models in evennia's master branch, but this file is removed from devel branch. How can I add new models in devel?

Griatch Art

unread,
Feb 7, 2015, 7:06:11 PM2/7/15
to eve...@googlegroups.com
You add your new models to the settings file as before, then you use `evennia migrate`, from your new game directory.
.
Griatch
Message has been deleted

Yijun Lu

unread,
Feb 8, 2015, 7:38:47 PM2/8/15
to eve...@googlegroups.com
Thank you, it works. But I got another problem.

I called "evennia makemigrations", and an unexpected file was added to "/evennia/scripts/migrations/". Then I called "evennia migrate", but it failed as following:

raise InvalidBasesError("Cannot resolve bases for %r\nThis can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)\n in an app with no migrations; see https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies for more" % new_unrendered_models)
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<ModelState: 'scripts.DoNothing'>, <ModelState: 'scripts.Store'>, <ModelState: 'players.BotStarter'>, <ModelState: 'scripts.CheckSessions'>, <ModelState: 'scripts.ValidateChannelHandler'>, <ModelState: 'scripts.ValidateScripts'>, <ModelState: 'scripts.ValidateIdmapperCache'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)

I removed the new file in "/evennia/scripts/migrations/", and the "evennia migrate" could run successfully.
Reply all
Reply to author
Forward
0 new messages