global variable from django to javascript
I would use option 1. You should use a base template in any case, and a context processor is probably the best way of getting the variables into it.
I would like some variables from my settings.py to be available in every javascript running across my project.
What is the most elegant way of achieving this?
Right now I can think of two:

write a context processor and declare those globals in a base template. All templates must extend the base template.
declare those globals in a dynamically generated .js file (by some view) and load this file using <script> tag in a base template. All templates must extend the base template.

Can I do it without a base template?