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.
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
\binadded 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 the
Terminalapplication (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,
psqlmight require logging in using the username and password you chose during installation. If
psqlis asking you for a password and doesn't seem to work, try
psql -U <username> -Wfirst 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):
namewith your own name. You shouldn't use accented letters or whitespace (e.g.
bożena mariais invalid - you need to convert it into
bozena_maria). If it goes well, you should get
CREATE ROLEresponse from the console.
namewith 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 DATABASEresponse from the console.
nameto the user name that you created earlier in this chapter.
psycopg2. The installation instructions differ slightly between Windows and Linux/OS X.
python -c "import psycopg2". If you get no errors, everything's installed successfully.
namewith the username. You will be prompted for email and password.