@Clinton Could you take a look at this thread and help me please - 
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/openedx-ops/CbC3Jzlnqe0

On Tuesday, December 1, 2015 at 4:22:53 AM UTC+5:30, Clinton Blackburn 
wrote:
>
> What values are you using for your site and site configuration? What is 
> the ID of the site?
>
> I suspect that your site is linked to your real hostname, so your local 
> instance on host 127.0.0.1 is not being found, and defaulting to the 
> default site ID, 1, which is tied to example.com, unless you changed it.
>
> You can either change the SITE_ID setting to the appropriate and/or 
> replace the default Django example.com site with the correct values. I 
> recommend the latter to avoid future confusion and having an irrelevant 
> site in your database.
>
> On Sunday, November 29, 2015 at 7:08:51 PM UTC-5, Protocol Six Consulting 
> wrote:
>>
>> Hi,
>>
>> I have the Otto eCommerce service running at http://127.0.0.1:8002
>>
>> When I try to add a new course at http://127.0.0.1:8002/courses, it will 
>> not save the course. (Error! An error occurred while saving the data.)
>>
>> The stacktrace says "RelatedObjectDoesNotExist: Site has no 
>> siteconfiguration." but I created a site and partner per documentation
>> (
>> http://open-edx-ecommerce-guide.readthedocs.org/en/latest/partner_config.html#site-configuration-model-django-admin
>> )
>>
>> Any thought what might be happening?
>>
>> -----
>> Full stack trace below:
>>
>> 2015-11-29 18:44:16,812 ERROR 2277 [django.request] base.py:256 - 
>> Internal Server Error: /api/v2/publication/
>> Traceback (most recent call last):
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/django/core/handlers/base.py",
>>  
>> line 132, in get_response
>>     response = wrapped_callback(request, *callback_args, 
>> **callback_kwargs)
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/django/utils/decorators.py",
>>  
>> line 145, in inner
>>     return func(*args, **kwargs)
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/django/views/decorators/csrf.py",
>>  
>> line 58, in wrapped_view
>>     return view_func(*args, **kwargs)
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/django/views/generic/base.py",
>>  
>> line 71, in view
>>     return self.dispatch(request, *args, **kwargs)
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/rest_framework/views.py",
>>  
>> line 466, in dispatch
>>     response = self.handle_exception(exc)
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/rest_framework/views.py",
>>  
>> line 463, in dispatch
>>     response = handler(request, *args, **kwargs)
>>   File 
>> "/home/edx_ecommerce/otto.venv/ecommerce/ecommerce/extensions/api/v2/views/publication.py",
>>  
>> line 25, in post
>>     return self._save_and_publish(request.data)
>>   File 
>> "/home/edx_ecommerce/otto.venv/ecommerce/ecommerce/extensions/api/v2/views/publication.py",
>>  
>> line 35, in _save_and_publish
>>     serializer = self.get_serializer(data=data)
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/rest_framework/generics.py",
>>  
>> line 110, in get_serializer
>>     kwargs['context'] = self.get_serializer_context()
>>   File 
>> "/home/edx_ecommerce/otto.venv/ecommerce/ecommerce/extensions/api/v2/views/publication.py",
>>  
>> line 21, in get_serializer_context
>>     context['partner'] = get_partner_for_site(self.request)
>>   File 
>> "/home/edx_ecommerce/otto.venv/ecommerce/ecommerce/extensions/partner/shortcuts.py",
>>  
>> line 12, in get_partner_for_site
>>     return site.siteconfiguration.partner
>>   File 
>> "/home/edx_ecommerce/otto.venv/lib/python2.7/site-packages/django/db/models/fields/related.py",
>>  
>> line 470, in __get__
>>     self.related.get_accessor_name()
>> RelatedObjectDoesNotExist: Site has no siteconfiguration.
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/822ae1cb-24fe-4a22-8e40-d1be1c59e123%40googlegroups.com.

Reply via email to