django-rest-framework-docs icon indicating copy to clipboard operation
django-rest-framework-docs copied to clipboard

Django 2.0 Support

Open psyonara opened this issue 7 years ago • 16 comments

While trying to upgrade one of my projects to Django 2.0, I received the following error for drf-docs:

File ".../ve3.6/lib/python3.6/site-packages/rest_framework_docs/api_docs.py", line 3, in <module>
    from django.core.urlresolvers import RegexURLResolver, RegexURLPattern
ModuleNotFoundError: No module named 'django.core.urlresolvers'

So far I have not found much about how those classes have been moved/changed in Django's latest versions, so I cannot yet contribute to fix this.

psyonara avatar Dec 05 '17 07:12 psyonara

I think I may have found the info I need. Will try to submit a fix for this in the next day or two.

psyonara avatar Dec 05 '17 07:12 psyonara

Further error received with Django 2.0:

File "/home/helmut/code/django-rest-framework-docs/demo/project/organisations/models.py", line 32, in Membership
    organisation = models.ForeignKey(Organisation)
TypeError: __init__() missing 1 required positional argument: 'on_delete'

psyonara avatar Dec 06 '17 05:12 psyonara

That seems to be on the demo project.

psyonara avatar Dec 06 '17 05:12 psyonara

Also looking for this problem Is there any solution to fix it

secret104278 avatar Dec 12 '17 15:12 secret104278

I have started on a fix, but ran into some difficulties that I have not been able to solve yet. Will hopefully get some more time to look at this further in the next week.

psyonara avatar Dec 12 '17 18:12 psyonara

The problem is that it'll need conditional checks, since the changes in 2.0 that are the issue here are not all present or back-ported in 1.11 and 1.8, which are the two Django versions still being supported.

psyonara avatar Dec 12 '17 20:12 psyonara

@psyonara Would be really nice to have support for Django 2.0. I'm not a super pro but any way I can help?

yizhang7210 avatar Dec 29 '17 20:12 yizhang7210

This is fixed by #177 , I hope it will be merged soon ;-).

rfezzani avatar Mar 16 '18 09:03 rfezzani

Hi guys, I just created a new lib supporting Django 1.x and 2.x: django-rest-framework-redocs.

It's also a zero configuration automatic API doc page generator, please take a look and help me make it better!

whitedogg13 avatar May 31 '18 06:05 whitedogg13

wait for this is closed as well

msmaromi avatar Jun 04 '18 07:06 msmaromi

Awaiting merging of #177 and close, anyone working on it?

ggjersund avatar Jul 31 '18 11:07 ggjersund

Any changes, any info when will be merged?

pablo0723 avatar Sep 14 '18 22:09 pablo0723

I noticed this is still open and also still an issue... any ETA on fix?

blairg23 avatar Jun 24 '19 23:06 blairg23

+1 on an ETA on this.

Aameer avatar Sep 24 '19 06:09 Aameer

I'm sorry to bring this up, but this repo is quite unmaintained, more than 2 years since it last merged PR. At some point I stepped in, but I have stopped using it since (change of job). @manosim was quite quick to add me as committer, so if anyone wants to step in...

StyXman avatar Sep 26 '19 05:09 StyXman

Same simple version for django 3 and 4 https://pypi.org/project/drfdocs2/

pablo0723 avatar Jun 24 '22 12:06 pablo0723