<script type="text/javascript">
var setTheme = localStorage.getItem('theme')
console.log('theme:', setTheme)
if(setTheme==null){
swapStyle('{% static 'base/css/main.css' %}')
}else{
swapStyle(setTheme)
}
function swapStyle(sheet){
document.getElementById('mystylesheet').href = sheet
localStorage.setItem('theme', sheet)
}
</script>