I'm trying to integrate web3 into a website which uses Django.
This snippet of code is not working
<script type="text/javascript">
document.getElementById("Mining").innerText = "Test";
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://146.169.45.149:9002"));
var mining = web3.eth.mining;
</script>
</body>
When I place the line document.getElementById("Mining").innerText = "Test";
under the var web3 = require('web3');
it stops working, so I'm guessing the problem should be there.
I've included both scripts for web3
<!-- web3 scripts -->
<script type = "text/javascript" src="/static/poll/web3-light.js"></script>
<script type = "text/javascript" src="/static/poll/bignumber.js"></script>
Thanks.