A simple Django app to handle user tickets.
Project description
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.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r"^api/", include("simple-feedback.urls")),
]
Migrate the db to crate simple-feedback models
python manage.py migrate
Settings
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.
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.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r"^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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-simplefeedback-0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ddf95ac0fc2e4e64018059126d3d9b379fef42a607f922d6515739c13595db |
|
MD5 | f64f0b8cb424b96adfd31b9719fd2c29 |
|
BLAKE2b-256 | ace4b288966bc02a32f0cb944ea51a2e2d97ace5196e1f10298a69314a7bcbb8 |
Hashes for django_simplefeedback-0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 541a0bc1f8a9140e587b6e396f53792a6d9dee12ff0e21693d0fd823b686b59d |
|
MD5 | 337de3b935af10ae89e0d8c2204fd75d |
|
BLAKE2b-256 | 2facc5b5d691e35da08b0fbca2a2a4590052c0c43bec59049eb19792de267d4a |