Skip to content

Commit

Permalink
Keep imports sorted correctly
Browse files Browse the repository at this point in the history
Use two separate conditionals for Django version-specific imports
in order for imports to show in correct sort order.
  • Loading branch information
grahamu committed Mar 24, 2018
1 parent 12794df commit 4bb4f7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion project_name/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
{% if django_version >= "2" %}from django.urls import include, path{% else %}from django.conf.urls import include, url{% endif %}
{% if django_version < "2" %}from django.conf.urls import include, url{% endif %}
from django.conf.urls.static import static
{% if django_version >= "2" %}from django.urls import include, path{% endif %}
from django.views.generic import TemplateView

from django.contrib import admin
Expand Down

0 comments on commit 4bb4f7c

Please # to comment.