It should be like.. APIView not like APIview
On Wed, 13 Nov 2019, 9:33 am MEGA NATHAN, <cloudnathan1997@gmail.com> wrote:
--patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)File "C:\Users\Meghanathan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\functional.py", line 80, in __get__res = instance.__dict__[self.name] = self.func(instance)File "C:\Users\Meghanathan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py", line 577, in urlconf_modulereturn import_module(self.urlconf_name)File "C:\Users\Meghanathan\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1006, in _gcd_importFile "<frozen importlib._bootstrap>", line 983, in _find_and_loadFile "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 677, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 728, in exec_moduleFile "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removedFile "C:\Users\Meghanathan\Desktop\java script\drf_api\drf_api\urls.py", line 4, in <module>from core.views import TestViewFile "C:\Users\Meghanathan\Desktop\java script\drf_api\core\views.py", line 8, in <module>from core.serializers import PostSerializerImportError: cannot import name 'PostSerializer' from 'core.serializers' (C:\Users\Meghanathan\Desktop\java script\drf_api\core\serializers.py)
On Wednesday, November 13, 2019 at 7:48:00 AM UTC+5:30, MEGA NATHAN wrote:Hi.i was creating simple REST_framework this api view ,connot import name in error. how to reslove this error__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1006, in _gcd_importFile "<frozen importlib._bootstrap>", line 983, in _find_and_loadFile "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 677, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 728, in exec_moduleFile "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removedFile "C:\Users\Meghanathan\Desktop\java script\drf_api\drf_api\urls.py", line 4, in <module>from core.views import test_viewFile "C:\Users\Meghanathan\Desktop\java script\drf_api\core\views.py", line 6, in <module>from rest_framework.views import APIviewImportError: cannot import name 'APIview' from 'rest_framework.views' (C:\Users\Meghanathan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rest_framework\views.py)RegardsMeganathan G
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6f7e0d7c-262b-4bb8-b3b4-fe44f0e7d991%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPjsHcGjq%3Du3E%2BjdJZg3m8aMymHfHxV3O2KqKya_u_Vy3p96Bw%40mail.gmail.com.
No comments:
Post a Comment