Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

fix a warning about renamed in Django 1.8 method #168

Closed
wants to merge 1 commit into from
Closed

fix a warning about renamed in Django 1.8 method #168

wants to merge 1 commit into from

Conversation

jschneier
Copy link
Contributor

Hi, I'm using Django 1.7 and this is causing a warning right now. Thanks for the project!

@yakky
Copy link
Member

yakky commented Mar 1, 2015

As currently cmsplugin filer still supports Django 1.4 and 1.5 we cannot simply change the call to the newer one.

@jschneier
Copy link
Contributor Author

So this is simply going to break in 1.8 then I think? What about

parent = super(FilerPluginManager, self)
qs = getattr(parent, 'get_queryset', parent.get_query_set)()

@jschneier
Copy link
Contributor Author

Ah I see, cms 3.1 is going to drop support for the lower versions of django and then this can be merged, cool.

@yakky
Copy link
Member

yakky commented Mar 1, 2015

A popular idiom is something like:

def get_queryset(self):
    try:
        qs = super(FilerPluginManager, self).get_queryset()
    except AttributeError:
        qs = super(FilerPluginManager, self).get_query_set()
    ...

get_query_set = get_queryset

I think we need a last version compatible with Django 1.4 / 1.5 to release the latest fixes and then drop older Django version compatibility

@jschneier
Copy link
Contributor Author

Ah yeah mine would obviously break in super chains. Just put up another PR with that idiom at #177 so going to close this.

It seems I deleted my old repo so I couldn't get it back to put it on this one.

@jschneier jschneier closed this Mar 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants