mirror of https://github.com/snachodog/mybuddy.git
Black
This commit is contained in:
parent
0335b8ca89
commit
7af66176aa
|
@ -6,13 +6,32 @@ from django.db import migrations, models
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('babybuddy', '0020_update_language_en_to_en_us'),
|
("babybuddy", "0020_update_language_en_to_en_us"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='settings',
|
model_name="settings",
|
||||||
name='language',
|
name="language",
|
||||||
field=models.CharField(choices=[('zh-hans', 'Chinese (simplified)'), ('nl', 'Dutch'), ('en-US', 'English (US)'), ('en-GB', 'English (UK)'), ('fr', 'French'), ('fi', 'Finnish'), ('de', 'German'), ('it', 'Italian'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('es', 'Spanish'), ('sv', 'Swedish'), ('tr', 'Turkish')], default='en-US', max_length=255, verbose_name='Language'),
|
field=models.CharField(
|
||||||
|
choices=[
|
||||||
|
("zh-hans", "Chinese (simplified)"),
|
||||||
|
("nl", "Dutch"),
|
||||||
|
("en-US", "English (US)"),
|
||||||
|
("en-GB", "English (UK)"),
|
||||||
|
("fr", "French"),
|
||||||
|
("fi", "Finnish"),
|
||||||
|
("de", "German"),
|
||||||
|
("it", "Italian"),
|
||||||
|
("pl", "Polish"),
|
||||||
|
("pt", "Portuguese"),
|
||||||
|
("es", "Spanish"),
|
||||||
|
("sv", "Swedish"),
|
||||||
|
("tr", "Turkish"),
|
||||||
|
],
|
||||||
|
default="en-US",
|
||||||
|
max_length=255,
|
||||||
|
verbose_name="Language",
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -42,7 +42,7 @@ class TagsEditor(Widget):
|
||||||
|
|
||||||
def build_attrs(self, base_attrs, extra_attrs=None):
|
def build_attrs(self, base_attrs, extra_attrs=None):
|
||||||
"""
|
"""
|
||||||
Bootstrap integration adds form-control to the classes of the widget.
|
Bootstrap integration adds form-control to the classes of the widget.
|
||||||
This works only for "plain" input-based widgets however. In addition,
|
This works only for "plain" input-based widgets however. In addition,
|
||||||
we need to add a custom class "babybuddy-tags-editor" for the javascript
|
we need to add a custom class "babybuddy-tags-editor" for the javascript
|
||||||
file to detect the widget and take control of its contents.
|
file to detect the widget and take control of its contents.
|
||||||
|
@ -56,9 +56,9 @@ class TagsEditor(Widget):
|
||||||
def get_context(self, name: str, value: Any, attrs) -> Dict[str, Any]:
|
def get_context(self, name: str, value: Any, attrs) -> Dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
Adds extra information to the payload provided to the widget's template.
|
Adds extra information to the payload provided to the widget's template.
|
||||||
|
|
||||||
Specifically:
|
Specifically:
|
||||||
- Query a list if "recently used" tags (max 256 to not cause
|
- Query a list if "recently used" tags (max 256 to not cause
|
||||||
DoS issues) from the database to be used for auto-completion. ("most")
|
DoS issues) from the database to be used for auto-completion. ("most")
|
||||||
- Query a smaller list of 5 tags to be made available from a quick
|
- Query a smaller list of 5 tags to be made available from a quick
|
||||||
selection widget ("quick").
|
selection widget ("quick").
|
||||||
|
|
Loading…
Reference in New Issue