mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 17:31:13 -05:00
Add email templates for user notifications and account management
- Created a base email template (base.html) for consistent styling across all emails. - Added moderation approval email template (moderation_approved.html) to notify users of approved submissions. - Added moderation rejection email template (moderation_rejected.html) to inform users of required changes for their submissions. - Created password reset email template (password_reset.html) for users requesting to reset their passwords. - Developed a welcome email template (welcome.html) to greet new users and provide account details and tips for using ThrillWiki.
This commit is contained in:
46
django/staticfiles/ninja/swagger-ui-init.js
Normal file
46
django/staticfiles/ninja/swagger-ui-init.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/**JS file for handling the SwaggerUIBundle and avoid inline script */
|
||||
const csrfSettings = document.querySelector("body").dataset
|
||||
const configJson = document.getElementById("swagger-settings").textContent;
|
||||
const configObject = JSON.parse(configJson);
|
||||
|
||||
configObject.dom_id = "#swagger-ui";
|
||||
configObject.presets = [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIBundle.SwaggerUIStandalonePreset
|
||||
];
|
||||
|
||||
if (csrfSettings.apiCsrf && csrfSettings.csrfToken) {
|
||||
configObject.requestInterceptor = (req) => {
|
||||
req.headers['X-CSRFToken'] = csrfSettings.csrfToken
|
||||
return req;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// {% if add_csrf %}
|
||||
// configObject.requestInterceptor = (req) => {
|
||||
// req.headers['X-CSRFToken'] = "{{csrf_token}}";
|
||||
// return req;
|
||||
// };
|
||||
// {% endif %}
|
||||
|
||||
const ui = SwaggerUIBundle(configObject);
|
||||
|
||||
|
||||
|
||||
// SwaggerUIBundle({
|
||||
// url: swaggerUi.dataset.openapiUrl,
|
||||
// dom_id: '#swagger-ui',
|
||||
// presets: [
|
||||
// SwaggerUIBundle.presets.apis,
|
||||
// SwaggerUIBundle.SwaggerUIStandalonePreset
|
||||
// ],
|
||||
// layout: "BaseLayout",
|
||||
// requestInterceptor: (req) => {
|
||||
// if (swaggerUi.dataset.apiCsrf && swaggerUi.dataset.csrfToken) {
|
||||
// req.headers['X-CSRFToken'] = swaggerUi.dataset.csrfToken
|
||||
// }
|
||||
// return req;
|
||||
// },
|
||||
// deepLinking: true
|
||||
// })
|
||||
Reference in New Issue
Block a user