Django-nonrel: Syntax to Reset an App -
to reset app, ran this:
./manage.py reset node
it giving me error output:
warning:root:the rdbms api not available because mysqldb library not loaded. traceback (most recent call last): file "./manage.py", line 11, in <module> execute_manager(settings) file "/home/a/mywebsites/django/seperolinux/django/core/management/__init__.py", line 438, in execute_manager utility.execute() file "/home/a/mywebsites/django/seperolinux/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) file "/home/a/mywebsites/django/seperolinux/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) file "/home/a/mywebsites/django/seperolinux/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) file "/home/a/mywebsites/django/seperolinux/django/core/management/base.py", line 286, in handle app_output = self.handle_app(app, **options) file "/home/a/mywebsites/django/seperolinux/django/core/management/commands/reset.py", line 35, in handle_app sql_list = sql_reset(app, self.style, connection) file "/home/a/mywebsites/django/seperolinux/django/core/management/sql.py", line 107, in sql_reset return sql_delete(app, style, connection) + sql_all(app, style, connection) file "/home/a/mywebsites/django/seperolinux/django/core/management/sql.py", line 66, in sql_delete table_names = connection.introspection.get_table_list(cursor) attributeerror: 'databaseintrospection' object has no attribute 'get_table_list'
how reset model in django-nonrel?
./manage.py reset node
executes sqlreset create dropt table , create table sql statements given app.
https://docs.djangoproject.com/en/1.3/ref/django-admin/#reset-appname-appname
this not work app engine datastore, because datastore schemaless there no need create/drop table commands.
if want delete existing model datastore, can use app engine development console delete entities of model (just make sure use correct port when accessing development console) .
Comments
Post a Comment