Django user preferences
Project description
Django-Userpref
django-userpref provides a abstract and reuseable framework for userspecific settings
This includes:
- Abstract UserPref Class
- Admin interface
- Templates for an userspecific settings page
Basic usage
Just define a abstract model that can be used in the applications. In you app you should define something like:
from userpref.models import Userpref class MyappSettings(Userpref): special_setting = models.BooleanField(default=False, verbose_name='Make me a superhero') another_field = models.CharField(max_length=100, default="<unset>") class Meta: verbose_name = "My Custom Setting for app Myapp"
In your application or template you can access the settings over the users attributes
{% if request.user.myappsettings.special_settings %} You are special man! {% endif %}
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
Close
Hashes for django_userpref-0.1.0a5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1cdd414679a294466f5bc7695e1901ab08d5f857dbb43cc54050e933939d16 |
|
MD5 | 455ca7e391d152a6e60290e7d58e9d7f |
|
BLAKE2-256 | d0870730ac9110079f607c4d5a92d28c2cdd99964bd4708448c7ba661ec73c05 |