mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-30 00:03:30 +02:00
Merge pull request #146 from cisagov/nmb/fix-deploy
Fix deploy issue with debug_toolbar URLs
This commit is contained in:
commit
4c60c6e345
2 changed files with 11 additions and 4 deletions
|
@ -15,6 +15,15 @@ urlpatterns = [
|
||||||
path("health/", health.health),
|
path("health/", health.health),
|
||||||
path("edit_profile/", profile.edit_profile, name="edit-profile"),
|
path("edit_profile/", profile.edit_profile, name="edit-profile"),
|
||||||
path("openid/", include("djangooidc.urls")),
|
path("openid/", include("djangooidc.urls")),
|
||||||
# these views respect the DEBUG setting
|
|
||||||
path("__debug__/", include("debug_toolbar.urls")),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# we normally would guard these with `if settings.DEBUG` but tests run with
|
||||||
|
# DEBUG = False even when these apps have been loaded because settings.DEBUG
|
||||||
|
# was actually True. Instead, let's add these URLs any time we are able to
|
||||||
|
# import the debug toolbar package.
|
||||||
|
try:
|
||||||
|
import debug_toolbar
|
||||||
|
|
||||||
|
urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
from django.test import Client, TestCase
|
from django.test import Client, TestCase
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
|
|
||||||
from registrar.models import UserProfile
|
|
||||||
|
|
||||||
|
|
||||||
class HealthTest(TestCase):
|
class HealthTest(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue