Skip to main content

Installation

Install the pip package:

pip install django-simplefeedback

Install django-rest-framework if not already installed

add simple_feedback and rest_framework to INSTALLED_APPS

include 'simple_feedback.urls' into urlpatterns

from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path("api/", include("simple_feedback.urls")),
]

Migrate the db to crate simple-feedback models

python manage.py migrate

Settings

SIMPLE_FEEDBACK_NOTIFICATIONS_ENABLED

default: False

It needs to be enabled explicitly in settings to send out emails.

SIMPLE_FEEDBACK_SEND_TO - email string or a list of email strings

valid examples:

SIMPLE_FEEDBACK_SEND_TO =
SIMPLE_FEEDBACK_SEND_TO = 'sendto@address.org'
SIMPLE_FEEDBACK_SEND_TO = ['sendto1@address.org', 'sendto2@address.org']

When SIMPLE_FEEDBACK_SEND_TO is empty or not defined, the email recepients will be all the superusers in the system.

SIMPLE_FEEDBACK_SEND_MAIL_FUNC_OVERRIDE - function to send email with needs to implement two kwargs message and recipients

valid example:

settings.py:
SIMPLE_FEEDBACK_SEND_MAIL_FUNC_OVERRIDE = send_email_function

def send_email_function(message, recipients):
    send_email()

Develop

Clone the repo

git clone git@github.com:pulilab/django-simple-feedback.git

Test app

Test standalone app:

$ export DATABASE_URL='your_db' # you can skip this, defaults to 'localhost' (use postgres.app for simplicity)

$ pip install -r requirements.txt

$ python runtests.py

Run the app in develop mode

Create a new django project and install the package in develop mode

django-admin startproject simple_feedback_demo
cd simple_feedback_demo
pip install -e ~LOCAL_PATH_TO_DJANGO_SIMPLEFEEDBACK

Add simple_feedback and rest_framework to INSTALLED_APPS in settings.py

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'rest_framework',
    'simple_feedback'
]

Configure demo app urls

from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path("api/", include("simple_feedback.urls")),
]

SqlLite is not supported

Change the db config to use postgres in settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'postgres',
        'USER': 'postgres',
        'HOST': os.environ.get("DATABASE_URL", 'localhost'),
        'PORT': 5432,
    }
}

Migrate db, create super user and run your demo app:

python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

open the browser at http://localhost:8000/admin

Release files for django-simplefeedback 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-simplefeedback 1.2.2
File Size Uploaded
django_simplefeedback-1.2.2.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-simplefeedback 1.2.2
File Interpreter ABI Platform
django_simplefeedback-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.2 kB

Release files / django_simplefeedback-1.2.2.tar.gz

Download URL django_simplefeedback-1.2.2.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
386362ca23e738a1e3ff97d26489c851129cc36cd89cad8ca9bc913e30b983d0
BLAKE2b-256 checksum
How to use checksums
4eff8d36c13a475f0aa68a3c5cde3e3df53c1cf4bb221feb0987319635ee3c09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / django_simplefeedback-1.2.2-py3-none-any.whl

Download URL django_simplefeedback-1.2.2-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5946797586f6d8073c4309015661a43d8a29784c0c54e489132e3bba69372f1
BLAKE2b-256 checksum
How to use checksums
ea519a66a9b7da0328de65fde49bdbde8c404d96c132b78b24fc2eedcd14ba8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0

2 release files

0.9

2 release files

0.8

1 release file

0.7.1

2 release files

0.6

1 release file

0.3

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page