django-basic-form-builder 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. django_basic_form_builder-0.1.2/CHANGELOG.md +132 -0
  2. django_basic_form_builder-0.1.2/CONFIGURATION_GUIDE.md +699 -0
  3. django_basic_form_builder-0.1.2/LICENSE +21 -0
  4. django_basic_form_builder-0.1.2/MANIFEST.in +10 -0
  5. django_basic_form_builder-0.1.2/PKG-INFO +305 -0
  6. django_basic_form_builder-0.1.2/QUICKSTART.md +281 -0
  7. django_basic_form_builder-0.1.2/README.md +263 -0
  8. django_basic_form_builder-0.1.2/RELEASE_NOTES.md +151 -0
  9. django_basic_form_builder-0.1.2/django_basic_form_builder.egg-info/PKG-INFO +305 -0
  10. django_basic_form_builder-0.1.2/django_basic_form_builder.egg-info/SOURCES.txt +37 -0
  11. django_basic_form_builder-0.1.2/django_basic_form_builder.egg-info/dependency_links.txt +1 -0
  12. django_basic_form_builder-0.1.2/django_basic_form_builder.egg-info/requires.txt +16 -0
  13. django_basic_form_builder-0.1.2/django_basic_form_builder.egg-info/top_level.txt +1 -0
  14. django_basic_form_builder-0.1.2/formbuilder/__init__.py +0 -0
  15. django_basic_form_builder-0.1.2/formbuilder/admin.py +459 -0
  16. django_basic_form_builder-0.1.2/formbuilder/api/serializers.py +10 -0
  17. django_basic_form_builder-0.1.2/formbuilder/api/urls.py +9 -0
  18. django_basic_form_builder-0.1.2/formbuilder/api/views.py +29 -0
  19. django_basic_form_builder-0.1.2/formbuilder/apps.py +11 -0
  20. django_basic_form_builder-0.1.2/formbuilder/compat.py +25 -0
  21. django_basic_form_builder-0.1.2/formbuilder/migrations/0001_initial.py +93 -0
  22. django_basic_form_builder-0.1.2/formbuilder/migrations/0002_alter_formfield_field_type_fieldoption.py +66 -0
  23. django_basic_form_builder-0.1.2/formbuilder/migrations/0003_formfield_question_alter_formfield_label.py +24 -0
  24. django_basic_form_builder-0.1.2/formbuilder/migrations/__init__.py +0 -0
  25. django_basic_form_builder-0.1.2/formbuilder/models.py +363 -0
  26. django_basic_form_builder-0.1.2/formbuilder/schema_types.py +131 -0
  27. django_basic_form_builder-0.1.2/formbuilder/services/schema_builder.py +91 -0
  28. django_basic_form_builder-0.1.2/formbuilder/static/formbuilder/admin/css/formfield_admin.css +138 -0
  29. django_basic_form_builder-0.1.2/formbuilder/static/formbuilder/admin/js/formfield_admin.js +171 -0
  30. django_basic_form_builder-0.1.2/formbuilder/tests/__init__.py +0 -0
  31. django_basic_form_builder-0.1.2/formbuilder/tests/conftest.py +8 -0
  32. django_basic_form_builder-0.1.2/formbuilder/tests/test_admin.py +54 -0
  33. django_basic_form_builder-0.1.2/formbuilder/tests/test_api.py +65 -0
  34. django_basic_form_builder-0.1.2/formbuilder/tests/test_compat.py +17 -0
  35. django_basic_form_builder-0.1.2/formbuilder/tests/test_models.py +260 -0
  36. django_basic_form_builder-0.1.2/formbuilder/tests/test_schema_builder.py +54 -0
  37. django_basic_form_builder-0.1.2/formbuilder/views.py +1 -0
  38. django_basic_form_builder-0.1.2/pyproject.toml +109 -0
  39. django_basic_form_builder-0.1.2/setup.cfg +4 -0
