Bug 7437 - The page to add a layer source in the Django admin interface throws an error
Summary: The page to add a layer source in the Django admin interface throws an error
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9 M1
Assignee: Ed Bartosh
QA Contact: Cristina Agurida
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-03-09 16:09 UTC by Belen Barros Pena
Modified: 2015-05-27 09:57 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2015-03-09 16:09:06 UTC
Steps to reproduce:

1. Set up Toaster in managed mode making sure you create a superuser for Django auth when prompted

2. Start Toaster in managed mode and visit localhost:8000/admin in your browser

3. Log in using the superuser credentials you created in step 1

4. In the Site administration page, click on "Layer sources"

5. In the "Select layer source to change" page click the "add layer source" button in the top right hand corner

The page throws this error:

Environment:


Request Method: GET
Request URL: http://localhost:8000/admin/orm/layersource/add/

Django Version: 1.6
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.humanize',
'orm',
'toastermain',
'south',
'bldviewer',
'toastergui',
'bldcontrol')
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
  114.                     response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py"
in wrapper
  430.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py"
in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py"
in inner
  198.             return view(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
in _wrapper
  29.             return bound_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py"
in bound_func
  25.                 return func(self, *args2, **kwargs2)
File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py" in inner
  339.                 return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py"
in add_view
  1144.             form = ModelForm(initial=initial)
File "/usr/local/lib/python2.7/dist-packages/django/forms/models.py" in __init__
  302.             self.instance = opts.model()
File "/home/yocto/master/bitbake/lib/toaster/orm/models.py" in __call__
  625.         return obj.get_object()
File "/home/yocto/master/bitbake/lib/toaster/orm/models.py" in get_object
  672.             raise Exception("Unknown LayerSource type. If you
added a new layer source type, fill out all code stubs.")

Exception Type: Exception at /admin/orm/layersource/add/
Exception Value: Unknown LayerSource type. If you added a new layer
source type, fill out all code stubs.
Comment 1 Belen Barros Pena 2015-05-05 09:25:02 UTC
This patch submitted for bug 7618 

https://lists.yoctoproject.org/pipermail/toaster/2015-May/002061.html

also seems to fix this one
Comment 3 Cristina Agurida 2015-05-27 09:57:37 UTC
Verified on master: 5170177719a93a69cc6c7c1218b3f26eed82d6e0