Skip to content

Commit

Permalink
Fix Doesn't support pydantic v2.0 (just released today) #99
Browse files Browse the repository at this point in the history
  • Loading branch information
monim67 committed Jul 2, 2023
1 parent 73eb0ca commit b871d3c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bootstrap_datepicker_plus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
from typing import Any, Dict, Optional, Tuple

from django.conf import settings as django_settings
from pydantic import Field, validator
from pydantic.env_settings import BaseSettings, SettingsSourceCallable

try:
from pydantic import Field, validator
from pydantic.env_settings import BaseSettings, SettingsSourceCallable
except:
from pydantic.v1.env_settings import BaseSettings, SettingsSourceCallable # type: ignore
from pydantic.v1 import Field, validator # type: ignore

from .schemas import WidgetOptions, WidgetVariant

Expand Down

0 comments on commit b871d3c

Please sign in to comment.