NICE and easy disqus commenting system integration for django/flask blogs!
Hey Harrison and everyone just wanted to share a pretty sweet commenting system integration that you can put almost anywhere very quickly without engineering anything. I like flask but Im deciding to focus on Django for production because of its great structure for scalability and organization, integrated ORM, sqlite3db, and admin module for automated blogging and other stuff. Only thing I am currently lacking is pagination for the blog Posts that we made in your Django tutorials.
Here is how to integrate disqus commenting system in your sites.
Create an account at disqus, select 'I want to use it in my site', Select Basic. Add your sites info: shortname (nickname of your choice) and domain (in my case Im devving locally on ubuntu VM and used my dev domain I created 'djang0.me' for my test django blog). Go to installation instructions, select 'universal code' at bottom and copy the code. I decided to use an include disqus block in my django blogs Post template, which is very nice. I have a toggle collapse button holding the comment section in a bootstrap col-md-6 panel:
<script> /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ /* var disqus_config = function () { this.page.url = djang0.me; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = ; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; */ (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = 'https://YOURSHORTHANDNAME.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>