Skip to content

gugu/django-ajax-crawling

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Ajax Crawling

Django application to make your AJAX application crawlable through django. This app is mainly based in this document https://developers.google.com/webmasters/ajax-crawling/docs/getting-started

Configuration

  1. Add the following middleware to your project's settings.py file:

    MIDDLEWARE_CLASSES = (
        # ...
        'django_ajax_crawling.middleware.HtmlSnapshotMiddleware',
        # ...
    )
  2. Create another urls.conf file (different from default project's urls.conf file), which will contain each ajax url to be crawled:

    from django.conf.urls import patterns, url
    
    urlpatterns = patterns('',
        url(r'^object/(?P<object>.*)/$', 'app.views_html_snapshot.object_details'),
    
    )
  3. Define configuration option to specify location of previous urls.conf file. i.e:

    AJAX_CRAWLING_URLCONF = 'project.urls_ajax_crawling'

About

app to make your AJAX application crawlable through django

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%