From d40cde2aef040a9ad23f54810fea98b7c3fcdbaf Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 16 Apr 2020 09:07:23 +0200 Subject: [PATCH] Preparing for packaging --- LICENSE | 21 +++++++++++++++++++++ MANIFEST.in | 2 ++ README.md | 23 +++++++++++++++++++++++ setup.cfg | 28 ++++++++++++++++++++++++++++ setup.py | 3 +++ 5 files changed, 77 insertions(+) create mode 100644 LICENSE create mode 100644 MANIFEST.in create mode 100644 README.md create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..78d8ee2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2020, Kumi Systems e.U. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c1a7121 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include LICENSE +include README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..29b2b74 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# django-dbsettings + +dbsettings is a simple reusable Django app allowing you to store key-value +pairs in your database, so you can store configuation in your database easily. + +## Quick start + +1. Add "dbsettings" to your INSTALLED_APPS setting like this:: + + INSTALLED_APPS = [ + ... + 'polls', + ] + +2. Run ``python manage.py makemigrations`` and ``python manage.py migrate`` to + create the polls models. + +3. Start the development server and visit http://127.0.0.1:8000/admin/ + to add configuration values or use dbsettings.functions.setValue(key, value) + in your code. + +4. To retrieve a configuration value from the database, use + dbsettings.functions.getValue(key) in your code. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..d50746e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,28 @@ +[metadata] +name = django-dbsettings +version = 0.8 +description = A Django app to store key-value pairs in the database +long_description = file: README.md +url = https://kumig.it/kumisystems/dbsettings +author = Kumi Systems e.U. +author_email = office@kumi.systems +license = BSD-2-Clause +classifiers = + Environment :: Web Environment + Framework :: Django + Framework :: Django :: 3.0 + Intended Audience :: Developers + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Topic :: Internet :: WWW/HTTP + Topic :: Internet :: WWW/HTTP :: Dynamic Content + +[options] +include_package_data = true +packages = find: diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6068493 --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup + +setup()