Fix login url
This commit is contained in:
1 parent
f61034dff5
commit
34630657b8
4 files changed
+20
-2
No files matched your search
@@ -27,6 +27,7 @@ SECRET_KEY = os.getenv("SECRET_KEY")
|
||||
DEBUG = os.getenv("DEBUG") == "True"
|
||||
|
||||
ALLOWED_HOSTS = ['127.0.0.1', 'localhost']
|
||||
LOGIN_URL = '/login/'
|
||||
|
||||
# Allow requests coming through nginx on host:8080 (used in local Docker Compose)
|
||||
# Add any additional origins you use (including scheme and port) here.
|
||||
|
||||
@@ -189,5 +189,9 @@ function initializeTitleFromQuery() {
|
||||
}
|
||||
}
|
||||
|
||||
// Run on ask page load
|
||||
// Run immediately (script.js loads at end of page, DOMContentLoaded may have already fired)
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', initializeTitleFromQuery);
|
||||
} else {
|
||||
initializeTitleFromQuery();
|
||||
}
|
||||
@@ -8,6 +8,15 @@
|
||||
<link rel="stylesheet" href="{% static 'core/css/style.css' %}">
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://unpkg.com/centrifuge@2.2.1/centrifuge.min.js"></script>
|
||||
<script>
|
||||
function redirectToAsk(event) {
|
||||
event.preventDefault();
|
||||
const searchInput = document.getElementById('search-input');
|
||||
const query = searchInput ? searchInput.value.trim() : '';
|
||||
const url = query ? `/ask?q=${encodeURIComponent(query)}` : '/ask';
|
||||
window.location.href = url;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
||||
@@ -189,5 +189,9 @@ function initializeTitleFromQuery() {
|
||||
}
|
||||
}
|
||||
|
||||
// Run on ask page load
|
||||
// Run immediately (script.js loads at end of page, DOMContentLoaded may have already fired)
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', initializeTitleFromQuery);
|
||||
} else {
|
||||
initializeTitleFromQuery();
|
||||
}
|
||||
Reference in new issue
Block a user