mozilla / django-badger

django-badger is a reusable Django app for creating and awarding badges. See also badges.mozilla.org
https://github.com/mozilla/django-badger
BSD 3-Clause "New" or "Revised" License
117 stars 61 forks source link

[badgus-dev.allizom.org] I can no longer create new badges #143

Closed Sheeri closed 11 years ago

Sheeri commented 11 years ago

When I create a new badge, I fill in the form and click "Create Badge" and then I get the URL https://badgus-dev.allizom.org/en-US/badges/create but a blank white page.

"View Source" is also empty.

lmorchard commented 11 years ago

Looks like that resulted in a Django traceback. Not sure how it happened, but file permissions are wrong to accept image uploads. Will need to file an IT bug to get that checked out.

Traceback (most recent call last):

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/contrib/auth/decorators.py", line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor-local/src/django-badger/badger/views.py", line 161, in create
    new_sub.save()

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor-local/src/django-badger/badger/models.py", line 430, in save
    super(Badge, self).save(**kwargs)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/db/models/base.py", line 460, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/db/models/base.py", line 543, in save_base
    for f in meta.local_fields if not isinstance(f, AutoField)]

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/db/models/fields/files.py", line 255, in pre_save
    file.save(file.name, file, save=False)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/db/models/fields/files.py", line 92, in save
    self.name = self.storage.save(name, content)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/core/files/storage.py", line 49, in save
    name = self._save(name, content)

  File "/data/www/badgus-dev.allizom.org/badg.us/vendor/lib/python/django/core/files/storage.py", line 166, in _save
    os.makedirs(directory)

  File "/usr/lib64/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)

  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)

OSError: [Errno 13] Permission denied: '/data/www/badgus-dev.allizom.org/badg.us/media/uploads'
lmorchard commented 11 years ago

Filed a Mozilla IT bug.

lmorchard commented 11 years ago

The IT bug is closed, and I was able to create a new badge.