Changelog
master
- fixing hasattr #128
0.29 NoStripCharField and history improvement
- values are not stripped by default
- new module
content_settings.fieldsthat has fields that can be used as string forcls_field "NoStripCharField"is a default value forcls_field- Django Admin for hisotry was improved and simplified
- deprication of
view_history_permission
0.28.2 preview on side fixes
0.28.1 validate_default_values
- fix
validate_default_values- it now validates with in context of defaults - new func
utils.remove_same_identand apply it for SimpleYAML - fix
SimpleBoolvalidators
0.28 precached Py values and to_raw
CONTENT_SETTINGS_PRECACHED_PY_VALUESisFalsebyt default. And become experimental feature.- update
DjangoModelTemplateMixin SimpleString.to_raw- converts value that was given by the setting attribute into the raw value- allow to use suffixes for setting
0.27 cacheing alrorithm and speed optimization
- No precached py objects
- speed optimization of working with constantants
register_prefixmoved tostoremodule
0.26 cache triggers and setting assign
cache_triggers- module that adjusts- setting value in code
content_settings.IS_OPEN = "-"
0.25 MySQL fix and UI
UserTagSetting.tagis now charfield, so it works correctly with MySQL- Django Admin UI updated, and more space dedicated to help text
0.24 migrate
- using migrate module you can add content settings change into migration
0.23 Empty and Null
- Make sure all types can work with empty values (when those are not required)
- change verification order
- new setting
CONTENT_SETTINGS_VALIDATE_DEFAULT_VALUE- validates not only DB values but also default values
0.22 DCS Family
- Move split by first line into a separate repo. dcs-split-by-first-line
0.21 types.template refactoring
DjangoTemplateNoArgsHTMLand changeDjangoTemplateHTMLProcessorsMixinandGiveProcessorsMixinnew mixins. More in types- new doc about template types
result_validatorPreviewValidator,PreviewValidationError. More in template types.SimpleExecNoCompile. More in template types.- refactoring of template attributes. They all have prefix template now. More in template types.
suffixesattribute is a dict with function as value.template_bultinsattrubute as a replacement forallow_import. More in template types.
0.20.1
- new settings -
CONTENT_SETTINGS_CHECK_UPDATE_CELERYandCONTENT_SETTINGS_CHECK_UPDATE_HUEY - fix
widgets_attr
0.20 Long widgets
0.19 Import/Export through the UI and commands
- Import/Export UI in Django Admin. Read more in UI
- Import/Export commands. Read more in Commands
- Mechanism of reverting update from hisotry and seeing the update batch
context_managers.content_settings_contextnow works with user defifined types- previewed content settings doesn't work for urls from Django Admin content settings. To prevent validation issues
- migration that extends the history with user defined type attributes, such as tags and help
- you can do a preview for user defined types, you can do a preview of creation of new user defined type
- names of the URLS has "content_settings" prefix
- fix bug with assign only attributes (not methods)
- defaults takes type arguments into account - you can now extend
yesesandnoesintoCONTENT_SETTINGS_DEFAULTS
0.18.2 CallToPythonMixin.call_prepare_func
SimpleFunca very basic template type.- new
CallToPythonMixinattributescall_func_argument_nameandcall_prepare_func - More in Types
0.18.1
- setting
CONTENT_SETTINGS_PREVIEW_ON_SITE_SHOW = Falsehides preview on site functionality - fix some bugs
0.18 Better validation
- attributes that accept function can also accept string as name of the function.
fetch_permission="staff"orfetch_permission="content_settings.permissions.staff" FetchAllSettingsView.as_view()- new view for getting all avaliable settings in the systemFetchAllSettingsView.as_view(names=gen_all())- works in the same way
- py objects validation at the time when the project is started.
CONTENT_SETTINGS_CHAIN_VALIDATE- new django setting, by default True. Every time you change the variable it not only test the variable you've changed, but also all other variables to make sure your changes doesn't break other variables.- article about Admin User interface with the link in the interface.
- simplify
json_view_valuefor simple values, to speed up the API
0.17 CodeMirror
- new attributes for css and js
admin_head_css: Tuple[str] = ()admin_head_js: Tuple[str] = ()admin_head_css_raw: Tuple[str] = ()admin_head_js_raw: Tuple[str] = ()
- new
defaults.modifiersupdate_widget_attrsadd_widget_classadd_admin_head
defaults.collections- allows you to add CodeMirror 5 support
0.16
- remove
urls.pynow the only quick way to connect API is to use Views - remove
content_settings.startswithandcontent_settings.withtag - more doc-strings, update
poetry.lockand test coverage 94%
0.15
- fixing nox testing for covering different Python and Django versions
context_managers.context_defaultsmoved todefaults.context.defaults. More in defaults documentationCONTENT_SETTINGS_DEFAULTSis a replacement forCONTENT_SETTINGS_CONTEXT_PROCESSORSandCONTENT_SETTINGS_CONTEXT. More in defaults documentation- Ability to assign defaults globally for specific setting types. More in defaults documentation
CONTENT_SETTINGS_ADMIN_CHECKSUM_CHECK_BEFORE_SAVE- new settings that makes sure that nothing is changed while the Django Admin panel for content settings were opened- remove overwriting default attributes tags and permissions in subclasses.
- new module functools - which now contains logical functions
not_,or_andand_, moved from modulepermissionssince those functions are used fordefaults.filtersas well - Preparation for the version 1
0.13.1
SimpleExec.call_returnandDjangoModelTemplateMixin.model_querysetcan be callable nowmdsourcefor generation docs from the source code- black version was updated to use for Python 3.8
0.13
CONTENT_SETTINGS_TAGSrefactoring, the function accepts additional argument name"content_settings.tags.app_name"- autogenerate tag with the app name- new validators
gen_call_validator,gen_args_call_validatorandgen_kwargs_call_validator - AttributeError when you trying to use an uknown setting name
0.12.1
- 📖 SimpleExecNoCall
- 📖 GiveOneKeyMixin
- 📖 SimpleExecOneKey
- 📖 SimpleExecOneKeyNoCall
- STATIC_INCLUDES.UNITED_SETTINGS
0.12
- internal constants refactoring to Enums.
- validation changes on the list view using
content_settings_context - Admin: fix delete link
0.11.4
from content_settings.conf import settings
0.11.2
- new attributes
on_changeandon_change_commited - pass user object in the preview
0.11.1 hot fix for edit form
0.11 Preview On Site

