Skip to content

Updated some bugs and enhancements#8

Open
svandeneertwegh wants to merge 6 commits intodjango-cms:mainfrom
svandeneertwegh:updated
Open

Updated some bugs and enhancements#8
svandeneertwegh wants to merge 6 commits intodjango-cms:mainfrom
svandeneertwegh:updated

Conversation

@svandeneertwegh
Copy link
Copy Markdown
Contributor

  • Removed col and rows setting from CharField form plugin
  • Set more margin options in spacing between fields
  • Fixed anonymous as None to Foregin key 'form_user'

name = _("Text")
model = models.CharField
form = forms.CharFieldForm
settings_fields = (("min_length", "max_length"),)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove min_length and max_length? aren't they potentially needed for form validation?

framework = getattr(django_settings, "DJANGOCMS_FRONTEND_FRAMEWORK", "bootstrap5")
theme = getattr(django_settings, "DJANGOCMS_FRONTEND_THEME", "djangocms_frontend")

DEFAULT_SPACER_SIZE_CHOICES = (("mb-3", "Default"),)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather ask you to set this in your settings. It will first try to take DJANGO_FORM_BUILDER_SPACER_CHOICES then take django CMS frontend's settings if available.

@@ -0,0 +1,28 @@
from django.utils.translation import gettext_lazy as _
from djangocms_frontend.helpers import insert_fields
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not assume django CMS frontend is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants