[](https://stand-with-ukraine.pp.ua) # 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