jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 294 forks source link

#284 Django 1.11 support #292

Closed dpetzold closed 7 years ago

dpetzold commented 7 years ago

Hi!,

This adds support for Django 1.11. It was a much larger change than I was expecting but I think it is worth a look. For 1.11 Django completely refactored widget rendering, eliminating the following classes:

https://docs.djangoproject.com/en/1.11/releases/1.11/#template-widget-incompatibilities-1-11

As you know djng relies on those for widget rendering. I moved the old rendering to compat files and updated the widget to use the new template based widget rendering. The urls import location also changed and couple of other minor things. The majority of the work was in the rendering and I created new tests to verify the changes. The new tests pass with Django 1.10 and 1.11 with Python 2 and 3 but do not pass with Django versions < 1.10 as the html output is different.

re https://github.com/jrief/django-angular/issues/284

jrief commented 7 years ago

Thank you very much! In this moment I just worked on this myself. There are really lots of changes to do. I'll have a look at you pull request to see how to merge them.

jrief commented 7 years ago

I will cherry-pick some commits from your pull request. Fortunately we did not work on exact the same stuff. My focus was mainly to get the Bootstrap widgets up again.

In Django-1.11 fortunately, I neither need any widget, nor renderer overriding (they've gone in 1.11 anyway). This means that Bootstrap widgets are rendered purely through templates and not through code, which is much, much cleaner than previously.

jrief commented 7 years ago

django-angular-1.0.0 now supports Django-1.11 Feel free to reopen another pull request, based on widget rendering using the template engine.