开发者

Jython, Django with Sqlite3

开发者 https://www.devze.com 2023-01-19 12:05 出处:网络
Now I create project by using jython 2.5.2b2 and django1开发者_StackOverflow.1.1 (lucid) , after download sqlitejdbc-v056.jar and do some syncdb task it\'s shown

Now I create project by using jython 2.5.2b2 and django1开发者_StackOverflow.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?


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',
    )


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消