On 5/27/2012 8:53 PM, xaegis wrote:
Hello, this is my first time posting to a list!
I am running python 2.7 with django 1.4 installed on Ubuntu 12.04
I am having trouble creating new projects with django. Whenever I use
the command:
Code:
sudo /usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py
startproject cms
I get errors or permission denied messages but if I use:
Code:
django-admin.py startproject cms
Everything seems to work correctly. I know at some point I created a
sym link in:
Code:
/usr/local/bin
but is this the proper way to do this? Should I be using the full path
instead? Also, why is django found in dist-packages instead of site-
packages in the python directory? The books I am using are telling me
the python files should be located in site-packages.
You are most likely getting that error message because you have more
than one copy of Django installed. Find out what version of
django-admin.py you're using by doing:
$ whereis django-admin.py
It's possible that you installed Django using the system tools (apt-get,
rpm, etc.) and that has preference over the one in /usr/local/bin.
I also noticed that django "startproject" created two directories
called "cms" one nested inside the other. Is this the default
behavior, and why?
It is as of 1.4. The things inside of cms/cms tend not to be that
portable between sites while all of the app directories should show up
as cms/app_1.
I am also having trouble setting up the sqlite3 back-end and I keep
getting the error:
Code:
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
sqlite3/base.py", line 281, in _cursor
self._sqlite_create_connection()
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
sqlite3/base.py", line 271, in _sqlite_create_connection
self.connection = Database.connect(**kwargs)
pysqlite2.dbapi2.OperationalError: unable to open database file
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.