Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No settings.js file on port 9999 #15

Closed
jdutriaux opened this issue Jan 4, 2015 · 4 comments
Closed

No settings.js file on port 9999 #15

jdutriaux opened this issue Jan 4, 2015 · 4 comments

Comments

@jdutriaux
Copy link

Hi, sorry if it's a dumb question but I can't get the settings.js file.

I didn't found anything in the documentation that mention where we can get this file. The url "http://my-domain.com:9999/settings.js" returns nothing.

I'm running my Django Project on an Nginx Server with uWSGI.

Thanks for the answer.

@jdutriaux
Copy link
Author

After many searches I found what I wanted in this blog post : http://swampdragon.net/blog/deploying-swampdragon/

You should really integrate this into the documentation 😉.

Edit : Maybe that post is outdated, I'm still having some issues... Reopening this ticket, sorry about that.

@jdutriaux jdutriaux reopened this Jan 4, 2015
@jdutriaux
Copy link
Author

With some changes I succedeed in talking to the server.

Now I have an error :

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1332, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swampdragon/settings_provider.py", line 14, in get
    'host': self.request.headers['Host'],
  File "/usr/local/lib/python2.7/dist-packages/tornado/httputil.py", line 209, in __getitem__
    return dict.__getitem__(self, _normalized_headers[name])
KeyError: 'Host'

@jdutriaux
Copy link
Author

I've made a mistake in the nginx config file >_<. Sorry again and keep the awesome work.

@hagsteel
Copy link
Owner

hagsteel commented Jan 6, 2015

I might make the deployment process into a tutorial rather than a blog post.
Deployment depends a lot on the individual. Personally I like uWSGI and NGINX, however some people prefer gunicorn instead, and I don't want to give the impression that people have to use uWSGI.

I will release an update soon, which will get rid of localhost:9999/settings.js in favour of using a template tag instead, this way it won't be necessary to go through the process of creating a custom context processor for different environments as well (it will all be managed through your settings.py).

Happy to see that you solved your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants