• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

monim67 / django-bootstrap-datepicker-plus / 7860847020

11 Feb 2024 08:43AM UTC coverage: 100.0%. Remained the same
7860847020

push

github

monim67
Fix clear input on form reset, fix #110

142 of 142 relevant lines covered (100.0%)

5.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/bootstrap_datepicker_plus/_config.py
1
from typing import Optional
5✔
2

3
from pydantic import BaseModel, Field
5✔
4

5
from .schemas import WidgetOptions, WidgetVariant
5✔
6

7

8
class WidgetConfig(BaseModel):
5✔
9
    """Widget config which is passed to input on render."""
5✔
10

11
    variant: WidgetVariant
5✔
12
    backend_date_format: str
5✔
13
    options: WidgetOptions = Field(default_factory=dict)
5✔
14
    range_from: Optional[str]
5✔
15

16
    def update_options(self, *options_args: Optional[WidgetOptions]) -> None:
5✔
17
        """Update options merging WidgetOptions sequentially."""
18
        for options_arg in options_args:
5✔
19
            if options_arg is not None:
5✔
20
                self.options.update(options_arg)
5✔
21

22
    def to_attr_value(self) -> str:
5✔
23
        """Convert to attr string value."""
24
        return self.json(exclude_none=True)
5✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc