I feel this might be a very simple question, but I am trying to learn to code using python/django so I can build some simple blog sites for my family and cannot get my site deployed on Hostmonster. I think I'm getting close, but I'm stuck with the following error:
Using the URLconf defined in newproject.urls, Django tried these URL patterns, in this order: ^admin/ The current URL, , didn't match any of these.`
I spent a bunch of time figuring out how to load python, django, etc. on my shared HostMonster account, and thought I had it all figured out when I loaded a generic, unmodified django newproject
and got the django "It worked!" screen, but as soon as I uncommented the lines in urls.py and settings.py to enable the admin module, I get stuck with the above error.
Here is my .htaccess
file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteCond %{REQUEST_URI} !^/mysite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /mysite/$1
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ /mysite/jarr.fcgi [QSA,L]
and here is my jarr.fcgi
file:
#!/home3/usr/python/bin/python
import sys, os
sys.path.insert(0, "/home3/usr/django/django_projects/newproject")
sys.path.insert(0, "/home3/usr/python")
sys.path.insert(0, "/home3/usr/python/lib")
sys.path.insert(0, "/home3/usr/python/lib/python2.7")
sys.path.insert(0, "/home3/usr/python/lib/python2.7/site-packages")
sys.path.insert(0, "/home3/usr/django/django_src")
os.environ['DJANGO_SETTINGS_MODULE'] = "newproject.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
So frustrating to finally get the "It worked!" from my hostmonster account after weeks of work, but then I can't even enable the admin let alone build an actual site, which is so easy on my local machine. Any advice would be very appreciated.