Current OSQA version created for using with old version Django (1.3) You need to make fixes for work with current version (1.5.4 right now). Or check it out some forks on github, like this mine. https://github.com/8c1/OSQA
How to fix RSS feeds in OSQA?
Question
When trying to access the RSS link in my Windows installation of OSQA, the error log shows the following error:
C:\python27\lib\site-packages\django\core\handlers\base.py TIME: 2013-05-09 17:46:37,956 MSG: base.py:handle_uncaught_exception:209 Internal Server Error: /feeds/rss
Traceback (most recent call last):
File "C:\python27\lib\site-packages\django\core\handlers\base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "c:\inetpub\wwwroot\osqa\[mysite.com]\forum\views\readers.py", line 73, in feed
settings.APP_DESCRIPTION)(request)
File "C:\python27\lib\site-packages\django\contrib\syndication\views.py", line 37, in __call__
feedgen = self.get_feed(obj, request)
File "C:\python27\lib\site-packages\django\contrib\syndication\views.py", line 97, in get_feed
current_site = get_current_site(request)
File "C:\python27\lib\site-packages\django\contrib\sites\models.py", line 92, in get_current_site
current_site = Site.objects.get_current()
File "C:\python27\lib\site-packages\django\contrib\sites\models.py", line 25, in get_current
current_site = self.get(pk=sid)
File "C:\python27\lib\site-packages\django\db\models\manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "C:\python27\lib\site-packages\django\db\models\query.py", line 349, in get
% self.model._meta.object_name)
DoesNotExist: Site matching query does not exist.
c:\inetpub\wwwroot\osqa\[mysite.com]\forum\views\meta.py TIME: 2013-05-09 17:46:37,960 MSG: meta.py:error_handler:200
error executing request:
PATH: /feeds/rss
USER: fadder111 (60)
METHOD: GET
POST PARAMETERS:
None
GET PARAMETERS:
None
HTTP HEADERS:
AUTH_TYPE:
wsgi.multiprocess: False
HTTPS_SERVER_ISSUER:
HTTP_COOKIE: greeting_set=True; csrftoken=482ec461eee5e692b60276b05ae2c41f; sessionid=49ed4088169860ce5f7abb10c573a999; __utma=87189386.1808482846.1368120178.1368120178.1368120178.1; __utmb=87189386.13.10.1368120179; __utmc=87189386; __utmz=87189386.1368120179.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
wsgi.multithread: False
SERVER_SOFTWARE: Microsoft-IIS/7.5
SCRIPT_NAME:
LOCAL_ADDR: 10.0.2.144
QUERY_STRING:
REQUEST_METHOD: GET
REMOTE_USER:
PATH_INFO: /feeds/rss
SERVER_PROTOCOL: HTTP/1.1
CERT_COOKIE:
AUTH_PASSWORD:
CONTENT_LENGTH: 0
HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3
APPL_PHYSICAL_PATH: c:\inetpub\wwwroot\osqa\[mysite.com]\
HTTP_CONNECTION: keep-alive
HTTP_REFERER: http://[mysite.com]/
SERVER_NAME: [mysite.com]
REMOTE_ADDR: 69.157.47.xxx
APPL_MD_PATH: /LM/W3SVC/38/ROOT
INSTANCE_ID: 38
HTTPS_KEYSIZE:
SERVER_PORT: 80
REQUEST_URI: /feeds/rss
CERT_SERIALNUMBER:
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTPS_SERVER_SUBJECT:
URL: /feeds/rss
HTTPS_SECRETKEYSIZE:
SCRIPT_FILENAME: c:\inetpub\wwwroot\osqa\[mysite.com]\feeds\rss
wsgi.input: <__main__.InputStream object at 0x02BCA1D0>
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
HTTP_HOST: [mysite.com]
HTTPS: off
SERVER_PORT_SECURE: 0
CERT_SUBJECT:
CERT_ISSUER:
CERT_FLAGS:
PATH_TRANSLATED: c:\inetpub\wwwroot\osqa\[mysite.com]\feeds\rss
wsgi.version: (1, 0)
GATEWAY_INTERFACE: CGI/1.1
wsgi.run_once: False
CSRF_COOKIE: 482ec461eee5e692b60276b05ae2c41f
wsgi.errors: <__main__.TeeOutputStream object at 0x0298E9D0>
REMOTE_PORT: 54728
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
APPL_PATH:
LOGON_USER:
INSTANCE_NAME: [mysite.com]
CONTENT_TYPE:
INSTANCE_META_PATH: /LM/W3SVC/38
AUTH_USER:
DOCUMENT_ROOT: c:\inetpub\wwwroot\osqa\[mysite.com]\
REMOTE_HOST: 69.157.47.121
HTTP_ACCEPT_ENCODING: gzip,deflate,sdch
wsgi.url_scheme: http
In Windows, I created the environment variable DJANGO_SETTINGS_MODULE=mysite.settings but this returns an error indicating it could not import the settings - Is it on sys.apth?
My OSQA installation is in C:inetpub\wwwroot\osqa\osqa.community.site (the dir name has periods in it).
How can I get this working?
Thanks
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow