Jyothi
No
Okay Thankyou
Sahil
{% for key,value in head_names.items %} {% if "ca_" in key %} {{key}} <li> <a href="/file_manage/{{ key }}" {% if head_values.key is not None %} class="with-file" {% endif %}> {{ value.1 }} {% if head_values.key %} ({{ head_values.key }}) {% endif %} </a> </li> {% endif %} {% endfor %} how can i pass key in head_values please help
Sahil
I have a dictionary head_values and another dictionary head_names I want to pass key of name in values
Alex
I have a dictionary head_values and another dictionary head_names I want to pass key of name in values
{% for key, value in head_names.items %} {% if "ca_" in key %} <li> <a href="/file_manage/{{ key }}" {% if head_values.key %} class="with-file" {% endif %}> {{ value.1 }} {% if head_values[key] %} ({{ head_values[key] }}) {% endif %} </a> </li> {% endif %} {% endfor %}
Sahil
Could not parse the remainder: '[key]' from 'head_values[key]'
Sahil
head_names = { 'ip_zip': ["Indagini preliminari", "Caricamento Atti TIAP"], 'ip_cnr': ["Indagini preliminari", "C.N.R."], 'ip_apg': ["Indagini preliminari", "Annotazioni P.G."], 'ip_vsi': ["Indagini preliminari", "Verbali SIT"], 'ip_ver': ["Indagini preliminari", "Verbali interrogatori"], 'ip_ite': ["Indagini preliminari", "Intercettazioni Telefoniche"], 'ip_iam': ["Indagini preliminari", "Intercettazioni Ambientali"], 'ip_itl': ["Indagini preliminari", "Intercettazioni Telematiche"], 'ip_mcp': ["Indagini preliminari", "Misure Cautelari Personali"], 'ip_mcr': ["Indagini preliminari", "Misure Cautelari Reali"], 'ip_alt': ["Indagini preliminari", "Altri documenti IP"], 'ip_sen': ["Indagini preliminari", "Richiesta di Archiviazione"], '1g_dec': ["Dibattimento I grado", "Decreto che dispone il giudizio"], '1g_vud': ["Dibattimento I grado", "Verbali udienze I^G"], '1g_tra': ["Dibattimento I grado", "Trascrizioni udienze I^G"], '1g_ppm': ["Dibattimento I grado", "Produzioni Pubblico Ministero"], '1g_pdi': ["Dibattimento I grado", "Produzioni Difese"], '1g_ppc': ["Dibattimento I grado", "Produzioni Parti Civili"], '1g_cit': ["Dibattimento I grado", "Citazione testimoni"], '1g_ord': ["Dibattimento I grado", "Ordinanze dibattimentali II^G"], '1g_alt': ["Dibattimento I grado", "Altri documenti I^G"], '1g_sen': ["Dibattimento I grado", "Sentenza I^G"], '2g_aap': ["Dibattimento II grado", "Atti di appello"], '2g_ain': ["Dibattimento II grado", "Appelli incidentali"], '2g_ver': ["Dibattimento II grado", "Verbali udienze II^G"], '2g_tra': ["Dibattimento II grado", "Trascrizioni udienze II^G"], '2g_mag': ["Dibattimento II grado", "Motivi aggiunti"], '2g_vri': ["Dibattimento II grado", "Verbali rinnovo istruttiria dibattimentale"], '2g_imp': ["Dibattimento II grado", "Impugnazioni"], '2g_ord': ["Dibattimento II grado", "Ordinanze dibattimentali II^G"], '2g_alt': ["Dibattimento II grado", "Altri documenti II^G"], '2g_sen': ["Dibattimento II grado", "Sentenza II^G"], 'ca_ric': ["Giudizio in Cassazione", "Ricorso"], 'ca_rin': ["Giudizio in Cassazione", "Ricorso incidentale"], 'ca_mem': ["Giudizio in Cassazione", "Memorie e motivi aggiunti"], 'ca_alt': ["Giudizio in Cassazione", "Altri documenti Cassazione"], 'ca_sen': ["Giudizio in Cassazione", "Sentenza Cassazione"], 'gi_sen': ["Giurisprudenza", "Sentenze"], } head_values = { 'ip_zip': 5, 'ip_cnr': 2, 'ca_ric': 7, 'ca_rin': 4, 'ca_mem': 3, } sending these 2 dicts
Eng:SE
How can I set up a BCC email that receives a copy of all emails sent from Django allauth?
Alex
head_names = { 'ip_zip': ["Indagini preliminari", "Caricamento Atti TIAP"], 'ip_cnr': ["Indagini preliminari", "C.N.R."], 'ip_apg': ["Indagini preliminari", "Annotazioni P.G."], 'ip_vsi': ["Indagini preliminari", "Verbali SIT"], 'ip_ver': ["Indagini preliminari", "Verbali interrogatori"], 'ip_ite': ["Indagini preliminari", "Intercettazioni Telefoniche"], 'ip_iam': ["Indagini preliminari", "Intercettazioni Ambientali"], 'ip_itl': ["Indagini preliminari", "Intercettazioni Telematiche"], 'ip_mcp': ["Indagini preliminari", "Misure Cautelari Personali"], 'ip_mcr': ["Indagini preliminari", "Misure Cautelari Reali"], 'ip_alt': ["Indagini preliminari", "Altri documenti IP"], 'ip_sen': ["Indagini preliminari", "Richiesta di Archiviazione"], '1g_dec': ["Dibattimento I grado", "Decreto che dispone il giudizio"], '1g_vud': ["Dibattimento I grado", "Verbali udienze I^G"], '1g_tra': ["Dibattimento I grado", "Trascrizioni udienze I^G"], '1g_ppm': ["Dibattimento I grado", "Produzioni Pubblico Ministero"], '1g_pdi': ["Dibattimento I grado", "Produzioni Difese"], '1g_ppc': ["Dibattimento I grado", "Produzioni Parti Civili"], '1g_cit': ["Dibattimento I grado", "Citazione testimoni"], '1g_ord': ["Dibattimento I grado", "Ordinanze dibattimentali II^G"], '1g_alt': ["Dibattimento I grado", "Altri documenti I^G"], '1g_sen': ["Dibattimento I grado", "Sentenza I^G"], '2g_aap': ["Dibattimento II grado", "Atti di appello"], '2g_ain': ["Dibattimento II grado", "Appelli incidentali"], '2g_ver': ["Dibattimento II grado", "Verbali udienze II^G"], '2g_tra': ["Dibattimento II grado", "Trascrizioni udienze II^G"], '2g_mag': ["Dibattimento II grado", "Motivi aggiunti"], '2g_vri': ["Dibattimento II grado", "Verbali rinnovo istruttiria dibattimentale"], '2g_imp': ["Dibattimento II grado", "Impugnazioni"], '2g_ord': ["Dibattimento II grado", "Ordinanze dibattimentali II^G"], '2g_alt': ["Dibattimento II grado", "Altri documenti II^G"], '2g_sen': ["Dibattimento II grado", "Sentenza II^G"], 'ca_ric': ["Giudizio in Cassazione", "Ricorso"], 'ca_rin': ["Giudizio in Cassazione", "Ricorso incidentale"], 'ca_mem': ["Giudizio in Cassazione", "Memorie e motivi aggiunti"], 'ca_alt': ["Giudizio in Cassazione", "Altri documenti Cassazione"], 'ca_sen': ["Giudizio in Cassazione", "Sentenza Cassazione"], 'gi_sen': ["Giurisprudenza", "Sentenze"], } head_values = { 'ip_zip': 5, 'ip_cnr': 2, 'ca_ric': 7, 'ca_rin': 4, 'ca_mem': 3, } sending these 2 dicts
<ul> {% for key, value in head_names.items %} {% if "ca_" in key %} {% with head_value = head_values.key %} <li> <a href="/file_manage/{{ key }}" {% if head_value is not None %} class="with-file" {% endif %}> {{ value.1 }} {% if head_value %} ({{ head_value }}) {% endif %} </a> </li> {% endwith %} {% endif %} {% endfor %} </ul>
nyctophile
hi there! https://ibb.co/TthYRWN can i change the base url in my project for ex: "http://localhost:8089/api/users/" to "http://<custom_url>/api/users/" ?
nyctophile
yeah
How can I ? Do you know?
Alex
How can I ? Do you know?
deploy the project to vps, point the domain to vps.
nyctophile
deploy the project to vps, point the domain to vps.
Just to be clear you are talking about this https://ibb.co/1r9f4pK urls?
nyctophile
this url is unreachable.
What do you mean?
Alex
This site can’t be reached The connection was reset. Try: Checking the connection ERR_CONNECTION_RESET
nyctophile
sure
Sent it
clouded
Could not parse the remainder: '[key]' from 'head_values[key]'
Either change the structure of the data you pass to your template as context, so that it does work with the template or create a custom filter to get to the value. Django templates do not allow you to access it like you want it to.
Hamzat
Hello I have an but I will like to share the error as an image Can I?
Trap
Hey guys, im trying to integrate Solr with django. I did all the things, but when i run python3 manage.py rebuild_index, last line is All documents removed. My directory tree: https://paste.mozilla.org/stii6dTv search_indexes.py: https://paste.mozilla.org/mvGBZVQX
Doragonsureiyā
Hello I have an but I will like to share the error as an image Can I?
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev
Hamzat
I connected my django to a supabase postgress database, the app works fine locally, i can send and receive data from the supabase database The problem is when i deployed my app on VERCEL i get the below error when i try to login or register, Please i need someone's help with this error OperationalError at /accounts/login/ connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
Mh
Django with mongodb
Mh
Which package is good
Mh
Djongo
Mh
Pymongo
Mh
Mongoengine
Mh
none
Then
Doragonsureiyā
Then
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Maxim
Then
don't use Django with MongoDB
Taha
don't use Django with MongoDB
Yeah it's terrible
Mehdi
Hi guys . i created Website like NETFLIX but how can i create subscription plans ? i mean is there any library to check payments and give user subscription ? like login req for checking if user already log or not
Aditi
Hello guys.. I'm a new user on the django platform and I'm facing difficulties in using it. Please help me
Aditi
Sure. I'll share where I'll face it
Ajeet
First learn the official documentation
I know as a beginner its hard but try to do it.
ㅤㅤ
Is django good framework for web development?
Maxim
Is django good framework for web development?
yes. ... and no too general a question
ㅤㅤ
Mern of python django which one is best ?
Doragonsureiyā
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so delete your question here and move to the @PythonOfftopic group and ask there.
Giovanny J.
don't use Django with MongoDB
I agree. You can use postgresql with Django, the most use cases of persistence can been resolve with Postgres without problem
Charly
Mern of python django which one is best ?
No one is best. They have different features objectives and of course languages. MERN is an stack Django a framework of course you can't compare them.
~
django.db.utils.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket? I encountered such a problem in Docker, when you usually run (python Manage.py runserver) everything works fine, but if with Docker it’s such garbage, how can I solve this? I did everything according to the instructions and this is such bullshit
Charly
i am facing similar error and i haven't found a solution
You need to set database setting scorrectly
Hamzat
You need to set database setting scorrectly
In my case I'm using a supabase postgres database I can send data to the database fine but once I deploy it on vercel it doesn't work It works well on local machine
~
i am facing similar error and i haven't found a solution
https://www.youtube.com/watch?v=4RVPyT90Jq8 maybe help u
Hamzat
https://www.youtube.com/watch?v=4RVPyT90Jq8 maybe help u
This can't work for me My database is in the cloud and not my local machine I'm using supabase postgres database
Hamzat
As I said you need to set up correctly the connection details
this is my database connections DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'HOST': os.getenv('POSTGRES_HOST'), 'NAME': os.getenv('POSTGRES_DATABASE'), 'USER': os.getenv('POSTGRES_USER'), 'PASSWORD': os.getenv('POSTGRES_PASSWORD'), 'PORT': os.getenv('POSTGRES_DB_PORT'), # port 'URL': os.getenv('DATABASE_URL'), } } I'm using environment database
Hamzat
Ans what environment variables did you provided?
you mean i should send my env details?
Charly
you mean i should send my env details?
I need to know what do you have at least for POSTGRES_HOST
Charly
you mean i should send my env details?
Of course without passwods
Hamzat
DEBUG='False' SECRET_KEY='django-insecure-vb3kftc7d+)r-@5ay2e(6cnh+(@dr#d!kr3j^6u0^d$yyq$fsg' DATABASE_URL=postgres.yeenrlfxsrpbpblnwzir password=** host=aws-0-eu-central-1.pooler.supabase.com port=5432 dbname=postgres POSTGRES_DATABASE='postgres' POSTGRES_USER='postgres.yeenrlfxsrpbpblnwzir' POSTGRES_PASSWORD='********' POSTGRES_HOST='aws-0-eu-central-1.pooler.supabase.com' POSTGRES_DB_PORT='5432'
Hamzat
And this is an .env file? Have you red the documentation of vercel regarding env vars?
yes it is an .env But i haven't read the docs on env vars
Hamzat
Well you know where to start
It has worked now Thanks so much sir The environment variables on vercel where the issue
mahyar
how i can send image in this group?
Charly
how i can send image in this group?
You don't. You exolain your issue with words, send code and errors accordingly to the rules
Doragonsureiyā
how i can send image in this group?
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Shivam
Hi guys, I am working on a Django project, and Client want to create custom username and password. Now I want to give an option on admin panal to add username and password through excel file. Does anyone have idea?
Bɪᴘᴀᴅ
Modify the trim model