darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.31k stars 701 forks source link

Support for django 2 #657

Open Snakeyyy opened 6 years ago

Snakeyyy commented 6 years ago

Could you please provide information what are the plans for supporting django 2.0? Is suit v1 going to support it?

scott-weaver commented 6 years ago

Locally, I got it to work with 2.0 by just making the following changes:

old: from django.core.urlresolvers import reverse, resolve new: from django.urls import reverse, resolve

old: @register.assignment_tag(takes_context=True) new: @register.simple_tag(takes_context=True)

The only files I had to change were suit_menu.py and suit_tags.py, so hopefully it will be a quick fix.

gamesbook commented 6 years ago

Is there any activity at all from @darklow recently on this project?

darklow commented 6 years ago

I'm currently very busy working on another project. If someone could take a look on existing pull requests on Django 2.0 support and test them and provide feedback I could merge them in.

mikewolfli commented 6 years ago

also admin.py in line 94: if isinstance(field.rel, models.ManyToOneRel): should change to if isinstance(field.remote_field, models.ManyToOneRel):

bigwboy commented 6 years ago

py3.6 django 2.0.1 需要调整: site-packages/suit/templatetags/tempsuit_menu.py site-packages/suit/templatetags/suit_tags.py site-packages/suit/templatetags/suit_forms.py

调整内容: 原有: from django.core.urlresolvers import reverse, resolve 新: from django.urls import reverse, resolve 原有: @register.assignment_tag(takes_context=True) 新: @register.simple_tag(takes_context=True)

jayWarr commented 6 years ago

for python 3.6.3 django 2.0.1 suit 2.0a1

change file: /lib/python3.6/site-packages/suit/admin.py @ line 3: from django.core.urls import reverse_lazy to from django.urls import reverse_lazy

and

change file: /lib/python3.6/site-packages/suit/menu.py @line 223 from django.core.urlresolvers import reverse, NoReverseMatch to from django.urls import reverse, NoReverseMatch

darklow commented 6 years ago

Django 2.0 support for v1 was just added through: https://github.com/darklow/django-suit/pull/663 Available though newest 0.2.26. For v2 and Django 2.0 I need some help testing https://github.com/darklow/django-suit/pull/652#issuecomment-368263416 Thank you.

darklow commented 6 years ago

PR with v2 support was merged in: https://github.com/darklow/django-suit/pull/652

jedie commented 4 years ago

PR with v2 support was merged in: #652

So this issues can be closed, isn't it?