Re: 'Article' object is not iterable ,why this error is popping up,while fetching data using primary no

2020-11-03 Thread Ashutosh Mishra
I want to fetch a particular entry by using primary key,suppose if I put 1 the entry associated with 1 will appear On Wed 4 Nov, 2020, 12:01 Xavier Ordoquy, wrote: > The question is, what are you trying to do and what outcome are you > expecting ? > > Le 4 nov. 2020 à 07:28, Ashutosh Mishra a

Re: 'Article' object is not iterable ,why this error is popping up,while fetching data using primary no

2020-11-03 Thread Xavier Ordoquy
The question is, what are you trying to do and what outcome are you expecting ? > Le 4 nov. 2020 à 07:28, Ashutosh Mishra a écrit > : > > So how can I resolve this? > > On Wed 4 Nov, 2020, 11:56 Xavier Ordoquy, > wrote: > Hi, > > Please, paste your code in the

Re: 'Article' object is not iterable ,why this error is popping up,while fetching data using primary no

2020-11-03 Thread Ashutosh Mishra
So how can I resolve this? On Wed 4 Nov, 2020, 11:56 Xavier Ordoquy, wrote: > Hi, > > Please, paste your code in the mail instead of screenshots, it makes it > hard to read. > In your view, you are passing an Article instance to your serializer along > with the many=True keyword which means the

Re: 'Article' object is not iterable ,why this error is popping up,while fetching data using primary no

2020-11-03 Thread Xavier Ordoquy
Hi, Please, paste your code in the mail instead of screenshots, it makes it hard to read. In your view, you are passing an Article instance to your serializer along with the many=True keyword which means the serializer will expect an iterable of Articles as the error suggests. Regards, Xavier

Re: rest framework

2020-11-03 Thread Xavier Ordoquy
Hi, Also make sure you install it first. Django REST frameworks kickstart (https://www.django-rest-framework.org/tutorial/quickstart/#project-setup ) should help you get it working. Regards, Xavier O. > Le 3 nov. 2020

Re: rest framework

2020-11-03 Thread ifthikkarudheen t
First i have tried with that.. that too doesn't work man... On Wed, 4 Nov 2020, 03:07 Abdulrahman Alotaibi, wrote: > Hi Ifthikkarudheen, > > When you import 'rest-frameworm' inside .py files you need to use > 'rest_framework' with an Underscore not a dash. > > Sincerely, > Abdulrahman > > On

Re: rest framework

2020-11-03 Thread Abdulrahman Alotaibi
Hi Ifthikkarudheen, When you import 'rest-frameworm' inside .py files you need to use 'rest_framework' with an Underscore not a dash. Sincerely, Abdulrahman On Tue, Nov 3, 2020, 2:40 PM ifthikkarudheen t wrote: > i ' m unable to add rest framework i get this error > > module =

rest framework

2020-11-03 Thread ifthikkarudheen t
i ' m unable to add rest framework i get this error module = import_module(entry) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in