Hello Everyone, 
I tried to insall PostgreSQL with Djngo 1.8 and when running "migrate" to 
ensure the database is connected and created successfully, i faced a an 
error regarding the settings and couldn't go further . Below you can fine 
the steps that was taken at the time of setting up the database , if you 
can point me in where was the missing step or if there's a different way 
that this can be done... 

OS: Arch Linux

*First Step: *


$sudo pacman -S posgresql
$sudo -i -u postgres
[postgres@dworld~]$ initdb --locale en_US.UTF-8 -E UTF8 -D 
'/var/lib/postgres/data'
[postgres@dworld~]$ postgres -D /var/lib/postgres/data

*# then in another terminal while the above terminal live:*

$ sudo -i -u posgres
[postgres@dworld ~]$ psql

postgres=# CREATE DATABASE fdatabase
postgres=# CREATE USER dan WITH PASSWORD 'password'
postgres-# ALTER ROLE dan SET client_encoding TO 'utf8'
postgres-# ALTER ROLE dan SET default_transaction_isolation To 'read 
committed'
postgres-# ALTER ROLE dan SET timezone TO 'UTC+03:00'
postgres-# GRANT ALL PRIVILEGES ON DATABASE fdatabase TO dan
postgres-# \q

[postgres@dworld ~]$ exit



*Second Step:*
$ django-admin startproject mysite

$ pip install psycopg2
$ vim settings.py

*# then did the following changes to Settings.py :*



DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'fdatabase',
        'USER': 'dan',
        'PASSWORD': 'password',
        'HOST': '',
        'PORT': '',
    }
}

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC+03:00'

####################



*Third Step:*
(my_site)[dan@dworld my_site]$ python2 manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 354, in execute_from_command_line
    utility.execute()
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 303, in execute
    settings.INSTALLED_APPS
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 48, in __getattr__
    self._setup(name)
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 44, in _setup
    self._wrapped = Settings(settings_module)
  File 
"/home/dan/.virtualenvs/my_site/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 131, in __init__
    raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: UTC+03:00


Thanks all in advance ..

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dd96cf9c-18e1-4139-8fe1-48fbe6aa9036%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to