معرفی شرکت ها


django-theme-0.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Allow a Django user to set a theme preference.
ویژگی مقدار
سیستم عامل -
نام فایل django-theme-0.3
نام django-theme
نسخه کتابخانه 0.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Armandt van Zyl
ایمیل نویسنده armandtvz@gmail.com
آدرس صفحه اصلی https://github.com/armandtvz/django-theme
آدرس اینترنتی https://pypi.org/project/django-theme/
مجوز GPL-3.0
# django-theme Allow a Django user to set a theme preference. ## Quickstart 1. Install django-theme via pip: ``` pip install django-theme ``` 1. Add `theme` to your `INSTALLED_APPS` in your project settings.py file: ```python INSTALLED_APPS = [ '...', 'theme', ] ``` 1. Run migrate: ``` python manage.py migrate ``` 1. Add the following to your `context_processors` setting: ```python TEMPLATES = [ { 'BACKEND': '...', 'OPTIONS': { 'context_processors': [ '...', '...', 'theme.context_processors.theme', ], }, }, ] ``` 1. In your template, you can then use the following snippet (theme options are 'system', 'dark' and 'light'): ``` <body class="{% spaceless %} {% if theme == 'dark' %} dark-theme {% endif %} {% endspaceless %}"> ``` 1. The `Theme` model defines a one-to-one relationship with the `User` model. Therefore, the theme object for a user can be retrieved by using: ```python theme = user.theme ``` ## Compatibility - Compatible with Python 3.8 and above. - Compatible with Django 3.2 and above. ## Versioning This project follows [semantic versioning][200] (SemVer). ## License and code of conduct Check the root of the repo for these files. [//]: # (Links) [200]: https://semver.org/


نیازمندی

مقدار نام
>=3.0 Django


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl django-theme-0.3:

    pip install django-theme-0.3.whl


نصب پکیج tar.gz django-theme-0.3:

    pip install django-theme-0.3.tar.gz