Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-userpref-0.1.0a5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

django_userpref-0.1.0a5-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-userpref-0.1.0a5.tar.gz.

File metadata

File hashes

Hashes for django-userpref-0.1.0a5.tar.gz
Algorithm Hash digest
SHA256 3a1f293dc2ddcbbe132933e638b4aeb5d0ad6f13a0e1502f074e68ab3e676bba
MD5 09907a63b8f843df0d2fc37c80fddba5
BLAKE2b-256 1e23976286fd7c339c9940b1e010e49389499581a62de34c5dd10c35ea787136

See more details on using hashes here.

File details

Details for the file django_userpref-0.1.0a5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_userpref-0.1.0a5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6e1cdd414679a294466f5bc7695e1901ab08d5f857dbb43cc54050e933939d16
MD5 455ca7e391d152a6e60290e7d58e9d7f
BLAKE2b-256 d0870730ac9110079f607c4d5a92d28c2cdd99964bd4708448c7ba661ec73c05

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page