If you try to start the runserver in this state, an error will occur.If there is a solution, please take care of it.
error messages:
AttributeError: module 'bootstrap_datepicker_plus' has no attribute 'DatePickerInput'
source code:
models.py
from django import forms
from django.contrib.auth.models import User
from.models import Account
import bootstrap_datepicker_plus as datetimepicker
# Form Class Creation
class AccountForm (forms.ModelForm):
# password entry:hiding
password=forms.CharField (widget=forms.PasswordInput(), label="password")
class Meta():
# user authentication
model=User
# field specification
fields=('username', 'email', 'password')
# field naming
labels={'username':"User ID", 'email':"mail"}
classAddAccountForm(forms.ModelForm):
class Meta():
# Specify model class
model=Account
fields=('last_name', 'first_name', 'year')
labels = {'last_name': "last name", 'first_name': "name", 'year': 'birthday'}
widgets = {
'year': datetimepicker.DatePickerInput(
format = '%Y-%m-%d',
options = {
locale: 'ja',
dayViewHeaderFormat: 'YYYYY Year MMMM',
}
),
}
settings.py
INSTALLED_APPS=[
'django_bootstrap5',
'bootstrap_datepicker_plus',
]
django-bootstrap-datepicker-plus
has never been used, but as far as official site,
import bootstrap_datepicker_plus as datetimepicker
instead of
import bootstrap_datepicker_plus.widgets as datetimepicker
I have a feeling that , but what do you think?
Just in case, there seems to be an article like .
1038 M2 Mac fails to install rbenv install 3.1.3 due to errors
874 GDB gets version error when attempting to debug with the Presense SDK (IDE)
1068 Uncaught (inpromise) Error on Electron: An object could not be cloned
1584 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2025 OneMinuteCode. All rights reserved.