Django Tour is a `django>=1.6` app that helps navigate a user through a series of pages and ensures thateach step is successfully completed. A template tag is available to show the user the current progressthrough the tour by showing a simple UI. This UI can be styled and modified to suit different display scenarios.A single tour can be assigned to any number of users, and the completion of the steps can be per user or shared.

Any app that wants to define a tour should first create a tours.py file. This is where all of the customlogic will be contained. Start off by defining the steps needed for the tour; these steps should inherit from`BaseStep`.

##### `step_class`The full python path to the class

##### `name`The display name that will be used for this step of the tour.

It is up to your application code to determine when a user should be assigned a tour.

```pythonfrom django.contrib.auth.models import User

from path.to import ExampleTour

user = User.objects.get(id=1)ExampleTour.add_user(user)```

This will create a `TourStatus` instance linking `user` to the `ExampleTour` with `complete` set to False. The`add_user` method will automatically call `ExampleTour.create()` if there isn't already a tour record. The`create` method takes care of making records for each of the steps as well.

## Displaying the Navigation

In your django template all you need to do is load the tour tags with `{% load tour_tags %}` then put the`{% tour_navigation %}` tag where it should appear. When the user loads the template, a check will be performedto see if the user has any incomplete tours. If there is a tour, the navigation will be displayed.

If it makes sense to always display the tour navigation even after the final step is complete, then pass thealways_show argument to the tour tag `{% tour_navigation always_show=True %}`

## Restricting View Access

If the order of step completion is important for a tour, the view mixin `TourStepMixin` can be added to anydjango view that is part of the tour. The step is identified by the url of the view and if the usertries to access a page out of order, they will be redirected to the first incomplete step of the tour.Once a tour has been completed, the user will also be prevented from visiting other steps that inheritform the `TourStepMixin` in the tour.