Closed shazianusrat closed 5 years ago
What are your errors? Please post tracebacks or elaborate on what doesn't work.
Request Method: | GET
-- | --
http://localhost:8000/en/shop/basket/
1.11.15
TypeError
__init__() missing 1 required positional argument: 'strategy'
/home/shazia/oscar/getyoursolar/apps/oscar/basket/views.py in get_context_data, line 69
/home/shazia/oscar/bin/python
3.6.7
['/home/shazia/oscar/getyoursolar', '/home/shazia/oscar/lib/python36.zip', '/home/shazia/oscar/lib/python3.6', '/home/shazia/oscar/lib/python3.6/lib-dynload', '/usr/lib/python3.6', '/home/shazia/oscar/lib/python3.6/site-packages']
On my line 69:
def get_context_data(self, **kwargs):
context = super(BasketView, self).get_context_data(**kwargs)
context['battery_form'] = AddBattery() #this is line 69
context['battery_data'] = self.get_battery_objects()
print(context)
return context
Sorry this looks like an issue that has nothing to do with extra views. Closing. Please ask on StackOverflow or get professional help.
I know this platform is not for posting such issues but humbly I request you to help me. I am working in django-oscar and I am trying to inherit a simple form but I ran into errors while subclassing ModelFormSetView from django-extra-views. Following is the code:
My Form: Link for BasketLineForm is https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/basket/forms.py#L14
My Views: Link for BasketView is: https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/basket/views.py#L32
I can't make my form work and can't display form based args/kwargs in django shell.