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?
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.
Related
Tying to register my djano app in the settings section of my django project. but when i run the server i am getting an error in the terminal.
django.core.exceptions.ImproperlyConfigured: 'site1app.apps' does not contain a class 'Site1appConfig'. Choices are: 'Site1AppConfig'.
I dont know what's going wrong as i just added it to the list of installed apps in settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'site1app.apps.Site1appConfig',
]
This looks like a miss on the capitalization for your class
Change:
'site1app.apps.Site1appConfig'
To:
'site1app.apps.Site1AppConfig'
I´m using python 3.5.1 and django 2.0.1. I have a django app which I want to start but i get the following error message:
ImportError: No module named 'nested_inline'
Under settings.py I have in installed apps:
INSTALLED_APPS = [
'nested_inline',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'betonermüdung'
]
So.. I can´t understand where the problem could be... can anyone help??
Thank you in advance
I have no idea why the app is crashing when I try to run:
python manage.py sqlall world
I am taking the django tutorial for geodjango, and my settings contain:
INSTALLED_APPS = (
'django.contrib.admin.apps.AdminConfig',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'world',
)
As the tutorial teaches.
Does anyone has an idea of what might be happening?
I have already uninstalled Django 1.6.1 and installed again.
Thanks
You are not following the tutorial which matches the version of Django you have installed. 'django.contrib.admin.apps.AdminConfig' is only available on master (1.7dev).
I deployed my Django project to Heroku. Now, I want to add another app to my existing project. How can I do it in a way that a new database is not created- I mean my existing database should not get deleted?
You can just run heroku run python manage.py syncdb after pushing your new app with model definitions. This won't delete your database. Consider installing South though.
Using PyPI
If the app you want to install is available on the Python Package Index, you can add the name of the add and the version you want to use in your requirements.txt file like:
app_name==1.2.3
Then, in your project/settings.py file, add the app_name as a string to the list of INSTALLED_APPS. For instance, if INSTALLED_APPS looks like this:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)
then adding the new app will make it:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'package_name',
)
Using git
You can follow the same steps as above, but instead of adding app_name==1.2.3, you add:
git+git://github.com/owner_name/app_name#egg=app_name
replacing owner_name and app_name appropriately. This clones the repository that you point to, so be sure that it's either public or that you have ssh access if it's private.
so here is my problem - the gravatar app (from google projects - here! http://code.google.com/p/django-gravatar/) in my django project crashed everything on startup.
i get this error Error: No module named gravatar
this is my installed apps:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'dumpstown.dumpstownapp',
'bootstrap_toolkit',
'registration',
'gravatar'
)
and from the console when i run this:
>> import sys
>> print sys.path
['', 'C:\\development\\python\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg',
'C:\\development\\python\\lib\\site-packages\\pip-1.1-py2.7.egg', 'C:\\developm
ent\\PycharmProjects\\lib\\gravatar', 'C:\\Windows\\system32\\python27.zip', 'C:
\\development\\python\\DLLs', 'C:\\development\\python\\lib', 'C:\\development\\
python\\lib\\plat-win', 'C:\\development\\python\\lib\\lib-tk', 'C:\\development
\\python', 'C:\\development\\python\\lib\\site-packages']
what am i missing here?
UPDATE
huh, weird. I've checked the gravatar folder, and i have
templatetags dir
__init__.py
models.py
views.py
also, if i change the installed apps section to read:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'dumpstown.dumpstownapp',
'bootstrap_toolkit',
'registration',
'templatetags'
)
then the server starts up fine and runs. But i... i'm all confused now! Am i meant to import the templatetags? or something else? how do i refer to the gravatar stuff if i'm importing templatetags??
EDIT: Solved.
I just don't understand how python works, it would seem! I was totally adding the wrong item to the pythonpath - i was adding C:\\development\\PycharmProjects\\lib\\gravatar, where i should have really been adding C:\\development\\PycharmProjects\\lib
this solved the problem, and now i can use gravatar as i want. The settings.py entry is as above in my first example (that is, just 'gravatar') and the way i use it is i just {% load gravatar %}
hurrah!
Possibly you checked out the trunk folder and have a structure like ..\gravatar\gravatar? The setup.py script should install it somewhere your path but you could also try changing C:\developm ent\PycharmProjects\lib\gravatar to C:\developm ent\PycharmProjects\lib\gravatar\gravatar
Totally adding the wrong item to the pythonpath - i was adding C:\development\PycharmProjects\lib\gravatar, where i should have really been adding C:\development\PycharmProjects\lib