ticket:6 correction in views.py and widgets.py