All Projects → praekelt → Django Preferences

praekelt / Django Preferences

Licence: bsd-3-clause
Django app allowing users to set app specific preferences through the admin interface.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Preferences

College Erp
A college management system built using Django framework. It is designed for interactions between students and teachers. Features include attendance, marks and time table.
Stars: ✭ 187 (+266.67%)
Mutual labels:  django-application, django
Meethub
This is a Python/Django based event management system. A meetup clone.
Stars: ✭ 411 (+705.88%)
Mutual labels:  django-application, django
Django Rest Registration
User-related REST API based on the awesome Django REST Framework
Stars: ✭ 240 (+370.59%)
Mutual labels:  django-application, django
Patchman
Patchman is a Linux Patch Status Monitoring System
Stars: ✭ 163 (+219.61%)
Mutual labels:  django-application, django
Django Spectator
A Django app to track book reading, and event going.
Stars: ✭ 28 (-45.1%)
Mutual labels:  django-application, django
Django Settings Export
Access Django settings from templates the right way™
Stars: ✭ 167 (+227.45%)
Mutual labels:  django-application, django
Django Easy Audit
Yet another Django audit log app, hopefully the simplest one.
Stars: ✭ 289 (+466.67%)
Mutual labels:  django-application, django
Django Lockdown
Lock down a Django site or individual views, with configurable preview authorization
Stars: ✭ 123 (+141.18%)
Mutual labels:  django-application, django
Djangorestframework Book
Django REST framework 3 中文文档, API参考, 最佳实践指南
Stars: ✭ 28 (-45.1%)
Mutual labels:  django-application, django
E Commerce 2 django
Guest register, user register, user login, user logout, account home page, product view history, change password, reset password, change name, send activation email when register, resend activation email, add shipping address, add billing address, add nickname to the addresses, edit shipping address, edit billing address, view list of your addresses, reuse shipping addresses when order products, reuse billing addresses when ordeer products, show sales analytics if staff or admin only using -chart.js-, get analytics data with Ajax, receive marketing email, change if user will receive marketing email or not by admin, send contact message with Ajax, products list, product detail, download product detail as a PDF file, download digital product files -if the user purchased that digital product only-, orders list, list of digital products files, order detail, download order detail as a PDF file, verify order ownership with Ajax -to secure order detail page-, show cart products, add or remove product from cart, checkout page, thanks page when order placed successfully, add or reuse payment method, add or reuse payment method with Ajax, search products by title, search products by description, search products by price, search products by tag title, write tags for products -by admin only-, auto fill contact email, full name if user logged in.
Stars: ✭ 20 (-60.78%)
Mutual labels:  django-application, django
Django mail admin
The one and only django app to receive & send mail with templates and multiple configurations.
Stars: ✭ 140 (+174.51%)
Mutual labels:  django-application, django
Algo Phantoms Backend
💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.📰🔥 This repository contains the REST APIs of the application.✨
Stars: ✭ 36 (-29.41%)
Mutual labels:  django-application, django
Django Dersleri
YouTube Django Dersleri için proje kaynak kodu
Stars: ✭ 135 (+164.71%)
Mutual labels:  django-application, django
Niji
A pluggable Django forum APP
Stars: ✭ 173 (+239.22%)
Mutual labels:  django-application, django
Hsreplay.net
🔶 Unleash your Potential!
Stars: ✭ 132 (+158.82%)
Mutual labels:  django-application, django
Django Ledger
A bookkeeping & financial analysis engine for the Django Framework. UNDER ACTIVE DEVELOPMENT & NOT STABLE YET.
Stars: ✭ 253 (+396.08%)
Mutual labels:  django-application, django
Banking System
A banking System Created Using Django Python Web Framework
Stars: ✭ 105 (+105.88%)
Mutual labels:  django-application, django
Django Pattern Library
UI pattern libraries for Django templates
Stars: ✭ 110 (+115.69%)
Mutual labels:  django-application, django
Djangoforbeginners
Source code for Django For Beginners
Stars: ✭ 527 (+933.33%)
Mutual labels:  django-application, django
Django Djeddit
Minimalistic Reddit clone developed as a Django reusable app
Stars: ✭ 32 (-37.25%)
Mutual labels:  django-application, django

Django Preferences

Django app allowing users to set app specific preferences through the admin interface.

.. image:: https://travis-ci.org/praekelt/django-preferences.svg?branch=develop :target: https://travis-ci.org/praekelt/django-preferences

.. image:: https://coveralls.io/repos/github/praekelt/django-preferences/badge.svg?branch=develop :target: https://coveralls.io/github/praekelt/django-preferences?branch=develop

.. image:: https://badge.fury.io/py/django-preferences.svg :target: https://badge.fury.io/py/django-preferences

Provides singleton admin views for Preferences objects and a simple interface to preference values. Singleton views ensure only one preference instance per site is available for each Preferences class.

..

**Requires** and supports `Django's "sites" framework <https://docs.djangoproject.com/en/dev/ref/contrib/sites/>`_, which means you can have multiple preferences, each associated with a particular site.

.. contents:: Contents :depth: 5

Requirements

#. Python 2.7, 3.5-3.7

#. Django 1.11, 2.0, 2.1

#. django.contrib.sites

Installation

#. Install or add django-preferences to your Python path.

#. Add preferences to your INSTALLED APPS setting.

#. Add django.contrib.sites to your INSTALLED APPS setting. django-preferences associates preferences to specific sites and thus requires Django's "sites" framework to be installed.

#. Optionally, add preferences.context_processors.preferences_cp to your template option settings. This will automatically add a preferences variable to your template context::

 TEMPLATES = [{
     ...
     'OPTIONS': {
         'context_processors': [
             ...
             'preferences.context_processors.preferences_cp',
         ],
     },
 }]

Usage

To create preferences for your app create a Django ORM model as usual, with the model inheriting from preferences.models.Preferences. Also specify preferences.models as your model's module::

from django.db import models
from preferences.models import Preferences

class MyPreferences(Preferences):
    portal_contact_email = models.EmailField()

Admin classes are specified as per usual, except that they have to inherit from or be registered with preferences.admin.PreferencesAdmin, i.e.::

from django.contrib import admin

from preferences.admin import PreferencesAdmin
from <my_app>.models import MyPreferences

admin.site.register(MyPreferences, PreferencesAdmin)

When your model is registered with admin it will show up under the Preferences app label in Django admin.

Preferences can be accessed in Python by importing the preferences module and traversing to your required preference in the form preferences.<ModelName>.<field>, i.e.::

from preferences import preferences

portal_contact_email = preferences.MyPreferences.portal_contact_email

If you've specified the preferences.context_processors.preferences_cp as a TEMPLATES <https://docs.djangoproject.com/en/1.11/topics/templates>_ you can similarly access your preferences within templates through the preferences variable, i.e.::

{{ preferences.MyPreferences.portal_contact_email }}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].