Eng_Salah Aldin Alhaj
ok but i don't know how to use environment variable with json file
Eng_Salah Aldin Alhaj
if you have example or post please share it with me
Eng_Salah Aldin Alhaj
i know about this but google credtinal use json file
Charly
Eng_Salah Aldin Alhaj
https://imgbox.com/gallery/edit/hpFM67ueaN/B8k3E76ZParMHfF7
Eng_Salah Aldin Alhaj
Eng_Salah Aldin Alhaj
this my first time to use .env with this type
Eng_Salah Aldin Alhaj
Eng_Salah Aldin Alhaj
if you give me simple example
cj
¯\_(ツ)_/¯
Eng_Salah Aldin Alhaj
i swear already know about environment variable but i have't any ideas how to passing json to environment variable
Eng_Salah Aldin Alhaj
i have't basics google service
Charly
Eng_Salah Aldin Alhaj
ok what the next
Charly
Abhie
Eng_Salah Aldin Alhaj
Eng_Salah Aldin Alhaj
if is only required Norma variables is not problem but the required is credtinal object
cj
Tipu
Hey guyzz, Can you tell me how to register django custom filter/tags?? I have followed all steps but not working
Eng_Salah Aldin Alhaj
👆🏼👆🏼
my friend this is first time i use Google service
you have lot experience about this things so you say every body hasn't same your experience hasn't learned Python
Erick
Charly
https://imgbox.com/xNUePCNG
So you code has a way to load the values from the env? the keys that is searching are the right ones?
Eng_Salah Aldin Alhaj
Eng_Salah Aldin Alhaj
Charly
Eng_Salah Aldin Alhaj
Erick
you have to put the json content into a env variable, then read id and parse it as json
Eng_Salah Aldin Alhaj
Erick
cat credentials.json | base64 # copy this value i
export GOOGLE_CREDENTIALS={value_from_before}
# in python
GOOGLE_CREDENTIALS = json.loads(base64.decode64(os.environ.get(“GOOGLE_CREDENTIALS”)))
something like that
Eng_Salah Aldin Alhaj
Eng_Salah Aldin Alhaj
Erick
what method? 🤔
Eng_Salah Aldin Alhaj
no no problem i will try your advice
Eng_Salah Aldin Alhaj
Thank you very much. Your advice helped me a lot. I will try it. Thank you for your time @erickgnavar
Kirill
Hi, everyone! Which library I shoud use to make search field with autocomplete?
Tanner
Blockchain
Hello everyone.
I have one problem.
When I use gunicorn to serve django project, async orm query doesn't work.
Could you let me know how to fix this issue?
Kirill
Tanner
Kirill
S
Hello everyone
I am working on one folder but when I'm trying to import something it's showing me error
Ana
Hello everyone
Please I'm try to deploy my Django project offline for my client to be able to run it on his PC without installing Python.
How should I go about it?
S
For example in django
I created one project then create one app by "django-admin startapp newapp
Then i go in newapp folder where I have python file urls.py where I want to use
"from newapp import views"
But it is showing me redline bottom of newapp folder
S
aRi
Mahmood
Hi everyone
I'm trying to get the last element of a queryset in template
I saw that we can't use the "last" filter because it's for the lists not querysets
So i used the last method of the queryset
{{q_list.last}}
But sometimes strange here the last method give me the first element as the first method does
Can anybody explain
Thanks
Mahmood
I even tried to put a break point
And i print the queryset and it's more than one item
And the last and first methods give the same output using the debug console
Mahmood
There us method called latest
I used latest("id") in the debug console and it gives the right answer
But i wanted an explain why the last method gives wrong answer
Mahmood
I found the problem, i don't know if this is a bug or not
my queryset was with order_by("display_order") and all the list display_order value were 0
It's strange it gives the same value in first and last methods
Does not make sense
Thanks everyone
Sorry for long messages
Dembe
IntegrityError at /create work/
el valor nulo en la columna «fecha_nacimiento» de la relación «persona» viola la restricción de no nulo
DETAIL: La fila que falla contiene (9, , null, f, , , , , f, t, 2022-10-20 23:12:26.457138+00, , null, F, ).
Request Method: POST
Request URL: http://localhost:8000/create%20work/
Django Version: 3.2.9
Exception Type: IntegrityError
Exception Value:
el valor nulo en la columna «fecha_nacimiento» de la relación «persona» viola la restricción de no nulo
DETAIL: La fila que falla contiene (9, , null, f, , , , , f, t, 2022-10-20 23:12:26.457138+00, , null, F, )
Dembe
IntegrityError at /create work/
el valor nulo en la columna «fecha_nacimiento» de la relación «persona» viola la restricción de no nulo
DETAIL: La fila que falla contiene (9, , null, f, , , , , f, t, 2022-10-20 23:12:26.457138+00, , null, F, ).
Request Method: POST
Request URL: http://localhost:8000/create%20work/
Django Version: 3.2.9
Exception Type: IntegrityError
Exception Value:
el valor nulo en la columna «fecha_nacimiento» de la relación «persona» viola la restricción de no nulo
DETAIL: La fila que falla contiene (9, , null, f, , , , , f, t, 2022-10-20 23:12:26.457138+00, , null, F, )
somebody can help me here?? I don't know what is it
Charly
IntegrityError at /create work/
el valor nulo en la columna «fecha_nacimiento» de la relación «persona» viola la restricción de no nulo
DETAIL: La fila que falla contiene (9, , null, f, , , , , f, t, 2022-10-20 23:12:26.457138+00, , null, F, ).
Request Method: POST
Request URL: http://localhost:8000/create%20work/
Django Version: 3.2.9
Exception Type: IntegrityError
Exception Value:
el valor nulo en la columna «fecha_nacimiento» de la relación «persona» viola la restricción de no nulo
DETAIL: La fila que falla contiene (9, , null, f, , , , , f, t, 2022-10-20 23:12:26.457138+00, , null, F, )
Yu are sendind a null value for fecha_nacimiento
Doragonsureiyā
Issue
Ana
Issue
Ana
Okay it's working
Issue
cool
Maxim
https://t.me/django/226511
Rohan
Rohan
Now it's working, I just added the root path from directory in static dir
S
Doragonsureiyā
Do you want to hire someone?
Ritwik
how can I permanently change the configured language for html from django html to emmet html?
aRi
I tried it's not working
If you are in newapp's urls.py and you want to import newapp's views.py into that
It's the way to import
Mohammad
Hi guys i have a question about postman.
Is it good to be learnt while i'm working with api or later?