Issue #56 wontfix
Anonymous created an issue

I only want "adv.App" model display, but "adv.AppLink" also display。I fixed it。

utils.py : 60

    included = self.models[:]
    included.extend(self.include_list)
    included.extend([elem+".*" for elem in self.include_list])

    excluded = self.exclude[:]
    excluded.extend(self.exclude_list)
    excluded.extend([elem+".*" for elem in self.exclude_list])

Comments (4)

  1. Mikhail Korobov

    Hi there,

    I think that's because you use include_list param.

    You shouldn't use include_list and exclude_list arguments because they are deprecated. Please use models and exclude params instead, they don't have such nasty behaviour and you should be able to match any model you want.

    The way include_list and exclude_list work now is backwards-compatibile with old django-admin-tools. It just don't worth it to make already deprecated include_list and exclude_list backwards-incompatible withal ;)

    I'd say this should be put into 'wontfix'.

  2. David Jean Louis repo owner

    Hi, I agree with Mikhail, I'm closing this as Wontfix.

    Mikhail, I think we should update the docs to make it clearer that one should use models and exclude parameters and that the old include_list and exclude_list will be soon deprecated.

    Regards,

    -- David

  3. Mikhail Korobov

    Hi David,

    I thought that include_list and exclude_list params are not even mentioned in docs but that's not true indeed.

    These params are not mentioned in ModelList docs. The real problem is that examples for Dashboard and Group use AppList dashboard module and it still have include_list and exclude_list params.

    AppList accepts 'models' and 'exclude' params too. I haven't update AppList docs because I didn't find out how to emulate the default example (contrib goes to the first module, all other apps to the second). But it seems to be very-very easy:

    # include_list = ('django.contrib',)
    models = ['django.contrib.*']
    # ...
    # exclude_list = ('django.contrib',)
    exclude = ['django.contrib.*'],
    

    don't know why wasn't it obvious for me some time ago.

    Opened a ticket for that: #59. I'll take a look at it this week.

  4. Log in to comment