I've installed Django 1.6.5 on my site on Stevie at http://ukanuk.heliohost.org/django2/. I'm creating the Basic Poll App Admin Site outlined at https://docs.djangop...m/en/1.6/intro/, I've mostly gotten through Part 3, and it works without flaw locally on my computer. My two problems upon uploading to Heliohost, hopefully related, are: 1. The admin page isn't working properly. When I try to log in, it gives me this error page, where I think is the pertinent info is after the second question. 2. The root directory is not giving me a page saying something like http://ukanuk.helioh...org/djangotest/ (which uses Stevie's Django v1.3.0), as it does locally on my computer. My sample app here, however, utilizing all sorts of URL mumbo-jumbo, works perfectly. Pertinent Error Page Info (Complete page here):
OperationalError at /admin/
unable to open database fileRequest Method: POST
Request URL: http://ukanuk.helioh.../django2/admin/
Django Version: 1.6.5
Exception Type: OperationalError
Exception Value: unable to open database file
Exception Location: /home/nuk/Django-1.6.5/django/db/backends/sqlite3/base.py in execute, line 451
Python Executable: /usr/bin/python
Python Version: 2.7.1
Context: The default Django admin site utilizes SQLite for its database, and according to http://www.heliohost...atabases/sqlite the Python version should be 3.3.6, whereas my site is using the Stevie default 2.7.1. However, this Python version conflict seems improbable to me since SQLite embeds itself as a library instead of getting run by the server in its own script, and am running it locally with v2.7. In addition, "Exception Location of /home/nuk/Django-1.6.5/django/db/backends/sqlite3/base.py" above makes it seem like its using SQLite files bundled with Django. I think it more likely that there is some problem in my .htaccess, urls.py, or dispatch.wsgi files, but I'm not really sure where to start. I have no idea why Problem #2 is happening beyond a problem in my .htaccess, urls.py, or dispatch.wsgi. Maybe it's easier to solve than #1, and maybe fixing it will fix #1 too, or vice versa. /django2/.htaccess file RewriteEngine On
RewriteBase /
RewriteRule ^(static/.*)$ - [L]
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ django2/dispatch.wsgi/$1 [QSA,PT,L]
/django2/mysite/urls.py from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^polls/', include('polls.urls')),
url(r'^admin/', include(admin.site.urls)),
)
/django2/dispatch.wsgi import os, sys
sys.path.insert(1,'/home/nuk/Django-1.6.5');
sys.path.append("/home/nuk/public_html/django2");
sys.path.append("/home/nuk/public_html/django2/mysite");
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
os.environ.setdefault("PYTHON_EGG_CACHE", "/home/nuk/.python_egg_cache")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
I have also noticed that the admin site isn't properly getting its stylesheets, but I think this is probably just because I haven't properly set up my static files yet so I'm not as concerned about this. Any ideas?