mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 05:51:08 -05:00
series of tests added with built-in django test support
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -2,10 +2,12 @@ from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.views.static import serve
|
||||
from accounts import views as accounts_views
|
||||
from django.views.generic import TemplateView
|
||||
from .views import HomeView, SearchView
|
||||
from . import views
|
||||
import os
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
@@ -61,6 +63,19 @@ urlpatterns = [
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
# Serve test coverage reports in development
|
||||
coverage_dir = os.path.join(settings.BASE_DIR, 'tests', 'coverage_html')
|
||||
if os.path.exists(coverage_dir):
|
||||
urlpatterns += [
|
||||
path('coverage/', serve, {
|
||||
'document_root': coverage_dir,
|
||||
'path': 'index.html'
|
||||
}),
|
||||
path('coverage/<path:path>', serve, {
|
||||
'document_root': coverage_dir,
|
||||
}),
|
||||
]
|
||||
|
||||
handler404 = "thrillwiki.views.handler404"
|
||||
handler500 = "thrillwiki.views.handler500"
|
||||
|
||||
Reference in New Issue
Block a user