Package: django-joyride
django-joyride==============A django application which gives flexibility to configure Guided Tourson your site through admin panel.-  This application is built on top of jQuery plugin `zurb-joyride <https://github.com/zurb/joyride>`__.Installation============-  Install from PyPI with ``easy_install`` or ``pip``:::pip install django-joyride-  To use ``django-joyride`` in your Django project:1.  Add ``joyride`` to your ``INSTALLED_APPS`` setting.2.  Run ``syncdb`` command to initialise the ``joyride`` database tables3.  Run ``collectstatic`` command to collect the static files of joyrideinto ``STATIC_ROOT``Configuration=============Available settings:-  ``JOYRIDE_JQUERY_URL``-  Set this to different version of jquery in your static folder, If youwish to use a different version of jQuery, or host it yourself-  e.g. ``JOYRIDE_JQUERY_URL = 'joyride/js/jquery.min.js'`` This willuse the jQuery available at ``STATIC_URL/joyride/js/jquery.min.js``.

   A relative ``JOYRIDE_JQUERY_URL`` is relative to ``STATIC_URL``.-  Set this to ``None`` if you have already included jQuery in yourtemplate so that ``joyride_media`` and ``joyride_js`` template tagshould not include jQuery to avoid conflict.-  e.g. ``JOYRIDE_JQUERY_URL = None``-  ``JOYRIDE_JQUERY_COOKIE_URL``-  Same settings as ``JOYRIDE_JQUERY_URL``, it decide whether to includeor not to include the ``jquery.cookie.js``. This should be includedif you are going to use the ``zurb-joyride`` option ``cookieMonster``-  ``JOYRIDE_JQUERY_MODERNIZR_URL``-  Same settings as ``JOYRIDE_JQUERY_URL``, it decide whether to includeor not to include the jquery modernizr.-  ``JOYRIDE_LIB_URL``-  Set this to use latest version of ``zurb-joyride`` js libraryinstead. This package already contains this library with some bugfixes. It is strongly suggested that you should not change thissetting until ``zurb-joyride`` apply some fixes which I have postedthere, check status of `Issue 161 <https://github.com/zurb/joyride/issues/161>`__
    and `Issue 167 <https://github.com/zurb/joyride/issues/167>`__Add joyride tours from admin============================-  The model and model fields are self explanatory. All model fieldshave help text for better understanding. Still if you want moredocumentation on it then check the comprehensive `documentation <http://zurb.com/playground/jquery-joyride-feature-tour-plugin>`__ on ``zurb-joyride``-  Following model fields are extra and comes in handy:-  ``url_path``-  The url e.g. ``/about/`` or url regex ``/abc/\d+/`` of the pagefor which you are creating the joyride tour. Later on you can usethis as a parameter in template tags to filter joyrides based on``request.path``-  The **BOTTLENECK** of ``zurb-joyride``-  ``showJoyRideElement`` and ``showJoyRideElementOn`` fields-  Arrggh! it is not possible to use multiple joyrides on single pageunless previous joyrides are destroyed. So in order to overcomethat situation sometime you might want to activate the secondjoyride tour on some event. Lets say we want our second joyride tobe activated when user ``click`` on some element whose id or classis ``abc`` then you need to set ``showJoyRideElement=#abc`` and``showJoyRideElementOn=click``.-  ``destroy`` field-  IDs(slug) of joyrides which should be destroyed before invokingthis joyride e.g. ``destroy=#abc, #cde``Template Tags=============1. **Include The Media**-  Load the django-joyride template tags ``{% load joyride_tags %}``-  Include the media (css and js files) ``{% joyride_media %}``-  By default the ``joyride_media`` tag also includes ``jQuery``,``jQuery Modernizer`` and ``jQuery Cookie`` based on the value ofyour ``JOYRIDE_JQUERY_URL``, ``JOYRIDE_JQUERY_MODERNIZR_URL`` and``JOYRIDE_JQUERY_COOKIE_URL`` settings. To suppress the inclusionof these libraries (if you are already including it yourself), setthese settings to ``None``.|If you prefer to link CSS and Javascript from different locations,the ``joyride_media`` tag can be replaced with two separate tags,``joyride_css`` and ``joyride_js``. ``joyride_js`` accepts parametersto suppress jQuery, jQuery Modernizr and jQuery Cookie inclusion attemplate level also, just like ``joyride_media``-  e.g.``{% joyride_js no_jquery="true" no_jquery_modernizr="true" %}``1. **Include the joyride tour(s)**-  You need to use ``get_joyrides``, ``include_joyrides`` and``get_joyride``, ``include_joyride`` to include multiple joyridetours or single joyride tour respectively in template.-  ``get_joyrides`` and ``get_joyride`` both tags accept parameters tofilter the joyrides. Following filters are common in both:-  ``url_path`` filter joyrides by url path.-  e.g. ``{% get_joyrides url_path=request.path as joyrides %}``-  If you have left ``url_path`` empty while configuring joyride inadmin then in order to get those joyride whose ``url_path`` isempty you would do ``{% get_joyrides url_path="" as joyrides %}``-  ``for_user`` filter joyrides by user if you are using``JoyRideHistory`` model to keep track of joyrides with respect touser.-  e.g. ``{% get_joyrides for_user=request.user as joyrides %}`` #this will get all joyrides for user which are not viewed orcancelled by user.-  ``exclude_viewed`` (default=True) if you want to include alljoyrides for user irrespective of seen/cancelled or not-  e.g.``{% get_joyrides for_user=request.user exclude_viewed=False %}``-  ``slug`` only used with ``get_joyride`` to get single joyride.-  e.g. ``{% get_joyride "my-tour-slug" %}``-  Include Multiple joyrides::{% get_joyrides as joyrides %}{% include_joyrides joyrides %}-  Include Single joyride::{% get_joyride "my-tour-slug" as joyride %}{% include_joyride joyride %}JoyRideHistory Model====================-  This model is only used if you have registered users on your site andyou want to keep track of joyrides which are already viewed by userso that those joyrides should never be shown to user again. It is upto you how you are going to make use of this table. Below is anexample:|Set ``postRideCallback=mark_viewed_joyride`` (A method to call once thetour closes (cancelled or complete)) in admin. Write the javascriptcallback ``mark_viewed_joyride`` some where in your template:::function mark_joyride(index, tip, id){
             $.ajax({
                 url: '{% url mark_joyride %}',
                 data: {"slug": id},
                 dataType: 'text',
                 success: function(){
                     $("#"+id).remove(); // remove the element also from dom
                 }
             });
         }The view for ``{% url mark_joyride %}`` would be:::@login_required
         def mark_joyride(request):
             from joyride.models import JoyRide, JoyRideHistory
             slug = request.GET.get('slug')
             joyride = get_object_or_404(JoyRide, slug=slug)
             user = request.user
             obj, created = JoyRideHistory.objects.get_or_create(user=user, joyride=joyride)
             if not created:
                 obj.viewed = True
                 obj.save()
             return HttpResponse(json.dumps({}), content_type='application/json')Thanks To=========-  `zurb-joyride <https://github.com/zurb/joyride>`__ This package isbuilt on top of it.-  `django-markitup <https://bitbucket.org/carljm/django-markitup/>`__for some help in template tags.Changelog Summary=================### v0.1.1* Lots of Bug Fixes* postRideCallback now accepts third parameter the `parent_id` on which the joyride was initialized e.g. id of <ol> tag### v0.1.0* django-joyride releasedTODO=====* Testing accross various django and python version