ChoiceInline field giving name error

67 views
Skip to first unread message

sanjeet kaur

unread,
Jan 14, 2015, 8:03:59 AM1/14/15
to django...@googlegroups.com
Hi,
  I am working on django ap in which I have two apps in a single project but while using inline option, I get the error

NameError: name 'ChoiceInline' is not defined
 
I have searched this error and all say that 'l' in StackedInline and ChoiceInline should not be capitalized. I have corrected this but still getting the same error.
I have attached the screenshots of models.py and admin.py
models.png
admin_py.png

Kamal Kaur

unread,
Jan 14, 2015, 8:20:54 AM1/14/15
to django...@googlegroups.com
On Wed, Jan 14, 2015 at 6:33 PM, sanjeet kaur <saify...@gmail.com> wrote:
> NameError: name 'ChoiceInline' is not defined


Have you tried this?

http://stackoverflow.com/questions/22768262/nameerror-not-defined

--
Kamaljeet Kaur

Vinayak Kaniyarakkal

unread,
Jan 14, 2015, 8:39:46 AM1/14/15
to django...@googlegroups.com
1. Define expense admin after ChoiceInline.
2. "inlines = [ChoiceInline]" should come in expenseAdmin, not in ChoiceInline.
 

sanjeet kaur

unread,
Jan 15, 2015, 5:38:34 AM1/15/15
to django...@googlegroups.com
 

Yes I tried but all that is correct.

Kamal Kaur

unread,
Jan 15, 2015, 5:47:33 AM1/15/15
to django...@googlegroups.com
On Thu, Jan 15, 2015 at 4:08 PM, sanjeet kaur <saify...@gmail.com> wrote:
> Yes I tried but all that is correct.

Are you following any tutorial? If yes, provide link.

--
Kamaljeet Kaur

sanjeet kaur

unread,
Jan 15, 2015, 7:02:25 AM1/15/15
to django...@googlegroups.com


On Jan 15, 2015 4:17 PM, "Kamal Kaur" <kamal....@gmail.com> wrote:
>
> On Thu, Jan 15, 2015 at 4:08 PM, sanjeet kaur <saify...@gmail.com> wrote:
> > Yes I tried but all that is correct.
>
> Are you following any tutorial? If yes, provide link.

Error solved

sanjeet kaur

unread,
Jan 15, 2015, 7:35:34 AM1/15/15
to django...@googlegroups.com


>
> Are you following any tutorial? If yes, provide link.

Yes I was following tutorial of poll app and the error was solved by the solution provided by vinayak

Reply all
Reply to author
Forward
0 new messages