Jython、Django 和 Sqlite3

发布于 2024-09-27 06:33:23 字数 237 浏览 0 评论 0原文

现在我使用 jython 2.5.2b2 和 django1.1.1 (lucid) 创建项目,在下载 sqlitejdbc-v056.jar 并执行一些显示的同步数据库任务后

"zxJDBC.Error: auth_permission.content_type_id may not be NULL [SQLCode: 0]" 

,但仍然可以运行服务器,有人对这种情况有一些很好的例子吗?

Now I create project by using jython 2.5.2b2 and django1.1.1 (lucid) , after download sqlitejdbc-v056.jar and do some syncdb task it's shown

"zxJDBC.Error: auth_permission.content_type_id may not be NULL [SQLCode: 0]" 

but still can runserver, anyone has some great example for this situation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纵情客 2024-10-04 06:33:23

尝试在settings.py中的INSTALLED_APPS中重新排序django.contrib.auth

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    )

INSTALLED_APPS = (        
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.auth',
    )

Try to reorder django.contrib.auth in INSTALLED_APPS in settings.py
From

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    )

To

INSTALLED_APPS = (        
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.auth',
    )
燃情 2024-10-04 06:33:23

我在 OS X 上使用 Jython 2.5.2 和 Django 1.1.1 重新创建了此错误。然而,“django-jython”包的文档(它提供了 Jython 上的 Django 和各种数据库之间的粘合)在 SQLite3 支持

SQLite3

实验性的。到目前为止,仅当您正在努力改进它时才使用它。
或者如果您真的很喜欢冒险。

I have recreated this error on OS X with Jython 2.5.2 and Django 1.1.1. However the documentation for the 'django-jython' package (which provide the glue between Django on Jython and various databases) has the following on SQLite3 support:

SQLite3

Experimental. By now, use it only if you are working on improving it.
Or if you are really adventurous.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文