Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Django-s4a

SEO4Ajax is a service that let you get full visibility on search engines, social networks and display advertising of any AJAX website based on Angular, React, Backbone, Ember, jQuery etc.

django-s4a is a middleware for Django. It provides an easy way to proxy GET requests from non-js clients (e.g. crawlers) to SEO4Ajax.

Usage

Copy the seo4ajax.py file in your project root.

Add the middleware in the MIDDLEWARE list in settings.py, e.g.

MIDDLEWARE = [
  'django.middleware.security.SecurityMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  'project.seo4ajax.Middleware'
]

Set the S4A_TOKEN environment variable with the SEO4Ajax token of your site.

How it works

This middleware checks the presence of a user-agent string identifying bots. If the user-agent is detected as a bot, it requests the snapshot on SEO4Ajax and returns it to the bot.

Requirements

About

SEO4Ajax middleware for Django

Resources

License

Releases

No releases published

Packages

No packages published

Languages