A collection of features used in our Django-based web applications.
Project description
django-features
A collection of fearures used in our Django-based web applications
Installation
pip install ftw-django-features
Usage
Add desired app to INSTALLED_APPS in your Django project.
Available apps:
django_features.system_message
django_features.custom_fields
Configuration
If you want to use django_features, your base configuration class should inherit from django_features.settings.BaseConfiguration.
from django_features.settings import BaseConfiguration
class Base(BaseConfiguration):
...
Custom Fields
To use all features of the django_features.custom_fields app, the following steps are required:
Add the django_features.custom_fields.routers.custom_field_router to your ROOT_URLCONF. For example:
path("api/", include(custom_field_router.urls)),
Create your own custom field and value models
- You need to create a custom field model and a custom value model.
- Your custom field model should inherit from
django_features.custom_fields.models.field.AbstractBaseCustomField. - Your custom value model should inherit from
django_features.custom_fields.models.value.AbstractBaseCustomValue.
Configuration
- You can configure the models used by the
django_features.custom_fieldsapp by setting theCUSTOM_FIELD_MODELorCUSTOM_FIELD_VALUE_MODELsetting. - The swapped models should inherit from
django_features.custom_fields.models.field.AbstractBaseCustomFieldordjango_features.custom_fields.models.value.AbstractBaseCustomValue.
Models with custom values
- Your models with custom values should inherit from
django_features.custom_fields.models.CustomFieldBaseModel. - Your models should have a relation to the custom value model. For example:
custom_values = models.ManyToManyField(blank=True, to=CustomValue, verbose_name=_("Benutzerdefinierte Werte"))
Querysets
Your querysets for the models with custom values should inherit from django_features.custom_fields.models.CustomFieldModelBaseManager.
Serializers
Your serializers for the models with custom values should inherit from django_features.custom_fields.serializers.CustomFieldBaseModelSerializer.
System Message
If you want to use django_features.system_message, your base configuration class should inherit from django_features.system_message.settings.SystemMessageConfigurationMixin.
Then call the super property:
@property
def CONSTANCE_CONFIG(self) -> dict:
config = super().CONSTANCE_CONFIG
return {**config, ...}
@property
def CONSTANCE_CONFIG_FIELDSETS(self) -> dict:
config = super().CONSTANCE_CONFIG_FIELDSETS
return {
**config,
...
}
Add the django_features.system_message.routers.system_message_router to your ROOT_URLCONF. For example:
path("api/", include(system_message_router.urls)),
Development
Installing dependencies, assuming you have poetry installed:
poetry install
Release
This package uses towncrier to manage the changelog, and to introduce new changes, a file with a concise title and a brief explanation of what the change accomplishes should be created in the changes directory, with a suffix indicating whether the change is a feature, bugfix, or other.
To make a release and publish it to PyPI, the following command can be executed:
./bin/release
This script utilizes zest.releaser and towncrier to create the release, build the wheel, and publish it to PyPI.
Before running the release command, it is necessary to configure poetry with an access token for PyPI by executing the following command and inserting the token stored in 1password:
poetry config pypi-token.pypi <token>
The version attribute in the pyproject.toml file should be updated to the new version before running the release command, because this version will be published to PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ftw_django_features-2026.3.3.tar.gz.
File metadata
- Download URL: ftw_django_features-2026.3.3.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.0 CPython/3.13.13 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29e39d0e1e759d838af1e1ed97b9ba5b9d1bbab31e2040c9304407dec0ae1aab
|
|
| MD5 |
4603775d37e6ffe4493578ed0e2fceb3
|
|
| BLAKE2b-256 |
442b4ad335c2fcbbcceafefcd416d129075c687651964e17c25c66dbe94fc01f
|
File details
Details for the file ftw_django_features-2026.3.3-py3-none-any.whl.
File metadata
- Download URL: ftw_django_features-2026.3.3-py3-none-any.whl
- Upload date:
- Size: 42.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.0 CPython/3.13.13 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04bdb011a844b4c0822587923f3af4588ecc221a41f3df1cb7257a7b12e80ff9
|
|
| MD5 |
c66ff22affad107d74e64057dac9a82b
|
|
| BLAKE2b-256 |
b888da395b7b594fea248a330ec71dddbca8f91471d8ec366bfc6094795f3920
|