Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Force DateRange to use TextWidget as it is not a float-based Range #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/apps/django2/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
Expand Down
3 changes: 3 additions & 0 deletions parambokeh/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def TextWidget(*args, **kw):
"""Forces a parameter value to be text"""
kw['value'] = str(kw['value'])
kw.pop('options', None)
kw.pop('start', None)
kw.pop('end', None)
return TextInput(*args,**kw)

def StaticText(*args, **kw):
Expand Down Expand Up @@ -108,6 +110,7 @@ def HTMLWidget(*args, **kw):
param.Number: FloatSlider,
param.Integer: IntSlider,
param.Range: RangeWidget,
param.DateRange: TextWidget, # Workaround
param.ListSelector: MultiSelect,
param.Action: ButtonWidget,
param.Date: DateWidget,
Expand Down