ImportError: cannot import name 'employees' from 'rest_framework'

268 views
Skip to first unread message

Pooja Kumari

unread,
Sep 1, 2022, 10:02:21 AM9/1/22
to Django users
Can anyone explain this error?
Untitled.jpg

MAHESH KUMAR

unread,
Sep 1, 2022, 10:16:18 AM9/1/22
to django...@googlegroups.com
You can write  your serializers in 3rd line 

From .models import employees 

Thanks, 
Mahesh 

On Thu, Sep 1, 2022, 19:30 Pooja Kumari <poojai...@gmail.com> wrote:
Can anyone explain this error?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2920648e-f12c-4e26-a089-59a196fd653an%40googlegroups.com.

Akash Kundoo

unread,
Sep 1, 2022, 11:02:45 AM9/1/22
to django...@googlegroups.com
From where you're importing employees? Check that? 

Ashish Rawat

unread,
Sep 1, 2022, 11:21:46 AM9/1/22
to django...@googlegroups.com
There is error in line number 3 you are importing the module from restapi but you should take that from model 

subin

unread,
Sep 1, 2022, 1:00:06 PM9/1/22
to django...@googlegroups.com

subin

unread,
Sep 1, 2022, 1:01:16 PM9/1/22
to django...@googlegroups.com
Thank you for reaching out to us

subin

unread,
Sep 1, 2022, 1:03:32 PM9/1/22
to django...@googlegroups.com
We have received your message and will be in touch within

Pooja Kumari

unread,
Sep 1, 2022, 1:18:13 PM9/1/22
to django...@googlegroups.com
Understood.
Thank you very much

subin

unread,
Sep 1, 2022, 1:29:03 PM9/1/22
to django...@googlegroups.com
I will continue learning more about .

subin

unread,
Sep 1, 2022, 1:57:31 PM9/1/22
to django...@googlegroups.com
Kindly notify me should you need any other information.

Shams Ulhaq

unread,
Sep 1, 2022, 3:27:41 PM9/1/22
to django...@googlegroups.com
From . models import employees 
Then use in serializer

subin

unread,
Sep 1, 2022, 3:34:50 PM9/1/22
to django...@googlegroups.com
Kindly notify me should you need any other information.

M Adnan

unread,
Sep 1, 2022, 5:35:33 PM9/1/22
to django...@googlegroups.com
From webapp.models import employee 

Luqman Lawal

unread,
Sep 1, 2022, 7:10:25 PM9/1/22
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages