Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated some bugs and enhancements #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

svandeneertwegh
Copy link
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'

@@ -69,7 +70,6 @@ class CharFieldPlugin(mixin_factory("CharField"), FormElementPlugin):
name = _("Text")
model = models.CharField
form = forms.CharFieldForm
settings_fields = (("min_length", "max_length"),)
Copy link
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?

@@ -20,7 +20,15 @@
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
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
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