Hi again.
Thank you once again Thomas.
I tried what you recommended and nothing worked.
Once again the problem was that I'm a newbie trying to learn.
Here is what I had done wrong since I started with this problem:
One field was never validated in my 'model.py' after running
'manage.py syncdb',
but I assumed that I could continue with my project. I never corrected
it, until now.
Here is the error that I used to get:
[EMAIL PROTECTED]:~/django_projects/iFriends/iFriends$ python manage.py
syncdb
Error: One or more models did not validate:
People.person: "headshot": To use ImageFields, you need to install the
Python Imaging Library. Get it at http://www.pythonware.com/products/pil/
.

I erased this field from my model.py and boom! IT WORKED

[EMAIL PROTECTED]:~/django_projects/iFriends/iFriends$ python manage.py
syncdb
Creating table auth_message
Creating table auth_group
Creating table auth_user
Creating table auth_permission
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table People_person
THIS IS WHAT YOU ARE SUPPOSED TO SEE WHEN RUNNING 'manage.py syncdb'

Here is my data input to the Database:
(InteractiveConsole)
>>> from iFriends.People.models import Person
>>> p = Person(name="Wiston Guzman", email="[EMAIL PROTECTED]")
>>> p.save()
>>> lst = Person.objects.all()
>>> print lst
[<Person: Wiston Guzman>]
>>>
"MORALEJA: We tried to follow rules, but those rules are not well
defined. Then, we struggle along the way
until we find our own answers with the help of those who care"
WG

On Mar 26, 10:40 pm, Chirolo <[EMAIL PROTECTED]> wrote:
> Hi again.
> I tried what Thomas suggested, but I still get the following error:
> NameError: name 'pwdtuple' is not defined
>
> [EMAIL PROTECTED]:~/django_projects/iFriends/iFriends$ python manage.py
> shell
> Traceback (most recent call last):
>   File "manage.py", line 4, in <module>
>     import settings # Assumed to be in the same directory.
>   File "/home/wistong/django_projects/iFriends/iFriends/settings.py",
> line 13, in <module>
>     user=pwdtuple[0]
> NameError: name 'pwdtuple' is not defined
> Any ideas to fix this problem, so I can continue my learning curve.
> Thank you.
> WG
>
> 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