Add support for Django 1.7

Issue #147 new
Iván Raskovsky
created an issue

I've just tried it with 1.7 and several things pop up quickly.

The dashboard page is broken. This must be due to some html changes introduced in 1.7. Also, we must support index_title site_header and site_title that were introduced in AdminSite[1]

There's also the new migration system. We can support both south and contrib.migrations if we wish so by using south_modules and migration_modules [2, 3]

And finally the new app loading refactor. Apps now have a verbose_name to be used in the admin.

How would you like to tackle all this?

  1. A backwards incompatible release; since there's quite a few changes it might be a good idea, and leave a maintenance branch for bugfixes
  2. Support several release in only one branch
  3. Support 1.7 in a new branch and maintain another branch for older releases.

I would personally go with option 1 or 2, but in case we decide option 2 we might think about deprecating a couple of django versions, supporting django from 1.5 o 1.6.

[1] [2] [3]

Comments (4)

  1. santiago ribaguifi

    Regarding to broken dasboard layout, I've found the commit that updates CSS and breaks, because introduces CSS floats.

    Here a possible quick fix:

    <!-- custom base_site.html -->
    {% extends "admin/base.html" %}
    {% load admin_tools_menu_tags utils %}
    <!-- [...] -->
    {% block nav-global %}
    {% if user.is_active and user.is_staff %}
    {% if not is_popup %}
    <br style="clear:both"> <!-- clear CSS float introduced by #branding and #user_tools -->
    {% admin_tools_render_menu %}
    {% endif %}
    {% endif %}
    {% endblock %

    Sorry, I can't test it now in a clean environment, but I hope the idea was clear.

  2. Lúcio Henrique

    Because new AppConfig in v1.7 where we can set a verbose name, CustomAppIndexDashboard class has self.app_title that get this verbose name instead of "real app name". So, all models will be displayed. I don`t find solution yet, but I really like to help project. I'll back soon with updates...

  3. Petr Kapishev

    To solve this problem you just need to replace the string

    if app['name'] == model._meta.app_label.title():

    in "for" loop of get_app_index_dashboard function (admin_tools/dashboard/ with

    if app['app_label'] == model._meta.app_label.title().lower():

    Unfortunatelly, I don't know, how it can affect to work of admit_tools with earlier versions of Django.

  4. Log in to comment