-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from jamescurtin/update-dependencies
Update dependencies
- Loading branch information
Showing
6 changed files
with
59 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ env: | |
DEBUG: True | ||
SECRET_KEY: abcde | ||
ALLOWED_HOST_1: localhost | ||
ALLOWED_HOST_2: | ||
ALLOWED_HOST_2: | ||
ALLOWED_HOST_3: 127.0.0.1 | ||
DATABASE_ENGINE: django.db.backends.mysql | ||
DATABASE_NAME: auctions | ||
|
@@ -21,7 +21,7 @@ env: | |
BASE_URL: https://auction.fish | ||
EMAIL_USE_TLS: True | ||
EMAIL_HOST: smtp.example.com | ||
EMAIL_PORT: | ||
EMAIL_PORT: | ||
EMAIL_HOST_USER: [email protected] | ||
EMAIL_HOST_PASSWORD: 123456 | ||
DEFAULT_FROM_EMAIL: Notifications | ||
|
@@ -46,7 +46,7 @@ jobs: | |
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.9] | ||
python-version: [3.11] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* Hide warnings fields if usable password is selected */ | ||
form:has(#id_usable_password input[value="true"]:checked) .messagelist { | ||
display: none; | ||
} | ||
|
||
/* Hide password fields if unusable password is selected */ | ||
form:has(#id_usable_password input[value="false"]:checked) .field-password1, | ||
form:has(#id_usable_password input[value="false"]:checked) .field-password2 { | ||
display: none; | ||
} | ||
|
||
/* Select appropriate submit button */ | ||
form:has(#id_usable_password input[value="true"]:checked) input[type="submit"].unset-password { | ||
display: none; | ||
} | ||
|
||
form:has(#id_usable_password input[value="false"]:checked) input[type="submit"].set-password { | ||
display: none; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"use strict"; | ||
// Fallback JS for browsers which do not support :has selector used in | ||
// admin/css/unusable_password_fields.css | ||
// Remove file once all supported browsers support :has selector | ||
try { | ||
// If browser does not support :has selector this will raise an error | ||
document.querySelector("form:has(input)"); | ||
} catch (error) { | ||
console.log("Defaulting to javascript for usable password form management: " + error); | ||
// JS replacement for unsupported :has selector | ||
document.querySelectorAll('input[name="usable_password"]').forEach(option => { | ||
option.addEventListener('change', function() { | ||
const usablePassword = (this.value === "true" ? this.checked : !this.checked); | ||
const submit1 = document.querySelector('input[type="submit"].set-password'); | ||
const submit2 = document.querySelector('input[type="submit"].unset-password'); | ||
const messages = document.querySelector('#id_unusable_warning'); | ||
document.getElementById('id_password1').closest('.form-row').hidden = !usablePassword; | ||
document.getElementById('id_password2').closest('.form-row').hidden = !usablePassword; | ||
if (messages) { | ||
messages.hidden = usablePassword; | ||
} | ||
if (submit1 && submit2) { | ||
submit1.hidden = !usablePassword; | ||
submit2.hidden = usablePassword; | ||
} | ||
}); | ||
option.dispatchEvent(new Event('change')); | ||
}); | ||
} |
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
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
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