Parts of this chapter is based on the django-marcador tutorial licensed under Creative Commons Attribution-ShareAlike 4.0 International License. The django-marcador tutorial is copyrighted by Markus Zapke-Gründemann et al.
C:\Program Files\PostgreSQL\9.3
).PATH
variable, what is described here.setx PATH "%PATH%;C:\Program Files\PostgreSQL\9.3\bin"
. You can paste things into the Command Prompt by right clicking and selecting Paste
. Make sure that the path is the same one you noted during installation with \bin
added at the end. You should see the message SUCCESS: Specified value was saved.
.psql
. Remember how to launch the console?On Mac OS X you can do this by launching theTerminal
application (it's in Applications → Utilities). On Linux, it's probably under Applications → Accessories → Terminal. On Windows you need to go to Start menu → All Programs → Accessories → Command Prompt. Furthermore, on Windows,psql
might require logging in using the username and password you chose during installation. Ifpsql
is asking you for a password and doesn't seem to work, trypsql -U <username> -W
first and enter the password later.
$
now changed into #
, which means that we're now sending commands to PostgreSQL. Let's create a user with CREATE USER name;
(remember to use the semicolon):name
with your own name. You shouldn't use accented letters or whitespace (e.g. bożena maria
is invalid - you need to convert it into bozena_maria
). If it goes well, you should get CREATE ROLE
response from the console.name
with the name you've chosen (e.g. bozena_maria
). This creates an empty database that you can now use in your project. If it goes well, you should get CREATE DATABASE
response from the console.mysite/settings.py
file:name
to the user name that you created earlier in this chapter.psycopg2
. The installation instructions differ slightly between Windows and Linux/OS X.C:\psycopg2.exe
.virtualenv
is activated):python -c "import psycopg2"
. If you get no errors, everything's installed successfully.name
with the username. You will be prompted for email and password.