-
-
Save andersk/0140318d32f1657ff40cad9e7e353bd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from django.core.management import execute_from_command_line | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "slash_test_settings") | |
execute_from_command_line(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALLOWED_HOSTS = ["127.0.0.1"] | |
# APPEND_SLASH = False | |
MIDDLEWARE = ["django.middleware.common.CommonMiddleware"] | |
ROOT_URLCONF = "slash_test_urls" | |
SECRET_KEY = "sekrit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
from django.urls import path | |
def view(request): | |
return HttpResponse("ok") | |
urlpatterns = [path(f"url{n}", view) for n in range(10000)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment