Hi again.
Thank you Thomas for your help.
I think that I passed the role and authentication problem, but now I
have another problem.
Here is what I have done wrong.
When I created my database named 'iFriendsDB' in postgresql I created
it as super user.
and then within the iFriendsDB created the user 'amigo' and password
'test'.
So the owner of the Databased was postgres. Somehow, postgresql doen't
let the Django application to communicate with the database. Anyway
I'm not expert on this. I'm only describing what I did in case someone
encounter this problem.
I drop the IFriendsDB.
A created a user 'amigo' in postgres and then created  the iFriendDB
as 'amigo' as the owner of the 'iFriendsDB'. I went to the procedured
of syncdb and to write data to the database.
I bypass the role and authentication, but I have a new problem. I
don't know yet If data is being written in the database. I will keep
you posted.
Here is the error that I get after saving the data to the iFriendsDB.
>>> from iFriends.People.models import Person
>>> p = Person(name="Name", email="[EMAIL PROTECTED]")
>>> p.save()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py",
line 264, in save
    ','.join(placeholders)), db_values)
  File "/usr/lib/python2.5/site-packages/django/db/backends/util.py",
line 18, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: relation "People_person" does not exist


On Mar 25, 7:25 pm, Chirolo <[EMAIL PROTECTED]> wrote:
> Hello to all.
> I'm a newbie trying to learn Django.
> I'm running Django in a local machine with postgresql_psycop2 database
> in Ubuntu 6.02.
> So far I have been able to set up Django, Postgresql with no problems.
> I was able to create a project name iFriends, a model People, and a
> class Person.
> I also created a databased named iFriendsDB with a user name 'amigo'
> and a password 'test'.
> I had a problem with the authentication first and I went to change the
> file pg_hba.conf
> I change the socket local table field method, first I tried 'md5' and
> it didn't work, then I changed to 'trust' and It worked.
>
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
> local all all trust
> # IPv4 local connections:
> host all all 127.0.0.1/32 trust
> # IPv6 local connections:
> host all all ::1/128 trust
>
> But the PROBLEM that I have now is the following message:
> OperationalError: FATAL:  role "amigo" does not exist
>
> >>> from iFriends.People.models import Person
> >>> p = Person(name="name", email="email-adress")
> >>> p.save()
>
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
>   File "/usr/lib/python2.5/site-packages/django/db/models/base.py",
> line 218, in save
>     cursor = connection.cursor()
>   File "/usr/lib/python2.5/site-packages/django/db/backends/
> __init__.py", line 33, in cursor
>     cursor = self._cursor(settings)
>   File "/usr/lib/python2.5/site-packages/django/db/backends/
> postgresql_psycopg2/base.py", line 69, in _cursor
>     self.connection = Database.connect(conn_string, **self.options)
> OperationalError: FATAL:  role "amigo" does not exist
>
> by the way I changed several times the user name and password and I
> added them to 'settings.py'
>
> Any Ideas what do I need to change.
>
> Thank you.
> Chirolo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to