Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Application to keep simple settings in database. Based on the contenttype framework.
branch: master

This branch is 109 commits behind jqb:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
django_settings
.gitignore
LICENSE
README.rst
setup.py

README.rst

django-settings

Simple django reusable application for storing global project settings in database.

By project settings I mean things like admin mail, some default values like default_post_limit etc. Values are validated depending their type.

API

from django_settings import models

# getting values
models.Setting.objects.get_value('post_limit')

# setting values
models.Setting.objects.set_value('admin_email', models.String, 'admin@admin.com')

# checking if value exists
models.Setting.objects.value_object_exists('admin_email')

There is ability to setup some defaults via project settings.py file:

DJANGO_SETTINGS = {
   'application_limit': ('Integer', 2),
   'admin_email': ('String', 'admin@mail.com'),
}

Settings types

Currently there are three setting types supported: Integer, String, PositiveInteger

Admin

Now you can manipulate setting via your admin interface. Just install the application and put it in your INSTALL_APPS.

Something went wrong with that request. Please try again.