Internationalization. compilemessages.

2009-12-11 Thread Chirolo
Hi.
Does any of you have had problems using django-admin.py
compilemessages?
I trying to change the language in a project from Spanish to English.
I have follow all the django steps.
1-Translating strings> {% trans 'string' %}
2- Traslating some forms---> name= forms.CharField(label=_
('Name'))
3- Configuring the i18n in settings.
4- Modified de MIDDLEWARE_CLASSES-->
django.middleware.locale.LocaleMiddleware
5-Modified the url.py>(r'^i18n/', include
('django.conf.urls.i18n'))

I was able to run-> python manage.py makemessages -l en
and created the file django.po
But my problem is that when I run django-admin.py compilemessages
doesn't create the file django.mo
I changed the properties of the directories and file, but I did not
succeed.
I running the development server on an ubuntu system.
Would you have any suggestions why this file is not created?
Thanks.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Uploading an Image.

2009-10-12 Thread Chirolo

Hi Arthur.
I'm not so experience with linux.
I can get to the directories and files of apparmor, but how do I
stopped.
Thank you.

On Oct 11, 12:04 pm, Arthur Metasov  wrote:
> If you use distribution with apparmor try to stop it (/etc/init.d/apparmor).
>
> If the problem disappears, find apparmor config for apache and add there
>
> /home/Djangoprojects/ rw,
> /home/Djangoprojects/** rw,
> /home/Djangoprojects/imageupload/** rw,
>
> 2009/10/11 Chirolo 
>
>
>
> > Hi Bayuadji.
> > I already change the permissions for my Djangoprojects directory to
> > rwxrwxrwx, but still couldn't write to my Image directory, which I
> > also changed the permissions.
> > Do I need to change the permissions to my /home directory?
> > Here are the permissions of my home directory -> dwrxr-xr-x
>
> > On Oct 9, 7:31 pm, Bayuadji  wrote:
> > > Hi Chirolo
>
> > > On 10/9/09, Chirolo  wrote:
>
> > > > My question is which file or directory controls this webserverprocess?
> > > > or what can I do to solve my problem.
> > > > Thank you in advance.
> > > > Here is the error output that I get:
> > > > File "/usr/lib/python2.5/os.py" in makedirs
> > > >   164.             makedirs(head, mode)
> > > > File "/usr/lib/python2.5/os.py" in makedirs
> > > >   164.             makedirs(head, mode)
> > > > File "/usr/lib/python2.5/os.py" in makedirs
> > > >   164.             makedirs(head, mode)
> > > > File "/usr/lib/python2.5/os.py" in makedirs
> > > >   171.     mkdir(name, mode)
>
> > > > Exception Type: OSError at /imageupload/
> > > > Exception Value: [Errno 13] Permission denied: '/home/Djangoprojects'
>
> > > I think the error comes when creating a directory though.
> > > have you change the permission for '/home/Djangoprojects'?
>
> > > -djibon-
>
> > > --
> > > --
> >http://www.tumbletooth.org
> > > my linkedin profile :http://www.linkedin.com/in/bayuadji
> > > --
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Uploading an Image.

2009-10-12 Thread Chirolo

The error chows /imageupload/ as directory, but it's the name of the
url which run upload view.

On Oct 11, 8:58 am, andreas schmid  wrote:
> i had the same issue a few days ago and i solved it by simply adding
> write permission to all for the given directory, not for the whole
> /media/ or even home.
>
> your error differs a bit from mine... does the directory /imageupload/
> exist in /home/Djangoprojects ??
>
> Chirolo wrote:
> > Hi Bayuadji.
> > I already change the permissions for my Djangoprojects directory to
> > rwxrwxrwx, but still couldn't write to myImagedirectory, which I
> > also changed the permissions.
> > Do I need to change the permissions to my /home directory?
> > Here are the permissions of my home directory -> dwrxr-xr-x
>
> > On Oct 9, 7:31 pm, Bayuadji  wrote:
>
> >> Hi Chirolo
>
> >> On 10/9/09, Chirolo  wrote:
>
> >>> My question is which file or directory controls this webserverprocess?
> >>> or what can I do to solve my problem.
> >>> Thank you in advance.
> >>> Here is the error output that I get:
> >>> File "/usr/lib/python2.5/os.py" in makedirs
> >>>   164.             makedirs(head, mode)
> >>> File "/usr/lib/python2.5/os.py" in makedirs
> >>>   164.             makedirs(head, mode)
> >>> File "/usr/lib/python2.5/os.py" in makedirs
> >>>   164.             makedirs(head, mode)
> >>> File "/usr/lib/python2.5/os.py" in makedirs
> >>>   171.     mkdir(name, mode)
>
> >>> Exception Type: OSError at /imageupload/
> >>> Exception Value: [Errno 13] Permission denied: '/home/Djangoprojects'
>
> >> I think the error comes when creating a directory though.
> >> have you change the permission for '/home/Djangoprojects'?
>
> >> -djibon-
>
> >> --
> >> --http://www.tumbletooth.org
> >> my linkedin profile :http://www.linkedin.com/in/bayuadji
> >> --
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Uploading an Image.

2009-10-11 Thread Chirolo

Hi Bayuadji.
I already change the permissions for my Djangoprojects directory to
rwxrwxrwx, but still couldn't write to my Image directory, which I
also changed the permissions.
Do I need to change the permissions to my /home directory?
Here are the permissions of my home directory -> dwrxr-xr-x

On Oct 9, 7:31 pm, Bayuadji  wrote:
> Hi Chirolo
>
> On 10/9/09, Chirolo  wrote:
>
>
>
> > My question is which file or directory controls this webserverprocess?
> > or what can I do to solve my problem.
> > Thank you in advance.
> > Here is the error output that I get:
> > File "/usr/lib/python2.5/os.py" in makedirs
> >   164.             makedirs(head, mode)
> > File "/usr/lib/python2.5/os.py" in makedirs
> >   164.             makedirs(head, mode)
> > File "/usr/lib/python2.5/os.py" in makedirs
> >   164.             makedirs(head, mode)
> > File "/usr/lib/python2.5/os.py" in makedirs
> >   171.     mkdir(name, mode)
>
> > Exception Type: OSError at /imageupload/
> > Exception Value: [Errno 13] Permission denied: '/home/Djangoprojects'
>
> I think the error comes when creating a directory though.
> have you change the permission for '/home/Djangoprojects'?
>
> -djibon-
>
> --
> --http://www.tumbletooth.org
> my linkedin profile :http://www.linkedin.com/in/bayuadji
> --
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Uploading an Image.

2009-10-09 Thread Chirolo

Probably this problem has been issue before, but I couldn't find an
easy explanation.
My problem: When Uploading an image I cannot write to the "image"
directory.
What I have done: I already changed the permissions on my main
directory, and Image directory with 777 and still I'm not able to
write to that directory.
I'm a superuser running the development server with django 1.1 alpha 1
SVN-9984
 in a Ubuntu 8.04 - the Hardy Heron box.
The database that I'm using is Postgresql and Python2.5.
I read in some post that the webserverprocess might not have
permissions to write to the directory.
My question is which file or directory controls this webserverprocess?
or what can I do to solve my problem.
Thank you in advance.
Here is the error output that I get:
File "/usr/lib/python2.5/os.py" in makedirs
  164. makedirs(head, mode)
File "/usr/lib/python2.5/os.py" in makedirs
  164. makedirs(head, mode)
File "/usr/lib/python2.5/os.py" in makedirs
  164. makedirs(head, mode)
File "/usr/lib/python2.5/os.py" in makedirs
  171. mkdir(name, mode)

Exception Type: OSError at /imageupload/
Exception Value: [Errno 13] Permission denied: '/home/Djangoprojects'


--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: User created in postgresql is not found when Adding Data to the API.

2008-03-29 Thread Chirolo

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
[]
>>>
"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 
> import settings # Assumed to be in the same directory.
>   File "/home/wistong/django_projects/iFriends/iFriends/settings.py",
> line 13, in 
> 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 "", line 1, in 
> >   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
-~--~~~~--~~--~--~---



Re: User created in postgresql is not found when Adding Data to the API.

2008-03-27 Thread Chirolo

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 "", line 1, in 
  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 "", line 1, in 
>   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
-~--~~~~--~~--~--~---



Re: User created in postgresql is not found when Adding Data to the API.

2008-03-26 Thread Chirolo

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 
import settings # Assumed to be in the same directory.
  File "/home/wistong/django_projects/iFriends/iFriends/settings.py",
line 13, in 
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 "", line 1, in 
>   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
-~--~~~~--~~--~--~---



User created in postgresql is not found when Adding Data to the API.

2008-03-25 Thread Chirolo

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 "", line 1, in 
  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
-~--~~~~--~~--~--~---