Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-simplefeedback-0.7.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

django_simplefeedback-0.7.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file django-simplefeedback-0.7.1.tar.gz.

File metadata

File hashes

Hashes for django-simplefeedback-0.7.1.tar.gz
Algorithm Hash digest
SHA256 5d610b8d0f91d4794481a424fceca82045bf0edfd3353b41e2a4722964efb54f
MD5 37f1411de1bf875001d99e43503eb1c5
BLAKE2b-256 76840e824df04e6dec4d9b63052ea5d75a1a143e8e2de03364cdf0aba7e65aaf

See more details on using hashes here.

File details

Details for the file django_simplefeedback-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_simplefeedback-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f99b813c3d4c6f86f98cb39686fd4c5d677c4032b8f794201cf1167192b2520
MD5 797a5673dce676416160552e9a0b43b9
BLAKE2b-256 4c0adc6cb17ca4ebef73fde38ca856cad80299cc16026480e56734c1a2571cce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page