Hi Jonathan,

Thanks for the response. How do I do that? I ran *sudo chmod -R a+rwX
Projects/* and I still get the same error. How do I go about making the
folder writable?

Thanks.

On Sat, Mar 17, 2012 at 6:13 PM, Jonathan D. Baker <
jonathandavidba...@gmail.com> wrote:

> You need to make sure your server has  write permissions on the
> home/projects directory.
>
> Sent from my iPhone
>
> On Mar 17, 2012, at 9:02 AM, Sithembewena Lloyd Dube <zebr...@gmail.com>
> wrote:
>
> Hi all,
>
> I have a model with an ImageField and when I try to save a record in the
> admin site, I get the following:
>
> Environment:
>
>
> Request Method: POST
> Request URL: http://127.0.0.1:8000/admin/myapp/course/add/
>
> Django Version: 1.3.1
> Python Version: 2.7.2
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'django.contrib.admin',
>  'munchlearnapp']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Traceback:
> File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py"
> in get_response
>   111.                         response = callback(request,
> *callback_args, **callback_kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in
> wrapper
>   307.                 return self.admin_site.admin_view(view)(*args,
> **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
> in _wrapped_view
>   93.                     response = view_func(request, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py"
> in _wrapped_view_func
>   79.         response = view_func(request, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in
> inner
>   197.             return view(request, *args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
> in _wrapper
>   28.             return bound_func(*args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
> in _wrapped_view
>   93.                     response = view_func(request, *args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
> in bound_func
>   24.                 return func(self, *args2, **kwargs2)
> File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py" in
> inner
>   217.                 res = func(*args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in
> add_view
>   882.                 self.save_model(request, new_object, form,
> change=False)
> File
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in
> save_model
>   665.         obj.save()
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py" in
> save
>   460.         self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py" in
> save_base
>   543.                         for f in meta.local_fields if not
> isinstance(f, AutoField)]
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/files.py"
> in pre_save
>   255.             file.save(file.name, file, save=False)
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/files.py"
> in save
>   92.         self.name = self.storage.save(name, content)
> File "/usr/local/lib/python2.7/dist-packages/django/core/files/storage.py"
> in save
>   49.         name = self._save(name, content)
> File "/usr/local/lib/python2.7/dist-packages/django/core/files/storage.py"
> in _save
>   166.             os.makedirs(directory)
> File "/usr/lib/python2.7/os.py" in makedirs
>   150.             makedirs(head, mode)
> File "/usr/lib/python2.7/os.py" in makedirs
>   150.             makedirs(head, mode)
> File "/usr/lib/python2.7/os.py" in makedirs
>   150.             makedirs(head, mode)
> File "/usr/lib/python2.7/os.py" in makedirs
>   150.             makedirs(head, mode)
> File "/usr/lib/python2.7/os.py" in makedirs
>   157.     mkdir(name, mode)
>
> Exception Type: OSError at /admin/myapp/course/add/
> Exception Value: [Errno 13] Permission denied: '/home/projects'
>
> I'm on Ubuntu 11.10, using Django 1.3.1. Any thoughts? Thanks.
>
> --
> Regards,
> Sithembewena Lloyd Dube
>
> --
> 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.
>
>  --
> 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.
>



-- 
Regards,
Sithembewena Lloyd Dube

-- 
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.

Reply via email to