user_feedback
SALTISE-user-feedback is a simple Django app to collect and store user feedback.
Quick start
Add the UserFeedback app to your requirements, then pip install:
pip install SALTISE-user-feedback
Add “user_feedback” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'user_feedback', ... ]Include the user_feedback URLconf in your project urls.py like this:
url("feedback/", include("user_feedback.urls")),Migrate:
python manage.py migrate
Setup an EMAIL_BACKEND in your project’s settings.py.
Add admin emails to ADMINS’s list of tuples in your project’s settings.py:
ADMINS = [('John', 'john@example.com'), ('Mary', 'mary@example.com')]If ‘/accounts/login/’ is not active, make sure to have a LOGIN_URL in your settings.py.
Import user_feedback’s minified script in your base template (you can override default styles using global css names):
<script src="{% static 'user_feedback/js/app.min.js' %}" defer="true"></script>Place the following element in templates where you would like for users to offer feedback:
<div id="user-feedback-app"></div>
If not in the template already, add a csrf token:
{% csrf_token %}Inject the app into the DOM, customizing props as needed. Assuming django-csp is installed:
<script nonce="{{ request.csp_nonce }}"> window.addEventListener("load", function () { const feedback = () => { return user_feedback.h(user_feedback.App, { acceptText: "{% trans 'Send' %}", cancelText: "{% trans 'Cancel' %}", charCountText: "{% trans 'characters remaining' %}", description: "{% trans 'Leave feedback or get help' %}", feedbackTypes: [ { value: 1, text: "Bug report" }, { value: 2, text: "Feature request" }, { value: 3, text: "General feedback" } ], menuFeedbackText: "{% trans 'Give Feedback' %}", menuHelpText: "{% trans 'Tutorials and Forums' %}", menuHelpUrl: "#", placeholder: "{% trans 'Let us know what is on your mind...' %}", snackbarError: "{% trans 'An error occurred. Please try again later.' %}", snackbarSuccess: "{% trans 'Thanks for your feedback!' %}", text: "", title: "{% trans 'How can we improve your experience?' %}", url: "{% url 'user_feedback:post' %}", nonce: "{{ request.csp_nonce }}", }); }; user_feedback.render( feedback(), document.getElementById("user-feedback-app") ); }); </script>
Quick start dev
Install node modules:
npm install
Install dev-requirements:
pip install -r requirements/dev-requirements.txt
Install pre-commit:
pre-commit install
Create a superuser and login:
python user_feedback.py createsuperuser
Start the server:
python user_feedback.py runserver
Navigate to ‘localhost:8000/test/button/’, to see the user_feedback button in action.
Build when you make edits to app.js:
npx gulp scripts
If you wish, remake the package:
tox --recreate
To publish, e.g.:
twine upload .tox/dist/SALTISE_user_feedback-1.0.zip --verbose
Metadata
Release files for SALTISE-user-feedback 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SALTISE_user_feedback-1.1.2.zip | 81.1 kB | Without provenance | Details for SALTISE_user_feedback-1.1.2.zip |
Release files / SALTISE_user_feedback-1.1.2.zip
| Download URL | SALTISE_user_feedback-1.1.2.zip |
|---|---|
| Size | 81.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c57647cb83ab8bcee43f2ddc5db586f5fc20db3fb9f7a6a09b9be01de2005303
|
|
BLAKE2b-256 checksum How to use checksums |
909e17aa2961b5e07e12bf23e9c5ce199c8a1f08aa1e673c1b5a37e2eaf36e5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for SALTISE-user-feedback 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.