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
File details
Details for the file django-userpref-0.1.0a5.tar.gz
.
File metadata
- Download URL: django-userpref-0.1.0a5.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a1f293dc2ddcbbe132933e638b4aeb5d0ad6f13a0e1502f074e68ab3e676bba |
|
MD5 | 09907a63b8f843df0d2fc37c80fddba5 |
|
BLAKE2b-256 | 1e23976286fd7c339c9940b1e010e49389499581a62de34c5dd10c35ea787136 |
File details
Details for the file django_userpref-0.1.0a5-py2.py3-none-any.whl
.
File metadata
- Download URL: django_userpref-0.1.0a5-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1cdd414679a294466f5bc7695e1901ab08d5f857dbb43cc54050e933939d16 |
|
MD5 | 455ca7e391d152a6e60290e7d58e9d7f |
|
BLAKE2b-256 | d0870730ac9110079f607c4d5a92d28c2cdd99964bd4708448c7ba661ec73c05 |