Skip to main content

A simple Django app to provide access to a robots.txt file

Project description

A simple Django app to serve a robots.txt file.


Django 1.2 or greater, Python 2.7 or greater.


Use your favorite Python installer to install it from PyPI:

pip install django-roberts

Or get the source from the application site:

hg clone

The robots package, included in the distribution, should be placed on the PYTHONPATH.


  1. Add robots to your INSTALLED_APPS setting.

  2. Include the package’s url patterns in your root

    url(r'', include('robots.urls')),

If your run Django’s development server you should now be able to see the example robots.txt file at


For convenience the package defines the usable combinations of robots directives which can be used in your views and templates.

The following constants are defined:


Here’s a simple example of using these constants in practice…

In your view:

import robots

class MyView(ListView):
    meta_robots = robots.NOINDEX_FOLLOW

In your base template:

# base.html
  {% include 'robots/meta_robots.html' %}

  <!-- OR -->

  {% if view.meta_robots %}
    <meta name="robots" content="{{ view.meta_robots }}">
  {% endif %}

Python package

The Python package is available from PyPI

Get the source code

From our BitBucket repository.

Report a bug

Please report any bugs through our Issue Tracker.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-roberts, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size django-roberts-0.1.3.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page