{ "info": { "author": "Wes Okes", "author_email": "wes.okes@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4" ], "description": "[![Build Status](https://travis-ci.org/ambitioninc/django-tour.png)](https://travis-ci.org/ambitioninc/django-tour)\n## Django Tour\n\nDjango Tour is a `django>=1.6` app that helps navigate a user through a series of pages and ensures that\neach step is successfully completed. A template tag is available to show the user the current progress\nthrough the tour by showing a simple UI. This UI can be styled and modified to suit different display scenarios.\nA single tour can be assigned to any number of users, and the completion of the steps can be per user or shared.\n\n## Table of Contents\n\n1. [Installation] (#installation)\n1. [Creating a Tour] (#creating-a-tour)\n1. [Displaying the Navigation] (#displaying-the-navigation)\n1. [Changes](#changes)\n\n## Installation\nTo install Django Tour:\n\n```shell\npip install git+https://github.com/ambitioninc/django-tour.git\n```\n\nAdd Django Tour to your `INSTALLED_APPS` to get started:\n\nsettings.py\n\n```python\n# Simply add 'tour' to your installed apps.\n# Django Tour relies on several basic django apps.\nINSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.admin',\n 'django.contrib.sites',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n 'django.contrib.contenttypes',\n 'tour',\n)\n```\n\nMake sure Django's CsrfViewMiddleware is enabled:\n\nsettings.py\n\n```python\nMIDDLEWARE_CLASSES = (\n 'django.middleware.csrf.CsrfViewMiddleware',\n)\n```\n\nAdd Django Tour's urls to your project:\n\nurls.py\n\n```python\nfrom django.conf.urls import include, patterns, url\n\nurlpatterns = patterns(\n url(r'^tour/', include('tour.urls')),\n)\n```\n\n## Creating a Tour\n\nAny app that wants to define a tour should first create a tours.py file. This is where all of the custom\nlogic will be contained. Start off by defining the steps needed for the tour; these steps should inherit from\n`BaseStep`.\n\n##### `step_class`\nThe full python path to the class\n\n##### `name`\nThe display name that will be used for this step of the tour.\n\n\n```python\nfrom tour.tours import BaseStep, BaseTour\n\n\nclass FirstStep(BaseStep):\n step_class = 'path.to.FirstStep'\n name = 'First Step'\n\n @classmethod\n def get_url(cls):\n return reverse('example.first_step')\n\n def is_complete(self, user=None):\n return some_method(user)\n\n\nclass SecondStep(BaseStep):\n step_class = 'path.to.SecondStep'\n name = 'Second Step'\n\n @classmethod\n def get_url(cls):\n return reverse('example.second_step')\n\n def is_complete(self, user=None):\n return some_other_method(user)\n```\n\nNext, set up the tour class to contain these steps. The tour should inherit from `BaseTour` and a few attributes\nneed to be set.\n\n##### `tour_class`\nThe python path to the tour class\n\n##### `name`\nThe display name that will be used in the tour UI\n\n##### `steps`\nA list of step classes in the order they need to be completed\n\n##### `complete_url`\nThe url that will be returned when calling `get_next_url` after the tour is considered complete\n\n```python\nclass ExampleTour(BaseTour):\n tour_class = 'path.to.ExampleTour'\n name = 'Example Tour'\n complete_url = '/page/finished/'\n steps = [\n FirstStep,\n SecondStep,\n ]\n```\n\nIt is up to your application code to determine when a user should be assigned a tour.\n\n```python\nfrom django.contrib.auth.models import User\n\nfrom path.to import ExampleTour\n\n\nuser = User.objects.get(id=1)\nExampleTour.add_user(user)\n```\n\nThis will create a `TourStatus` instance linking `user` to the `ExampleTour` with `complete` set to False. The\n`add_user` method will automatically call `ExampleTour.create()` if there isn't already a tour record. The\n`create` method takes care of making records for each of the steps as well.\n\n## Displaying the Navigation\n\nIn your django template all you need to do is load the tour tags with `{% load tour_tags %}` then put the\n`{% tour_navigation %}` tag where it should appear. When the user loads the template, a check will be performed\nto see if the user has any incomplete tours. If there is a tour, the navigation will be displayed.\n\nIf it makes sense to always display the tour navigation even after the final step is complete, then pass the\nalways_show argument to the tour tag `{% tour_navigation always_show=True %}`\n\n## Restricting View Access\n\nIf the order of step completion is important for a tour, the view mixin `TourStepMixin` can be added to any\ndjango view that is part of the tour. The step is identified by the url of the view and if the user\ntries to access a page out of order, they will be redirected to the first incomplete step of the tour.\nOnce a tour has been completed, the user will also be prevented from visiting other steps that inherit\nform the `TourStepMixin` in the tour.\n\n```python\nclass MyView(TourStepMixin, TemplateView):\n \"\"\" view config \"\"\"\n```\n\n# Changes\n\n- 0.6.4\n - Updated to be DRF 3.1 compatible\n - Dropped Django 1.6 support\n- 0.6.3\n - Updated to `Tour` and `TourStatus` models Foreign Key to `settings.AUTH_USER_MODEL`\n- 0.6.2\n - Added Django 1.7 support", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ambitioninc/django-tour", "keywords": "", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-tour", "package_url": "https://pypi.org/project/django-tour/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-tour/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ambitioninc/django-tour" }, "release_url": "https://pypi.org/project/django-tour/0.7.0/", "requires_dist": null, "requires_python": null, "summary": "Require the django user to complete a series of steps with custom logic", "version": "0.7.0" }, "last_serial": 1753240, "releases": { "0.5.6": [ { "comment_text": "", "digests": { "md5": "fcc0f5d6271e02b33a1c67fbe42482d5", "sha256": "985322b0ce141618584484278b74e1d752db647dbb6691c5a17014aecde28443" }, "downloads": -1, "filename": "django-tour-0.5.6.tar.gz", "has_sig": false, "md5_digest": "fcc0f5d6271e02b33a1c67fbe42482d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16382, "upload_time": "2014-05-13T18:20:26", "url": "https://files.pythonhosted.org/packages/4a/c9/1a842601be0a42fbe08acc4f54515bbdc246c72de0d5f7f90fa864bfddf5/django-tour-0.5.6.tar.gz" } ], "0.5.7": [ { "comment_text": "", "digests": { "md5": "42816f630e983dffff7cf2bbbcef604e", "sha256": "a2a554a952bb6a02362adb036c0947aa4b655e856f2648b353c6da2b103ad73f" }, "downloads": -1, "filename": "django-tour-0.5.7.tar.gz", "has_sig": false, "md5_digest": "42816f630e983dffff7cf2bbbcef604e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15473, "upload_time": "2014-06-12T18:54:49", "url": "https://files.pythonhosted.org/packages/5c/49/4a03f69a865ae9ed2457372151e7ae6bcb664738f9235081201d8b7f0275/django-tour-0.5.7.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "9785aa7c9480c8e3ec0d1d10f5d2b505", "sha256": "3ea34b416b0b317b412c561a8fac97a880d495c7f76548d08bef890b4eb543e2" }, "downloads": -1, "filename": "django-tour-0.6.0.tar.gz", "has_sig": false, "md5_digest": "9785aa7c9480c8e3ec0d1d10f5d2b505", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16137, "upload_time": "2014-10-13T16:57:21", "url": "https://files.pythonhosted.org/packages/35/ac/a8ba47366c17984a9bc7e1c06eb6542881aef9a4792f6346e259eeac5d1d/django-tour-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "92bc2a89ff3bf18ecd81e6ecf07888a2", "sha256": "99865d729a805cf206f61f35faf45f2487ef6e0e71df0778b7ce9160b74fb7a4" }, "downloads": -1, "filename": "django-tour-0.6.1.tar.gz", "has_sig": false, "md5_digest": "92bc2a89ff3bf18ecd81e6ecf07888a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16174, "upload_time": "2015-01-05T19:15:02", "url": "https://files.pythonhosted.org/packages/d8/a1/751140ca09782a5c77e2f5800ce8570dfac5e0ca392fddb19089ba9cac36/django-tour-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "855e9113efe71c170b3d236f81fd7a84", "sha256": "1681f7b85a18331d601c84b61a72a3a50baa461d72a3c394b5edb1f84aaaa69c" }, "downloads": -1, "filename": "django_tour-0.6.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "855e9113efe71c170b3d236f81fd7a84", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 27305, "upload_time": "2015-04-01T19:44:04", "url": "https://files.pythonhosted.org/packages/ea/c1/634b2b8bb8aba057abda9626eb8cdcd573ec26a5d91cf1b5ad4cf9903aeb/django_tour-0.6.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6862981bacf39f9c5050f19c7c09ceb", "sha256": "b428f541707c8f90b0b9e3413398cb07f9788b8567350fbae27ff7531c1d8b55" }, "downloads": -1, "filename": "django-tour-0.6.2.tar.gz", "has_sig": false, "md5_digest": "a6862981bacf39f9c5050f19c7c09ceb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16836, "upload_time": "2015-04-01T19:44:00", "url": "https://files.pythonhosted.org/packages/4f/36/16679f8e4cbc3e066adec75c59b66a7952906ef2b18456b964003164cf9d/django-tour-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "8abebe74fdb74b9ac5bc04bd02731b14", "sha256": "2e903f58dce0f81a266bdf49bec95efddd155d97592735ac3b8edd80a3cbca9b" }, "downloads": -1, "filename": "django_tour-0.6.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8abebe74fdb74b9ac5bc04bd02731b14", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 27492, "upload_time": "2015-04-17T14:00:07", "url": "https://files.pythonhosted.org/packages/5e/b8/18c39004266a46ce27a1ec9cbe30663b920884fb861523e98a235d9d3874/django_tour-0.6.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3cf92b90c26c413747c2562450080e1d", "sha256": "7e24c278a1dcebbd21178b70eb0a4e99cdbfe2447a1321b79d05490d30a4c418" }, "downloads": -1, "filename": "django-tour-0.6.3.tar.gz", "has_sig": false, "md5_digest": "3cf92b90c26c413747c2562450080e1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16898, "upload_time": "2015-04-17T14:00:04", "url": "https://files.pythonhosted.org/packages/94/81/08e5de11bfccafb429e4308329cd4e5343ead1044e4e30313e95438ea331/django-tour-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "4a0796b377d15a603b734c66719e7162", "sha256": "4aecfc9f5ddb8491ad16f6a0b47b82cdd270460cea723cc01195395d436988d5" }, "downloads": -1, "filename": "django_tour-0.6.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4a0796b377d15a603b734c66719e7162", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 27770, "upload_time": "2015-07-22T18:17:10", "url": "https://files.pythonhosted.org/packages/88/0c/fb9ed81f542c697405bdfad60ee60eea7764257a3e0fcca43f764dbdf2d2/django_tour-0.6.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8c44451a8ca75353db9672c029f9421", "sha256": "9236dad6a801961d381c1cef6ee27483484bf58b9bf164c23cd32960d6f27279" }, "downloads": -1, "filename": "django-tour-0.6.4.tar.gz", "has_sig": false, "md5_digest": "f8c44451a8ca75353db9672c029f9421", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15183, "upload_time": "2015-07-22T18:17:07", "url": "https://files.pythonhosted.org/packages/b0/6e/25227fe963126f7cb05119069e1bfe6ca49ba6f1b07ca2ed1502462ae0cf/django-tour-0.6.4.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "6b16686c850c8b7c0124020edba937d4", "sha256": "152bafae544d447bf7e8346a271db32829282fbd417305992ab04bd542964b8e" }, "downloads": -1, "filename": "django_tour-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b16686c850c8b7c0124020edba937d4", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 23132, "upload_time": "2015-10-05T19:45:43", "url": "https://files.pythonhosted.org/packages/38/ee/911efa04fcd3624c0c38db11b45f5833086ae4f8f728c88dbb143a3380df/django_tour-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be07b5355bdfcc48173c7d7d5fa3019f", "sha256": "5d5a499d25f7358bb9069b38ccef894cabdeafde6a715782107a48f79fc1b619" }, "downloads": -1, "filename": "django-tour-0.7.0.tar.gz", "has_sig": false, "md5_digest": "be07b5355bdfcc48173c7d7d5fa3019f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15128, "upload_time": "2015-10-05T19:45:38", "url": "https://files.pythonhosted.org/packages/a4/e3/9958d833958d9e35096fa6ef957d09bbb3fea3b6a309bf8708c9c63725b5/django-tour-0.7.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b16686c850c8b7c0124020edba937d4", "sha256": "152bafae544d447bf7e8346a271db32829282fbd417305992ab04bd542964b8e" }, "downloads": -1, "filename": "django_tour-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b16686c850c8b7c0124020edba937d4", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 23132, "upload_time": "2015-10-05T19:45:43", "url": "https://files.pythonhosted.org/packages/38/ee/911efa04fcd3624c0c38db11b45f5833086ae4f8f728c88dbb143a3380df/django_tour-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be07b5355bdfcc48173c7d7d5fa3019f", "sha256": "5d5a499d25f7358bb9069b38ccef894cabdeafde6a715782107a48f79fc1b619" }, "downloads": -1, "filename": "django-tour-0.7.0.tar.gz", "has_sig": false, "md5_digest": "be07b5355bdfcc48173c7d7d5fa3019f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15128, "upload_time": "2015-10-05T19:45:38", "url": "https://files.pythonhosted.org/packages/a4/e3/9958d833958d9e35096fa6ef957d09bbb3fea3b6a309bf8708c9c63725b5/django-tour-0.7.0.tar.gz" } ] }