简体   繁体   中英

module 'app.forms' has no attribute 'JobsFormSet'

I've have something like this in django: "module 'app.forms' has no attribute 'JobsFormSet'"

views.py:

http://pastebin.com/Kwup5s1x

forms.py:

http://pastebin.com/WyMuW3vn

I don't know where is a problem. I'm beginner in django. I'm pretty sure this code is correct, because I'm using from this tutorial (in polish)

Th error you get is

module 'app.forms' has no attribute 'JobsFormSet'

which probably comes from the lines

form = self.get_form()
jobs = forms.JobsFormSet(self.request.POST)

since you try to get JobsFormSet attribute in "forms" instead of "form".

Try this:

jobs = form.JobsFormSet(self.request.POST)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM