Baton new minor release 1.10.x

We’ve just released a new minor version of django baton: 2.10.1

The new release introduces style changes in both the navbar and the sidebar menu. The resulting layout is more modern and cleaner for large screens, while stays the same for mobile devices.

The header navbar disappears for large screens while it remains on small devices which have a collapsed sidebar menu.

The user profile area is enriched with a gravatar icon with customizable default, and the view site, change password and logout links are rendered as icons.

There is no migration procedure because the new release is backward compatible, but you may need to change the admin/base_site.html template if you overwrote it. In fact this release adds a new baton endpoint url, used to retrieve the gravatar url of the currently logged in user, and a new configuration option:

    {% baton_config 'CONFIRM_UNSAVED_CHANGES' as confirm_unsaved_changes %}
    {% baton_config 'SHOW_MULTIPART_UPLOADING' as show_multipart_uploading %}
    {% baton_config 'ENABLE_IMAGES_PREVIEW' as enable_images_preview %}
    {% baton_config 'CHANGELIST_FILTERS_IN_MODAL' as changelist_filters_in_modal %}
    {% baton_config 'MENU_ALWAYS_COLLAPSED' as menu_always_collapsed %}
    {% baton_config 'MENU_TITLE' as menu_title %}
    {% baton_config 'GRAVATAR_DEFAULT_IMG' as gravatar_default_img %}
    (function ($, undefined) {
        $(window).on('load', function () {
            // init listeners
            Baton.Dispatcher.register('onReady', function () { console.log('BATON IS READY') })
            Baton.Dispatcher.register('onMenuReady', function () { console.log('BATON MENU IS READY') })
            Baton.Dispatcher.register('onNavbarReady', function () { console.log('BATON NAVBAR IS READY') })
            // end listeners
                api: {
                    app_list: '{% url 'baton-app-list-json' %}',
                    gravatar: '{% url 'baton-gravatar-json' %}'
                confirmUnsavedChanges: {{ confirm_unsaved_changes|yesno:"true,false" }},
                showMultipartUploading: {{ show_multipart_uploading|yesno:"true,false" }},
                enableImagesPreview: {{ enable_images_preview|yesno:"true,false" }},
                changelistFiltersInModal: {{ changelist_filters_in_modal|yesno:"true,false" }},
                menuAlwaysCollapsed: {{ menu_always_collapsed|yesno:"true,false" }},
                menuTitle: '{{ menu_title|escapejs }}',
                gravatarDefaultImg: '{{ gravatar_default_img }}'
    })(jQuery, undefined)

The new configuration option GRAVATAR_DEFAULT_IMG can assume one of the following values:

  • 404
  • mp
  • identicon
  • monsterid
  • wavatar
  • retro
  • robohash
  • blank

see more in the gravatar documentation page.