Open akats opened 9 years ago
Because we want to separate our Django instance from our SwampDragon instance, we add a subdomain so we can run this on port 80 (we want to use the same port as http to prevent firewall issues).
Yeah, that's the post. I think it would help if it referred to the names of the configuration variables, like DRAGON_URL.
Hello,
I also noticed while doing your excellent tutorial http://swampdragon.net/tutorial/part-1-here-be-dragons-and-thats-a-good-thing/ that I needed to add DRAGON_URL to settings in order the app to work.
This wasn't mentioned in tutorial and without that setting I got following error:
Traceback (most recent call last):
File "..snip..todo-example/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 189, in __call__
response = self.get_response(request)
File "..snip..todo-example/lib/python2.7/site-packages/django/core/handlers/base.py", line 218, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "..snip..todo-example/lib/python2.7/site-packages/django/core/handlers/base.py", line 261, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/Users/arsi/dev/giosgapps-todo-example/giosgapps_todo_example/src/giosgapps_todo_example/wsgi.py", line 24, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "..snip..todo-example/lib/python2.7/site-packages/django/core/handlers/base.py", line 164, in get_response
response = response.render()
File "..snip..todo-example/lib/python2.7/site-packages/django/template/response.py", line 158, in render
self.content = self.rendered_content
File "..snip..todo-example/lib/python2.7/site-packages/django/template/response.py", line 135, in rendered_content
content = template.render(context, self._request)
File "..snip..todo-example/lib/python2.7/site-packages/django/template/backends/django.py", line 74, in render
return self.template.render(context)
File "..snip..todo-example/lib/python2.7/site-packages/django/template/base.py", line 210, in render
return self._render(context)
File "..snip..todo-example/lib/python2.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
return self.nodelist.render(context)
File "..snip..todo-example/lib/python2.7/site-packages/django/template/base.py", line 905, in render
bit = self.render_node(node, context)
File "..snip..todo-example/lib/python2.7/site-packages/django/template/debug.py", line 79, in render_node
return node.render(context)
File "..snip..todo-example/lib/python2.7/site-packages/django/template/base.py", line 1197, in render
return func(*resolved_args, **resolved_kwargs)
File "..snip..todo-example/lib/python2.7/site-packages/swampdragon/templatetags/swampdragon_tags.py", line 9, in swampdragon_settings
root_url = getattr(settings, 'DRAGON_URL') or 'http://localhost:9999/'
File "..snip..todo-example/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'DRAGON_URL'
Interesting project by the way! :)
In a production environment, it is recommended that Swampdragon runs on a subdomain of the site. The variable DRAGON_URL must point to that subdomain. This isn't documented in either the blog post on deployment, nor with the other settings. Would it be possible to take that blog entry, add this information as one of the steps, and copy to the documentation?