- admin can now preview settings on site before applying
- new middleware
middlewares.preview_on_site
0.10.2
- help_text is alternative for help attribute
- fix warnings
- using urls is optional
0.10 AdminPreviewActionsMixin
SplitByFirstLineis now inEachMixinSplitByFirstLine.split_typecan be a dict with key:cs_typeAdminPreviewActionsMixin- new attribute
validators_raw
0.9 Django Admin Panel
- Fixing a lot of bugs with admin of content settings. Such as preivew, search, tags filters and cetera
- fixing dynamic work with local changes in content settings
- fix help text for user defined types
- if variable constant or removed from code - admin is not allowed to see it in django admin
- new type
DjangoModelTemplateHTML - fix issue with \r\n in tags field for user defined types
- remove attribute
empty_is_none, we haveEmptyNoneMixinmixin instead validatorscan be tuple and list nowEachMixinnow works only with expected types.- new class for
EachMixin-each.Values- convers all values in the dict - fixing bugs with lazy object
- for
CallToPythonMixin,preview_validatorsandadmin_preview_callare removed. Now, all of the validators, that are instance ofcall_validatorwill be shows in preview and settings call will be always shown if more than one validators are for preview - the change above requires massive refactoring for preview of template/call types
- if
SimpleCallTemplatedoesn't have a required arguments and doesn't have validators - the system uses one validatorcall_validator() DjangoTemplateHTML(HTMLMixin, DjangoTemplate)->DjangoTemplateHTML(HTMLMixin, DjangoTemplateNoArgs)
0.8.1
SplitByFirstLine.split_key_validator_failed- fix preview for
each.Keys
0.8 EachMixin and HTMLMixin
EachMixinHTMLMixinandDjangoTemplateHTML- showing type name(s) in admin panel
- migrate can also show "adjust" in case of changing tags or/and help
- yet another admin preview function refactoring.
- fix quoting in text/python preview
0.7.1 help format
- Default preview for Exec and Eval is Python
- SimpleBool more possible input options
- help_format for SplitTranslation
- test covarage: 95%
0.7 permissions and content tags
- content generated tags - tags that can be generated not based on the given tags, but based on the given value.
CONTENT_SETTINGS_TAGS- a list of functions that can generate tags for variable based on valueview_permissionandview_history_permissionSimplePasswordjson_view_valuereturns string
0.6.4
caching.get_raw_value- new functioncontext_manager.process_set- correct work with str, list and other iterable (those will be converted to set)- prevent resetting value if only help of tags were updated. The value will be reset to default only in case of version update
0.6.3 fix caching for huey and celery
0.6.2 SimpleHTML and DjangoModelTemplateMixin
- new mixin
DjangoModelTemplateMixinand new typesDjangoModelEvalandDjangoModelExec - give for
SimpleHTMLis now marked safe, so no need to use|safefilter in template - fix
SimpleEvalandSimpleExecpermissions - fix
SimpleStringsList.comment_starts_with
0.6.1 SimpleCSV: you can now set default, required and optional argument for the column type
from content_settings.types import required, optional
var = SimpleCSV(
csv_fields={
"name": SimpleString(required),
"balance": SimpleDecimal("0"),
"price": SimpleDecimal(optional),
},
)
0.6 I18N & suffix preview in admin
types.mixin.AdminPreviewMixin- build menu on top of previewtypes.mixin.AdminPreviewSuffixesMixin- top menu build based on using suffixestypes.mixin.DictSuffixesPreviewMixin- mix withDictSuffixesMixin

