Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Sync Disqus comments to your database and render them as HTML for better SEO
This app is lightweight SEO optimizer for DISQUS comment system for your Django application.
It features Django management command/Celery task to sync comments from DISQUS to your database and to embed them to the page for web crawlers like Google. DISQUS comment system is JS based and Google still has issues indexing it.
This app also features template tag to embed prerendered comments to your page.
First, install using pip:
pip install django-disqus-sync
Next, you need to create DISQUS app in order to be able to use their API to download comments.
You can create your app here: https://disqus.com/api/applications/
Then, configure in your django settings.py
using keys you were given:
DISQUS_API_KEY = '...'
DISQUS_API_SECRET = '...'
DISQUS_WEBSITE_SHORTNAME = '[NAME OF YOUR DISQUS FORUM HERE]'
Also make sure you have some cache configured since this apps needs it to save queries and load temporary URL to THREAD list.
Next, you need to setup period updates of comments in your forum. Either set up a cron to run management command:
manage.py disqus_sync
Or, you can use Celery to run it. Celery task should be auto-registered and you only need to configure Celerybeat to fire it up from time to time.
Last, use the templatetag in your templates to embed comments:
{% load disqus_sync %}
{% render_disqus_comments %}
That's it, comments should be rendered to your page. They will not be seen in browser, because they are by default wrapped in "display: none;" div.
You can override template used to render the comments by creating
disqus_sync/comments.html
, disqus_sync/comment.html
or both.
FAQs
Sync Disqus comments to your database and render them as HTML for better SEO
We found that django-disqus-sync demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.