inchidi
Kumar
Yup...
inchidi
inchidi
Leo
inchidi
define your version of payload tho
Kumar
Kumar
inchidi
no am asking Leo what his definition of payload, sometimes ppl use same terms for different things
inchidi
Kumar
Leo
Leo
Kumar
For token,
rest_framework.Authentication.TokenAuthentication
Currently I'm using this one, but i want to use jwt...
Leo
Search pyjwt.. look in its docs. Documention is not bad
Kumar
Okk, till now i tried for other links, I'll give it a try...
Leo
👍
Himanshu
Kumar
I have already done with some of the confs...
Himanshu
Himanshu
The way I use jwt is to send it as Bearer Authorization Token. I use Authorization as header key and use Bearer are prefix to JWT (separated via space).
Further if you are using Django in Apache environment, you need to set
WSGIPassAuthorization Yes (please google this)
Himanshu
But I have packaged two apps for my use and integration has become very easy for me. I use drfaddons and drf_user.
Can you get more specific as in where are you facing trouble?
Kumar
Kumar
Wait, I'll tell you...
Himanshu
Sam
Hello guys. How do i upload my django project to cpanel?
Kumar
@iamhssingh "OPTIONS /token-auth/ HTTP/1.1" 200 0
[22/May/2019 07:39:42] "POST /token-auth/ HTTP/1.1" 200 193
[22/May/2019 07:39:42] "OPTIONS /myapi/phonestore/products/ HTTP/1.1" 200 0
[22/May/2019 07:39:42] "GET /myapi/phonestore/products/ HTTP/1.1" 403 58
Kumar
axios.post('http://localhost:8080/token-auth/', userCredential)
Kumar
token is generating correctly but get request i snt working..
Kumar
@iamhssingh this is my view part
class PhoneStoreViewSet(viewsets.ModelViewSet):
permission_classes = (IsAuthenticated,)
queryset = PhoneStore.objects.all()
serializer_class = PhoneStoreSerializer
@action(methods=['get'], detail=False, url_path='products')
Himanshu
What are you sending? What are the headers? Can you share that in some pastebin kind of link?
Kumar
var headers = {'Authorization' : `Token ${token}`}
axios.get('http://localhost:8080/myapi/phonestore/products/', { headers })
Kumar
headers with my get request.
Kumar
and i'm sending all the things to ask if i'm missing anything...??
Himanshu
Can you share your JWT_SETTINGS?
Combot
Celebration has been banned! Reason: CAS ban.
Anu
https://www.jainuniversity.ac.in/Top-Indian-University-for-Engineering-and-Technology-in-Bangalore.php
Which is best under computer engineering b tech
Arulmurugan
Mirco
Doragonsureiyā
Anu
Help me
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
can we disabled specific tenant in django-tenants?
Sam
Sam
SatyendraN
NR
Hi. I want to get updates from different telegram channels and groups and post on web page which django library or any example code.
Joel
hi guys
Joel
i have the following error
Joel
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Joel
can help me?
Joel
i try "pip install django=2.2.1"
Anonymous
anyone help
Joel
Bryan
Joel
Bryan
Joel
fun
Joel
i guess
Bryan
Joel
NR
Hi. I want to get updates from different telegram channels and groups and post on web page which django library or any example code.
Bryan
NR
Bryan
i have the zip file even
Ronald
random question - is the “get” in get_or_create the same as the “get” in get_object_or_404 ?
Ronald
(Django 2.2)
ʚɞÇherry Łoveʚɞ
Ronald
same if that object exists.
hmmm.. so in theory if say I run the script and object doesn’t exist, it will create it. Then when I run it again it should be “created” and in that case return the object ?
ʚɞÇherry Łoveʚɞ
ʚɞÇherry Łoveʚɞ
get_or_create return a tuple object and False if object exists.
If object does not exists , Django will create an object with params you input then return It a tuple object and True.