types.array.SplitByFirstLine- splitting text by multiple suffixes with custom chooser of the default valuetypes.array.SplitTranslation-types.array.SplitByFirstLinewith chooser by the current translation

Minor:
validate_valuenow splitted on twovalidate_raw_valuefor validation text andvalidatefor validation python objectwithtag__NAME- new built-in prefix, that returns all of the names that have tag "name"help_format- by default empty textget_admin_preview_asvalidate_valueand other validators does not return valueget_admin_preview_(self, value, name, **kwargs)- has now**kwargscan be passed from the preview request
0.5 User Defined Variables & Constants
- User Defined Variables - variables can now be created not only in code but also in admin
overwrite_user_defined- new attribute that allows overwrite user defined variableconstant- new attribute that makes the code variable unchangable in admin panel and only default value is usingconf.register_prefix- decorator that allows you to registered a new prefixstartswith__NAME- new built-in prefix, that returns all of the names that starts with NAMEdir(content_settings)- shows all of the registered variables- db now stores tags and help for all variables
CHECKSUM_USER_KEY_PREFIXandUSER_DEFINED_TYPEStwo new settings- fix "Preview Loading..." for variables without preview
caching.get_type_by_name- new function- test covarage: 93%
0.4.4
- built-in support huey and celery
0.4.3
- fix field validators
- None admin preview by default
SimpleHTML- same as SimpleText but with HTML previewEmailString- new base typeSimpleExecandSimpleExecNoArgs- new types. Works in the same way as SimpleEval, but using exec instead of eval and return values based oncall_returnattribute- all eval and exec types have
superuseras default value forupdate_permission MakeCallMixinhascallsuffix, just in case
0.4.2 - local dev fixes
- handeling removed settigs
CONTENT_SETTINGS_VALUES_ONLY_FROM_DB- for DEBUG=False only- handleling update version during local debug
- preview and updates for non-existed settings
0.4.1
- fix admin fields
0.4 - suffix and fetch_groups deprication
lazy_givenew function for giving a lazy object of the type.LazyObjecthas moved to own moduletypes.lazy- deprication of
fetch_groupsattribute andviews.FetchSettingsViewas a replacement - uppercase for variable name is mandatory
callsuffix forGiveCallMixin. you can call no-args types likecontent_settings.VAN_NAME__call("value")- DictSuffixesMixin - use dict for suffixes, where values are lambdas
suffixis URLs for getting value from suffix- new URL
fetch/<str:name>/suffix/<str:suffix>/ - test covarage: 89%
0.3 - "give" control and admin preview refactoring
giveandgive_python- new base method allows Type to control how the cached value will be given to the code. See the Cookbook for usecases- new mixins
GiveCallMixinandMakeCallMixin - new classes based on
GiveCallMixin-DjangoTemplateNoArgsandSimpleEvalNoArgs - Admin Preview refactoring:
admin_preview_asnew base-class attribute. Possible values html/text/pythonpreview_validatorsnewCallToPythonMixinattribute. A list/tuple of all validators for previewadmin_preview_callnewCallToPythonMixinbool attribute. Should function execution be shown in preview
template_static_includes- new attrubite forSimpleCallTemplate.
0.2.3 - advanced context_managers
context_manangers- parameter
initfor processors incontext_defaults. You can now not only update default values, but also update assigned values - new processors:
add_tags,remove_tags,str_append,str_prepend,str_format,help_format
- parameter
- new django setting:
CONTENT_SETTINGS_CONTEXT_PROCESSORSandCONTENT_SETTINGS_CONTEXT_PROCESSORS- you can now set a default context - support default tags for types
- add default tags for templates and markups types
- add
superuserinpermissions - fix:
content_settings_context - test coverage: 87%