# Django Content Settings - The Most Advanced Admin Editable Setting
The `django-content-settings` module is a versatile addition to the Django ecosystem, allowing users to easily create and manage editable variables directly from the Django admin panel. What sets this module apart is its capability to handle variables of any type, without limiting their complexity. Thanks to an integrated caching system, these variables can be used efficiently in code, regardless of their complexity.
For the full documentation, please visit [here](https://django-content-settings.readthedocs.io/).
`django-content-settings` allows you to store variables with specific functionality in your code that can be validated and previewed in your Django admin panel. Validators, previewers, and all associated logic are defined in the setting configuration.
### Key Features
1. **Type-Agnostic Variable Creation**: Create variables of any type, making the module highly adaptable to diverse needs. [Learn more about basic types](https://django-content-settings.readthedocs.io/en/master/types/) and [template types](https://django-content-settings.readthedocs.io/en/master/template_types/).
2. **Flexible Permission Model**: Define custom permission rules for viewing, editing, fetching in APIs, and viewing the change history of each setting. [Learn more about the available API](https://django-content-settings.readthedocs.io/en/master/api/).
3. **Preview Functionality**: Preview settings before applying them, with the option to view changes directly on the site.
4. **Export & Import**: Export and import configurations in bulk using the UI or command-line tools.
5. **Editability via Django Admin Panel**: Seamlessly edit variables directly within the Django admin panel. [See how the Django Admin interface looks](https://django-content-settings.readthedocs.io/en/master/ui/).
6. **Caching System**: Optimized performance ensures variable complexity does not impact execution speed. [Learn more about caching and speed optimization](https://django-content-settings.readthedocs.io/en/master/caching/).
7. **Extensions**: Leverage a wide array of configuration options and extension points. [Explore available extensions](https://django-content-settings.readthedocs.io/en/master/extends/).
### Additional Admin Panel Functionalities
- **Change History**: Track and review changes made to variables.
- **Preview System**: Preview changes for different variable types before applying them.
- **Bulk Editing**: Edit multiple variables simultaneously.
- **Permission System**: Implement granular edit permissions for enhanced security and management.
- **Tags Navigation**: Organize settings with tags, enabling flexible navigation even with 1,000+ settings in the system.
[Learn more about these features here](https://django-content-settings.readthedocs.io/en/master/ui/).
### How It Works
- **Setup**: Follow the [step-by-step instructions here](https://django-content-settings.readthedocs.io/en/master/first/).
- **Define the Setting**: Add a constant in `content_settings.py` within your app.
```python
# content_settings.py
from content_settings.types.basic import SimpleString
TITLE = SimpleString("Songs", help="The title of the site")
```
The code above defines a variable `TITLE` with the type `SimpleString` and the default value `"Songs"`.
- **Migrate**: Run migrations to enable editing raw values in the Django Admin panel.
```bash
$ python manage.py migrate
```
You can use the setting in your code without running migrations, but migrations are required to make the setting editable in the admin panel.
- **Use It in Your Project**: Access the `TITLE` setting in your code.
```python
from content_settings.conf import content_settings
content_settings.TITLE
```
In a template:
```html
<h2>{{ CONTENT_SETTINGS.TITLE }}</h2>
```
[Learn more about accessing settings](https://django-content-settings.readthedocs.io/en/master/access/).
### Quick Look
You can quickly explore the functionality using the `cs_test` project in the [repository](https://github.com/occipital/django-content-settings). Ensure you have [Poetry](https://python-poetry.org/) installed.
```bash
$ git clone https://github.com/occipital/django-content-settings.git
$ cd django-content-settings
$ make init
$ make cs-test-migrate
$ make cs-test
```
Open `http://localhost:8000/admin/` in your browser to access the Django admin panel.
- Username: `admin`
- Password: `1`
# What's Next?
- [**Getting Started**](https://django-content-settings.readthedocs.io/en/master/first/): Step-by-step guide to configuring content settings in your project and adding your first setting.
- [**Setting Types and Attributes**](https://django-content-settings.readthedocs.io/en/master/types/): Guide to all available basic types and attributes, with examples.
- [**Template Types**](https://django-content-settings.readthedocs.io/en/master/template_types/): The most powerful feature of content settings, where raw values are text, but the setting value is a function.
- [**Using Settings**](https://django-content-settings.readthedocs.io/en/master/access/): Explore multiple ways to access content settings in your project.
- [**Permissions**](https://django-content-settings.readthedocs.io/en/master/permissions/): Define distinct permissions for different settings' functionality.
- [**Defaults Context**](https://django-content-settings.readthedocs.io/en/master/defaults/): Group settings with common parameters to reduce redundancy and maintain cleaner code.
- [**API & Views**](https://django-content-settings.readthedocs.io/en/master/api/): Organize access to content settings via APIs.
- [**User Interface for Django Admin**](https://django-content-settings.readthedocs.io/en/master/ui/): End-user guide to using the Django Admin panel for content settings.
- [**How Caching is Organized**](https://django-content-settings.readthedocs.io/en/master/caching/): Ensure fast and efficient content settings performance, with configurable options.
- [**Available Django Settings**](https://django-content-settings.readthedocs.io/en/master/settings/): Reference all available Django settings for content settings.
- [**User-Defined Settings**](https://django-content-settings.readthedocs.io/en/master/uservar/): *Experimental functionality* for allowing Django Admin users to create settings directly from the UI.
- [**Possible Extensions**](https://django-content-settings.readthedocs.io/en/master/extends/): *WIP* - Extend the basic functionality of content settings.
- [**Cookbook**](https://django-content-settings.readthedocs.io/en/master/cookbook/): Practical recipes for using content settings in your project.
- [**Frequently Asked Questions**](https://django-content-settings.readthedocs.io/en/master/faq/): Answers to common questions.
- [**Glossary**](https://django-content-settings.readthedocs.io/en/master/glossary/): Definitions of terms introduced by the concept of content settings.
- [**How to Contribute**](https://django-content-settings.readthedocs.io/en/master/contribute/): Guidelines for contributing to the project.
- [**Changelog**](https://django-content-settings.readthedocs.io/en/master/changelog/): Overview of updates introduced in each version.
- [**Source Doc**](https://django-content-settings.readthedocs.io/en/master/source/): Compilation of docstrings for future reference.
Raw data
{
"_id": null,
"home_page": "https://django-content-settings.readthedocs.io/",
"name": "django-content-settings",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Django, settings",
"author": "oduvan",
"author_email": "a.lyabah@checkio.org",
"download_url": "https://files.pythonhosted.org/packages/db/e7/e386f8bb2c4764e284a72c4f259aa0696476e9fb1a7e4577ac0b72afa033/django_content_settings-0.29.1.tar.gz",
"platform": null,
"description": "# Django Content Settings - The Most Advanced Admin Editable Setting\n\nThe `django-content-settings` module is a versatile addition to the Django ecosystem, allowing users to easily create and manage editable variables directly from the Django admin panel. What sets this module apart is its capability to handle variables of any type, without limiting their complexity. Thanks to an integrated caching system, these variables can be used efficiently in code, regardless of their complexity.\n\nFor the full documentation, please visit [here](https://django-content-settings.readthedocs.io/).\n\n`django-content-settings` allows you to store variables with specific functionality in your code that can be validated and previewed in your Django admin panel. Validators, previewers, and all associated logic are defined in the setting configuration.\n\n### Key Features\n\n1. **Type-Agnostic Variable Creation**: Create variables of any type, making the module highly adaptable to diverse needs. [Learn more about basic types](https://django-content-settings.readthedocs.io/en/master/types/) and [template types](https://django-content-settings.readthedocs.io/en/master/template_types/).\n2. **Flexible Permission Model**: Define custom permission rules for viewing, editing, fetching in APIs, and viewing the change history of each setting. [Learn more about the available API](https://django-content-settings.readthedocs.io/en/master/api/).\n3. **Preview Functionality**: Preview settings before applying them, with the option to view changes directly on the site.\n4. **Export & Import**: Export and import configurations in bulk using the UI or command-line tools.\n5. **Editability via Django Admin Panel**: Seamlessly edit variables directly within the Django admin panel. [See how the Django Admin interface looks](https://django-content-settings.readthedocs.io/en/master/ui/).\n6. **Caching System**: Optimized performance ensures variable complexity does not impact execution speed. [Learn more about caching and speed optimization](https://django-content-settings.readthedocs.io/en/master/caching/).\n7. **Extensions**: Leverage a wide array of configuration options and extension points. [Explore available extensions](https://django-content-settings.readthedocs.io/en/master/extends/).\n\n### Additional Admin Panel Functionalities\n\n- **Change History**: Track and review changes made to variables.\n- **Preview System**: Preview changes for different variable types before applying them.\n- **Bulk Editing**: Edit multiple variables simultaneously.\n- **Permission System**: Implement granular edit permissions for enhanced security and management.\n- **Tags Navigation**: Organize settings with tags, enabling flexible navigation even with 1,000+ settings in the system.\n\n[Learn more about these features here](https://django-content-settings.readthedocs.io/en/master/ui/).\n\n### How It Works\n\n- **Setup**: Follow the [step-by-step instructions here](https://django-content-settings.readthedocs.io/en/master/first/).\n\n- **Define the Setting**: Add a constant in `content_settings.py` within your app.\n\n```python\n# content_settings.py\n\nfrom content_settings.types.basic import SimpleString\n\nTITLE = SimpleString(\"Songs\", help=\"The title of the site\")\n```\n\nThe code above defines a variable `TITLE` with the type `SimpleString` and the default value `\"Songs\"`.\n\n- **Migrate**: Run migrations to enable editing raw values in the Django Admin panel.\n\n```bash\n$ python manage.py migrate\n```\n\nYou can use the setting in your code without running migrations, but migrations are required to make the setting editable in the admin panel.\n\n- **Use It in Your Project**: Access the `TITLE` setting in your code.\n\n```python\nfrom content_settings.conf import content_settings\n\ncontent_settings.TITLE\n```\n\nIn a template:\n\n```html\n<h2>{{ CONTENT_SETTINGS.TITLE }}</h2>\n```\n\n[Learn more about accessing settings](https://django-content-settings.readthedocs.io/en/master/access/).\n\n### Quick Look\n\nYou can quickly explore the functionality using the `cs_test` project in the [repository](https://github.com/occipital/django-content-settings). Ensure you have [Poetry](https://python-poetry.org/) installed.\n\n```bash\n$ git clone https://github.com/occipital/django-content-settings.git\n$ cd django-content-settings\n$ make init\n$ make cs-test-migrate\n$ make cs-test\n```\n\nOpen `http://localhost:8000/admin/` in your browser to access the Django admin panel.\n\n- Username: `admin`\n- Password: `1`\n\n# What's Next?\n\n- [**Getting Started**](https://django-content-settings.readthedocs.io/en/master/first/): Step-by-step guide to configuring content settings in your project and adding your first setting.\n- [**Setting Types and Attributes**](https://django-content-settings.readthedocs.io/en/master/types/): Guide to all available basic types and attributes, with examples.\n- [**Template Types**](https://django-content-settings.readthedocs.io/en/master/template_types/): The most powerful feature of content settings, where raw values are text, but the setting value is a function.\n- [**Using Settings**](https://django-content-settings.readthedocs.io/en/master/access/): Explore multiple ways to access content settings in your project.\n- [**Permissions**](https://django-content-settings.readthedocs.io/en/master/permissions/): Define distinct permissions for different settings' functionality.\n- [**Defaults Context**](https://django-content-settings.readthedocs.io/en/master/defaults/): Group settings with common parameters to reduce redundancy and maintain cleaner code.\n- [**API & Views**](https://django-content-settings.readthedocs.io/en/master/api/): Organize access to content settings via APIs.\n- [**User Interface for Django Admin**](https://django-content-settings.readthedocs.io/en/master/ui/): End-user guide to using the Django Admin panel for content settings.\n- [**How Caching is Organized**](https://django-content-settings.readthedocs.io/en/master/caching/): Ensure fast and efficient content settings performance, with configurable options.\n- [**Available Django Settings**](https://django-content-settings.readthedocs.io/en/master/settings/): Reference all available Django settings for content settings.\n- [**User-Defined Settings**](https://django-content-settings.readthedocs.io/en/master/uservar/): *Experimental functionality* for allowing Django Admin users to create settings directly from the UI.\n- [**Possible Extensions**](https://django-content-settings.readthedocs.io/en/master/extends/): *WIP* - Extend the basic functionality of content settings.\n- [**Cookbook**](https://django-content-settings.readthedocs.io/en/master/cookbook/): Practical recipes for using content settings in your project.\n- [**Frequently Asked Questions**](https://django-content-settings.readthedocs.io/en/master/faq/): Answers to common questions.\n- [**Glossary**](https://django-content-settings.readthedocs.io/en/master/glossary/): Definitions of terms introduced by the concept of content settings.\n- [**How to Contribute**](https://django-content-settings.readthedocs.io/en/master/contribute/): Guidelines for contributing to the project.\n- [**Changelog**](https://django-content-settings.readthedocs.io/en/master/changelog/): Overview of updates introduced in each version.\n- [**Source Doc**](https://django-content-settings.readthedocs.io/en/master/source/): Compilation of docstrings for future reference.",
"bugtrack_url": null,
"license": "MIT",
"summary": "DCS - the most advanced admin editable setting",
"version": "0.29.1",
"project_urls": {
"Homepage": "https://django-content-settings.readthedocs.io/",
"Repository": "https://github.com/occipital/django-content-settings/"
},
"split_keywords": [
"django",
" settings"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e76342e6c6a7acd77240d092c19a64dff5b0dfe43a85a487e9886b1e2defd816",
"md5": "2334e8ddf3a92595f7040b42425c60d3",
"sha256": "24a856e008e0a6faaea721f8cc721f0c50b0233023f065a7d14a47962c6c62c4"
},
"downloads": -1,
"filename": "django_content_settings-0.29.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2334e8ddf3a92595f7040b42425c60d3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 82432,
"upload_time": "2024-12-12T16:39:38",
"upload_time_iso_8601": "2024-12-12T16:39:38.048660Z",
"url": "https://files.pythonhosted.org/packages/e7/63/42e6c6a7acd77240d092c19a64dff5b0dfe43a85a487e9886b1e2defd816/django_content_settings-0.29.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dbe7e386f8bb2c4764e284a72c4f259aa0696476e9fb1a7e4577ac0b72afa033",
"md5": "deaa6cba612e102887310aacd0cda2df",
"sha256": "617956597b7071fd068ec81715a79597c0274e3bfdbad12f8cc77e94c3239ddf"
},
"downloads": -1,
"filename": "django_content_settings-0.29.1.tar.gz",
"has_sig": false,
"md5_digest": "deaa6cba612e102887310aacd0cda2df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 64592,
"upload_time": "2024-12-12T16:39:41",
"upload_time_iso_8601": "2024-12-12T16:39:41.025241Z",
"url": "https://files.pythonhosted.org/packages/db/e7/e386f8bb2c4764e284a72c4f259aa0696476e9fb1a7e4577ac0b72afa033/django_content_settings-0.29.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 16:39:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "occipital",
"github_project": "django-content-settings",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "django-content-settings"
}