Reputation: 205
I'm new to web development and I'm trying to get my mac set up for doing Django tutorials and helping some developers with a project that uses postgres. I will try to specify my questions as much as possible. However, it seems that there are lots of floating parts to this question and I'm not quite understanding some parts of the connection between an SQL Shell, virtual environments, paths, databases, terminals (which seem to be necessary to get running on this web development project). I will detail what I did and the error messages that appear. If you could help me with the error messages or simply post links to tutorials that help me better understand how these floating parts work together, I would very much appreciate it.
I installed postgres and pgAdmin III and set it up on the default port. I created a test database. Now when I try to open it on the local server, I get an error message: 'ERROR: column "datconfig" does not exist LINE1:...b.dattablespace AS spcoid, spcname, datallowconn, dataconfig,...
Here is what I did before I closed pgAdmin and then reopened it: Installation: The Setup told me that an existing data directory was found at /Library/PostgreSQL/9.2/data set to use port 5433. I loaded an .sql file that I wanted to test (I saved it on my desktop and loaded it into the database from there).
I'm not sure whether this is related to the problem or not, but I also have virtual environments in a folder ~/Sites/django_test (i.e. when I tell the bash Terminal to “activate” this folder, it puts me in a an (env)).
I read in a forum that I need to do the Django tutorials by running “python manage.py runserver" at the bash Terminal command line. When I do this, I get an error message saying “can't open file 'manage.py': [Errno 2] No such file or directory”. Even when I run the command in the (env), I get the error message: /Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python: can't open file 'manage.py': [Errno 2] No such file or directory (Which I presume is telling me that the path is still set on an incorrect version of Python (3.2), even though I want to use version 2.7 and trashed the 3.2 version from my system. )
I think that there are a few gaps in my understanding here:
If you could help me with these questions, or simply list links with any tutorials that explain this, that would be much appreciated. And again, sorry for not being more specific. But I thought that it would be more helpful to list the problems that I have with these different pieces rather than just one, since its their interrelatedness that seems to be causing the error messages. Thanks!
Upvotes: 1
Views: 307
Reputation: 599630
Er, not sure how we can help you with that. One is for bash, one is for SQL.
No, that's for running the development webserver, as the tutorial explains.
There's no need to do that, that's what the virtualenv is for.
This has nothing to do with Python versions, you simply don't seem to be in the right directory. Note that, again as the tutorial explains, manage.py
isn't created until you've run django-admin.py startproject myprojectname
. Have you done that?
You presumably created the virtualenv using 3.2. Delete it and recreate it with 2.7.
You shouldn't be "reading in a forum" about how to do the Django tutorial. You should just be following the tutorial.
Upvotes: 1