gthole / gedgo

A Gedcom viewer web app.
MIT License
46 stars 12 forks source link

RESEARCH_FILES_ROOT is not set in settings.py #4

Closed akorosov closed 9 years ago

akorosov commented 9 years ago

Hi! I was able to install everything required in my Ubuntu (without vagrant) and finally run the server. There were some problems with parsing a GEDCOM file and with gedgo/templates which I fixed (will report later), but I stumbled on the one the error below.

Where is this setting coming from? What does it mean? How to set it correctly?

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/gedgo/1/

Django Version: 1.6.1
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'djcelery',
 'south',
 'django.contrib.admin',
 'gedgo')
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/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File "/home/antonk/gedgo_env/gedgo/views/model_views.py" in gedcom
  25.             'comment_noun': noun
File "/home/antonk/gedgo_env/gedgo/views/util.py" in render
  73.         context_instance=RequestContext(request, site_context(request))
File "/home/antonk/gedgo_env/gedgo/views/util.py" in site_context
  86.         getattr(settings, 'RESEARCH_FILES_ROOT'),
File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py" in __getattr__
  55.         return getattr(self._wrapped, name)

Exception Type: AttributeError at /gedgo/1/
Exception Value: 'Settings' object has no attribute 'RESEARCH_FILES_ROOT'
gthole commented 9 years ago

Yep, I need to add a default on that getattr.

The RESEARCH_FILES_ROOT setting turns on a feature to allow site users to browse a directory of media. Suppose you have a big dump of photos and documents and movies to be sorted through, the RESEARCH_FILES_ROOT gives lets users navigate and view those files via the Gedgo interface.

Apologies for not documenting it.

Will you be opening a pull request or issue tickets for the other problems you encountered?

Thanks!

akorosov commented 9 years ago

Thank you for the reply! I will probably open issues and provide thoughts how to solve other issues. Pull requests are more binding ;)

gthole commented 9 years ago

Reported issue is resolved now. Closing.