Skip to content
Browse files

fixed bug with metaclasses and their inheritance order

  • Loading branch information...
1 parent d8b34b6 commit 6a92d2cc69dfea60ff3d4e005bc57025a959e79e Arvid Paeglit committed Nov 11, 2013
Showing with 4 additions and 4 deletions.
  1. +1 −1 setup.py
  2. +3 −3 src/admin_helpers.py
View
2 setup.py
@@ -17,7 +17,7 @@ def read(fname):
#Execute function to handle setuptools functionality
setup(name="django-model-admin-helper",
- version="0.2",
+ version="0.2.1",
description="Admin helpers",
long_description=read('README.rst'),
package_dir={'': 'src'},
View
6 src/admin_helpers.py
@@ -3,7 +3,7 @@
from django.contrib import admin
from django.utils.datastructures import SortedDict
from django.http import HttpResponseRedirect
-from django.forms import MediaDefiningClass
+from django.contrib.admin.options import RenameBaseModelAdminMethods
try:
from functools import update_wrapper
@@ -46,7 +46,7 @@ def get_buttons(self, request, obj):
def get_urls(self):
- from django.conf.urls.defaults import patterns, url
+ from django.conf.urls import patterns, url
def wrap(view):
def wrapper(*args, **kwargs):
@@ -58,7 +58,7 @@ def wrapper(*args, **kwargs):
) + super(ButtonableModelAdmin, self).get_urls()
-class ModelAdminWithForeignKeyLinksMetaclass(type):
+class ModelAdminWithForeignKeyLinksMetaclass(RenameBaseModelAdminMethods):
def __new__(cls, name, bases, attrs):
new_class = super(ModelAdminWithForeignKeyLinksMetaclass, cls).__new__(cls, name, bases, attrs)

0 comments on commit 6a92d2c

Please sign in to comment.
Something went wrong with that request. Please try again.