@@ -0,0 +1,132 @@
1
+ # Changelog
2
+
3
+ All notable changes to django-formbuilder will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.2] - 2026-02-09
9
+
10
+ ### Added
11
+
12
+ - Project metadata URLs for PyPI (Homepage, Documentation, Source, Tracker).
13
+ - Detailed `TypedDict` definitions for all field configuration types in `schema_types.py` (Radio, Checkbox, Rating, Boolean, Email, Date).
14
+
15
+ ### Changed
16
+
17
+ - Moved `psycopg[binary]` (PostgreSQL) and `nh3` (HTML sanitization) to optional dependencies (`postgres` and `html` extras) to promote a leaner core package associated with `django-formbuilder`.
18
+ - Refactored `CustomForm`, `FormField`, and `FieldOption` save methods to use `transaction.atomic()`, ensuring consistent schema generation and data integrity.
19
+ - Modernized `FieldConfig` type definition to use Python 3.10+ `|` union syntax.
20
+
21
+ ### Fixed
22
+
23
+ - Resolved `NameError` issues in `schema_types.py` by removing unused imports and updating type syntax.
24
+
25
+ ## [0.1.0] - 2026-02-09
26
+
27
+ ### Added
28
+
29
+ #### Core Features
30
+
31
+ - **Dynamic Form Builder**: Create and manage custom forms entirely through Django admin
32
+ - **JSON Schema Generation**: Automatic JSON schema generation for frontend consumption
33
+ - **REST API Endpoint**: Read-only API at `/api/forms/<slug>/` for published forms
34
+ - **Admin Preview**: In-admin JSON preview link for instant schema inspection
35
+
36
+ #### Data Models
37
+
38
+ - `CustomForm` model with name, slug, description, status (draft/published), and JSON schema storage
39
+ - `FormField` model with comprehensive configuration options
40
+ - `FieldOption` model for managing dropdown, radio, and checkbox options via inline admin
41
+
42
+ #### Field Types
43
+
44
+ - **Text**: Single-line text input with minLength, maxLength, pattern, inputMode, prefix, suffix
45
+ - **Number**: Numeric input with min, max, step, unit validation
46
+ - **Textarea**: Multi-line text with rows, minLength, maxLength, autoResize
47
+ - **Dropdown**: Single or multiple selection with options from FieldOption model
48
+ - **Radio**: Single selection with radio button UI, options from FieldOption model
49
+ - **Checkbox**: Multi-select with minSelections, maxSelections constraints
50
+ - **Rating**: 1-5 or 1-10 scale with stars/numeric/emoji styles
51
+ - **Boolean**: Yes/No or True/False toggle with custom labels
52
+ - **Email**: Email validation with optional confirm email field
53
+ - **Date**: Date picker with minDate, maxDate, format configuration
54
+
55
+ #### Admin UX
56
+
57
+ - **Stacked Inline Editor**: Enhanced form field editing with visual separation
58
+ - **Label vs Question Fields**:
59
+ - Label: Short technical identifier for compact UIs
60
+ - Question: Detailed user-facing text for feedback forms
61
+ - **Auto-positioning**: Automatic position field updates when adding/removing fields
62
+ - **Type-specific Configuration**: Dedicated config sections for text/number/rating fields
63
+ - **Field Option Management**: Inline editor for dropdown/radio/checkbox options
64
+ - **Visual Improvements**:
65
+ - 3px borders and shadows for field separation
66
+ - Expandable/collapsible fieldsets with arrow icons
67
+ - Gradient backgrounds and hover effects
68
+ - Clear help text for all configuration options
69
+
70
+ #### Schema Builder Service
71
+
72
+ - Pure Python `SchemaBuilder` service with zero Django dependencies
73
+ - `CustomForm.generate_schema()` wrapper for automatic schema regeneration
74
+ - Attribute whitelisting per field type
75
+ - Validation for type-specific rules (min/max relationships, option constraints)
76
+
77
+ #### Testing & Quality
78
+
79
+ - Comprehensive test suite with pytest and pytest-django
80
+ - 100% test coverage for core functionality
81
+ - Unit tests for all field types and validation rules
82
+ - API endpoint tests (happy path, 404, feature flag)
83
+ - Admin validation tests
84
+ - Schema generation tests
85
+
86
+ #### Developer Experience
87
+
88
+ - Pre-commit hooks with ruff linting and formatting
89
+ - Type hints throughout codebase
90
+ - Comprehensive documentation in README
91
+ - Sample fixture (`demo_form.json`) with all field types
92
+ - Technical architecture documentation
93
+ - Configuration guide for host projects
94
+
95
+ #### Compatibility
96
+
97
+ - Django 5.1+ support
98
+ - Django REST Framework 3.15+ integration
99
+ - Python 3.12+ compatibility
100
+ - Python 3.14 compatibility patch for template context bug
101
+
102
+ ### Configuration
103
+
104
+ - `FORMBUILDER_API_ENABLED`: Feature flag to enable/disable API (default: False; opt-in by setting `FORMBUILDER_API_ENABLED = True`)
105
+ - Automatic schema regeneration on form/field/option save
106
+ - Unique constraints for slugs and positions per form
107
+
108
+ ### Documentation
109
+
110
+ - Complete README with installation, usage, and API documentation
111
+ - Field attribute matrix showing all config options per type (updated to cover every field)
112
+ - Label vs Question usage guide
113
+ - Quick start guide with step-by-step examples
114
+ - JSON schema contract documentation
115
+ - Testing instructions
116
+
117
+ ### Dependencies
118
+
119
+ - Django >= 5.1, < 5.2
120
+ - djangorestframework >= 3.15.0
121
+ - drf-spectacular >= 0.29.0 (API documentation)
122
+ - Optional extras: `postgres` installs psycopg[binary]>=3.2.0, `html` installs nh3>=0.3.2
123
+
124
+ ### Development Dependencies
125
+
126
+ - pytest >= 8.0.0
127
+ - pytest-django >= 4.8.0
128
+ - pytest-cov >= 5.0.0
129
+ - ruff >= 0.5.0 (linting and formatting)
130
+ - mypy >= 1.11.0 (type checking)
131
+
132
+ [0.1.0]: https://github.com/yourusername/django-formbuilder/releases/tag/v0.1.0