George
Malik
TypeError at /
'builtin_function_or_method' object is not iterable
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.10
Exception Type: TypeError
Exception Value:
'builtin_function_or_method' object is not iterable
Exception Location: C:\Users\user\dev\cfehome\lib\site-packages\django\template\context.py in init, line 18
Python Executable: C:\Users\user\dev\cfehome\Scripts\python.exe
Python Version: 3.7.2
Python Path:
['C:\\Users\\user\\Dev\\cfehome\\src\\cfehome',
'C:\\Users\\user\\dev\\cfehome\\Scripts\\python37.zip',
'C:\\Users\\user\\dev\\cfehome\\DLLs',
'C:\\Users\\user\\dev\\cfehome\\lib',
'C:\\Users\\user\\dev\\cfehome\\Scripts',
'c:\\python37\\Lib',
'c:\\python37\\DLLs',
'C:\\Users\\user\\dev\\cfehome',
'C:\\Users\\user\\dev\\cfehome\\lib\\site-packages']
Server time: Thu, 21 Feb 2019 00:04:08 +0000
Malik
this is the error
George
TypeError at /
'builtin_function_or_method' object is not iterable
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.10
Exception Type: TypeError
Exception Value:
'builtin_function_or_method' object is not iterable
Exception Location: C:\Users\user\dev\cfehome\lib\site-packages\django\template\context.py in init, line 18
Python Executable: C:\Users\user\dev\cfehome\Scripts\python.exe
Python Version: 3.7.2
Python Path:
['C:\\Users\\user\\Dev\\cfehome\\src\\cfehome',
'C:\\Users\\user\\dev\\cfehome\\Scripts\\python37.zip',
'C:\\Users\\user\\dev\\cfehome\\DLLs',
'C:\\Users\\user\\dev\\cfehome\\lib',
'C:\\Users\\user\\dev\\cfehome\\Scripts',
'c:\\python37\\Lib',
'c:\\python37\\DLLs',
'C:\\Users\\user\\dev\\cfehome',
'C:\\Users\\user\\dev\\cfehome\\lib\\site-packages']
Server time: Thu, 21 Feb 2019 00:04:08 +0000
Windows is horrible
cj
that's why I don't use Windows, you don't have the flexibility you get in Linux
🤷🏻♂
Trials
Krishna Praneeth
Chen
I want ask how to send a delay task to celery using redis when the django app and celery in different programs
Blue🦋
Chen
task.delay(*args)
I knew this,but my situation is my django website and celery task in different coding workspace.
Ghorz
TypeError at /
'builtin_function_or_method' object is not iterable
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.10
Exception Type: TypeError
Exception Value:
'builtin_function_or_method' object is not iterable
Exception Location: C:\Users\user\dev\cfehome\lib\site-packages\django\template\context.py in init, line 18
Python Executable: C:\Users\user\dev\cfehome\Scripts\python.exe
Python Version: 3.7.2
Python Path:
['C:\\Users\\user\\Dev\\cfehome\\src\\cfehome',
'C:\\Users\\user\\dev\\cfehome\\Scripts\\python37.zip',
'C:\\Users\\user\\dev\\cfehome\\DLLs',
'C:\\Users\\user\\dev\\cfehome\\lib',
'C:\\Users\\user\\dev\\cfehome\\Scripts',
'c:\\python37\\Lib',
'c:\\python37\\DLLs',
'C:\\Users\\user\\dev\\cfehome',
'C:\\Users\\user\\dev\\cfehome\\lib\\site-packages']
Server time: Thu, 21 Feb 2019 00:04:08 +0000
You tried to loop over an object which can't be iterated.
007
How to add js in views.py
Mirco
007
I want to take value inside input type in html using it's id/class
007
And search that value in db using views.py
007
Using filter
Mirco
Mirco
and pass that value to your view
007
How to use js in template
George
George
Well, you can but you should not
007
So is there any method to get input value from template and search that value in DB
George
George
learn what views are
George
George
George
:)
007
Actually i don't have much knowledge about ajax... If you tell me exact method it will be helpful for me
George
George
This is only at client layer affecting Javascript so it's somewhat offtopic
007
Just like in view.py :-
result = request.Get.get("data")
George
If your views are ok, you just have to work in learning how to use fetch api
007
Ok.. thanks ✌️✌️
Marcos
Hi o/. How can i change the default Django admin when I use "SimpleFilterList" to not show the "all" option?
Anonymous
Anonymous
Be careful that you are in the same directory that have manage.py
Anonymous
After that put username email and password
Anonymous
Login in the admin by using this and in admin dashboard u can found users in there is your created user you can also add more than 1 user
Abel
Hello guys I am beginner for django is it safe to use bitnami django stack for django development
Patricia Franco
Hi! How can I create a seed for some tables that not change using insert command?
Marcos
Marcos
"all"="todos" in portuguese
Marcos
I need remove or put this default field last. 😥
Mirco
Baruc
Can I please, know why Django rest framework is not showing (it don't even exist in the rendered data) on rest framework routers. It is in a ModelSerializer. I specified the id field in the fields. Here is file content
Baruc
from rest_framework import serializers
from campagne1.models import Ecouteur, Jour
class EcouteurSerializer(serializers.ModelSerializer):
class Meta:
model = Ecouteur
fields = ('id', 'nom', 'prenom', 'contact', 'date_naissance')
#class Meta:
# model = Ecouteur
# fields = ('id','nom', 'prenom', 'contact', 'date_naissance')
class JourSerializer(serializers.ModelSerializer):
class Meta:
model = Jour
fields = ('date', 'numero')
Francis
Hello people, I am working on rest framework api... Anyone please guide me to material on how i should implement JWT....
Baruc
from rest_framework import serializers
from campagne1.models import Ecouteur, Jour
class EcouteurSerializer(serializers.ModelSerializer):
class Meta:
model = Ecouteur
fields = ('id', 'nom', 'prenom', 'contact', 'date_naissance')
#class Meta:
# model = Ecouteur
# fields = ('id','nom', 'prenom', 'contact', 'date_naissance')
class JourSerializer(serializers.ModelSerializer):
class Meta:
model = Jour
fields = ('date', 'numero')
the rendering exclude the id field. Receive my greeting, as I'm hoping find how to figure it. Thanks a lot !
Francis
Followed it, doesn't show concept of user registration and login
Francis
It ddnt answer me
Francis
Thank u Mirco... Let me check it out
Mirco
Francis
I can just use rest_framework.authtoken !!? Does it have any advantage to over jwt... or which is better!!?
.
Mohamed
But you still need to active content security policy (CSP) so that they can't still the toke using javescript
Malik
Izzati
hi, i want ask question about django rest framework . im new to DRF. i have problem with log in django rest framework . it happen when i add REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
),
Izzati
i cant log in as user .
Izzati
when i delete the authentication class it works
Izzati
i want to add token authentication
Izzati
using command i can generate token . it just log in have problem
Izzati
sorry for my bad english
.
Place your token in request header
.
Authentication: Token <your_token>
.
And optionally don't use tokenauth alone. Add also sessionauth. This is is my code snippet 'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
)
inchidi
Izzati
THANK YOU
Izzati
😭thanks
Izzati
i add session auth and its works
.