Fixed linter checks

This commit is contained in:
Andrew-Chen-Wang 2020-03-24 21:42:28 -04:00
parent e6b800d985
commit 7cd390854b
2 changed files with 8 additions and 7 deletions

View File

@ -11,6 +11,7 @@ import sys
from pathlib import Path
from django.core.asgi import get_asgi_application
from .websocket import websocket_application
# This allows easy placement of apps within the interior

View File

@ -1,15 +1,15 @@
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
{%- if cookiecutter.use_async == 'y' %}
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
{%- endif %}
from django.urls import include, path
from django.views import defaults as default_views
from django.views.generic import TemplateView
{%- if cookiecutter.use_drf == 'y' %}
from rest_framework.authtoken.views import obtain_auth_token
{%- endif %}
{%- if cookiecutter.use_async %}
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
{%- endif %}
urlpatterns = [
path("", TemplateView.as_view(template_name="pages/home.html"), name="home"),
@ -23,12 +23,12 @@ urlpatterns = [
path("accounts/", include("allauth.urls")),
# Your stuff: custom urls includes go here
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
{% if cookiecutter.use_async %}
# Static file serving when using Gunicorn + Uvicorn for local development
{%- if cookiecutter.use_async == 'y' %}
if settings.DEBUG:
# Static file serving when using Gunicorn + Uvicorn for local web socket development
urlpatterns += staticfiles_urlpatterns()
{% endif %}
{% if cookiecutter.use_drf == 'y' -%}
{%- endif %}
{% if cookiecutter.use_drf == 'y' %}
# API URLS
urlpatterns += [
# API base url