title: Django operational error in postgresql
body: <p>im having an issue with django, im trying to create a data base on django for my application i have set my conection like this</p>
  
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql_psycopg2',
          'NAME': 'Proyecto_OSC',
          'USER': 'posgresql',
          'PASSWORD': 'aa121292',
          'HOST': '',
          'PORT': '5432'
      }
  }
  </code></pre>
  
  <p>then i tried to create my models like this: </p>
  
  <pre><code>class TipoOrganizacion(models.Model):
      nombre = models.CharField(max_length=140)
  
      def __str__(self):
          return self.nombre
  
      class Meta:
          verbose_name_plural = "Tipos de Organizacion"
  
  
  class Actividades(models.Model):
      nombre = models.CharField(max_length=255)
  
      def __str__(self):
          return self.nombre
  
      class Meta:
          verbose_name_plural = "Actividades"
  
  
  class AreasInteres(models.Model):
      nombre = models.CharField(max_length=255)
  
      def __str__(self):
          return self.nombre
  
      class Meta:
          verbose_name_plural = "Areas de interes"
          verbose_name = "Area de interes"
  
  class TiposRedesSociales(models.Model):
      tipo = models.CharField(max_length=255)
  
      def __str__(self):
          return self.tipo
  
      class Meta:
          verbose_name_plural = "Tipos de redes sociales"
          verbose_name = "tipo de red social"
  
  class RedSocial(models.Model):
      nombre = models.CharField(max_length=255)
      tipo = models.ManyToManyField(TiposRedesSociales)
  
      def __str__(self):
          return self.nombre
  
      class Meta:
          verbose_name_plural = "Redes sociales"
          verbose_name = "Red social"
  
  class Organizacion(models.Model):
      nombre = models.CharField(max_length=150)
      poblacion = models.CharField(max_length=100)
      direccion = models.CharField(max_length=200)
      fecha = models.DateField()
      telefono = models.CharField(max_length=15)
      dias = models.CharField(max_length=200)
      iniciohora = models.TimeField()
      finhora = models.TimeField()
      nombrecontacto = models.CharField(max_length=150)
      numeropersonas = models.CharField(max_length=3)
      recursos = models.CharField(max_length=255)
      tipo = models.ForeignKey(TipoOrganizacion)
      actividades = models.ManyToManyField(Actividades)
      areas = models.ManyToManyField(AreasInteres)
      red = models.ForeignKey(RedSocial)
  
      def __str__(self):
          return self.nombre
  
      class Meta:
          verbose_name_plural = "organizaciones"
          verbose_name = "organizacion"
  </code></pre>
  
  <p>i already tried to manage.py validate to verify errors with the syntax on my models and its says 0 errors, then after doing syncdb it happens this:</p>
  
  <pre><code>C:\Users\Abdul Hamid\PycharmProjects\Proyecto_OSC&gt;python manage.py syncdb 
  Traceback (most recent call last):
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 127, in ensure_connection
      self.connect()
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 115, in connect
      self.connection = self.get_new_connection(conn_params)
    File "C:\Python34\lib\site-packages\django\db\backends\postgresql_psycopg2\base.py", line 114, in get_new_connection
      return Database.connect(**conn_params)
    File "C:\Python34\lib\site-packages\psycopg2\__init__.py", line 164, in connect
      conn = _connect(dsn, connection_factory=connection_factory, async=async)
  psycopg2.OperationalError
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "manage.py", line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line
      utility.execute()
    File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line 392, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "C:\Python34\lib\site-packages\django\core\management\base.py", line 242, in run_from_argv
      self.execute(*args, **options.__dict__)
    File "C:\Python34\lib\site-packages\django\core\management\base.py", line 285, in execute
      output = self.handle(*args, **options)
    File "C:\Python34\lib\site-packages\django\core\management\base.py", line 415, in handle
      return self.handle_noargs(**options)
    File "C:\Python34\lib\site-packages\django\core\management\commands\syncdb.py", line 57, in handle_noargs
      cursor = connection.cursor()
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 160, in cursor
      cursor = self.make_debug_cursor(self._cursor())
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 132, in _cursor
      self.ensure_connection()
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 127, in ensure_connection
      self.connect()
    File "C:\Python34\lib\site-packages\django\db\utils.py", line 99, in __exit__
      six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "C:\Python34\lib\site-packages\django\utils\six.py", line 549, in reraise
      raise value.with_traceback(tb)
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 127, in ensure_connection
      self.connect()
    File "C:\Python34\lib\site-packages\django\db\backends\__init__.py", line 115, in connect
      self.connection = self.get_new_connection(conn_params)
    File "C:\Python34\lib\site-packages\django\db\backends\postgresql_psycopg2\base.py", line 114, in get_new_connection
      return Database.connect(**conn_params)
    File "C:\Python34\lib\site-packages\psycopg2\__init__.py", line 164, in connect
      conn = _connect(dsn, connection_factory=connection_factory, async=async)
  django.db.utils.OperationalError
  </code></pre>
  
  <p>so i already tried creating the database inside postgres using pgadminIII without creating the tables
  and it keeps hapening this error, im wondering if i have to create the entire database with all the tables or does django creates the whole database with just writing the models?
  am i doing something wrong? i belive i am but im not sure </p>
  
  <p>im not a profesional thought 
  im still learning</p>
  
  <p>im sorry for my english, it is not my first language</p>
  
  <p>btw thanks in advance</p>