Gahimbare
Nitin
How can I set the sessionID path. I am using authenticater() and auth_login() for login. But default it sets the path /.
Anonymous
Adisa
Where is the most affordable platform to host Django website
Anonymous
at chutadhost
Most affordable
ㅤ
guys i have been working on postgresql database django project, when i run on my test, database is avaiable,
i'm running it through docker, so i need to add additional function which waits for database,
so, when i run the app, it still waiting for my postgresql database
i have tested the test function for waiting the database, and it sucessfully working fine,
i will share my code
-docker-compose file
-wait_for_db file
-error i'm facing
Thanks in advance
khaled
when I use postgres with docker I do the following
db:
restart: on-failure
image: postgres:15
volumes:
- db:/var/lib/postgresql/data
ports:
- 8001:5432
env_file:
- .env
container_name: postgres_db
the env contains the env variables
and in the settings.py file I do this
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.getenv('POSTGRES_DB'),
'USER': os.getenv('POSTGRES_USER'),
'PASSWORD': os.getenv('POSTGRES_PASSWORD'),
'HOST': 'db',
'PORT': '',
}
}
TonFutures 💎
How can i download in django?
For example i have txt file:
test/gg.txt
TonFutures 💎
When user click the button, can download this txt file
Xerena🦋
Hi guys, I have a Django model and this model has json field and its default value type is list. It means the field keep data like this: [{id:4,name:abc}, {id:5, name: der}]. I need filter to multiple id values
Model.objects.filter(data__contains=[{'id':5}, {'id':6}]) this work with and query, but I want to or query. If data include id 5 or 6 it should return.
I use keytexttransform for extract values but its return None. I also tried jsonb_array_elements function.
How can I filter multiple id values with jsonb array
Triple
Hi, am trying to integrate my django project with firebase but am getting this error after i submit the signup form
module 'firebase_admin.auth' has no attribute 'AuthError'
ㅤ
kumar
guys can anyone help me i have one doubt can we create one get_absolute_url method and reuse for post_edit view and post_delete view its possible?
Lightbourne
Lightbourne
Spam
hi guys, I saw a lot of tutorials about how to send en email from django project using function 'send mail', when I tried it I got an error 'An error occurred: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)' .
ChatGPT and google didn't get me right way to solve that error.
how to send an mail from django without ssl ?
Alex
Habibi
I wanna deploy my django on directadmin panel, but there is an error when the web loaded, this it the message , PassangerUser dirrective is not set for the virtual host of the currect request
Habibi
How to fix it?
jobless
Guys, Iam having a problem as "importerror : attempted relative import with no known parent package" , when iam importing the logic from views.py to urls.py in VS code .
Can you help me guys?
Chandu
Charly
Doragonsureiyā
Unable to send images in this grp
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://hastebin.com, https://nekobin.com, https://dpaste.org (or your favorite one)
jobless
No need to send images when you want to share code which is text
In views.py:
From django.shortcuts import render
From django.http import HttpResponse
def home(request):
return HttpResponse("gksjd")
def demo(request):
return HttpResponse ("aksh")
In urls.py:
from django.contrib import admin
from django.urls import path
from .views import home,demo
Urlpatterns = [
path('admin/', admin.site.urls),
path("", home,name="home"),
path("", demo,name="demo"),
]
Charly
jobless
Charly
Yashveer
Hello friends we are new in this group as well as django.
Anyone can help me to which path is the best for learn django
Charly
Yashveer
Yashveer
Can we send website link in this group?
Yashveer
Charly
Alisher
I wanted to write an E-commerce store.
The number of product types is unknown. For example, clothes, smartphones, bags...
Must write for N number of product types - N number of models?
Stores like ebay and AliExpress do not write a new model for each new product.
What technology should I use to make product fields more dynamic?
Charly
Yashveer
Charly
Set-up
Ok, so as you refuse to explain: no you can't share any links.
Yashveer
Yashveer
Charly
Doragonsureiyā
Are you developer chutiye?
Your question is not related to Django.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Charly
Charly
jobless
Ok bro thanks for your patience
jobless
⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻
Where I can host django website for free 🥲
Chintu
Knight ️
Knight ️
And your project should be in python 3.10
mahdi
how send parameter to method in template?
-_-
what should I do to remove the User in auth_user? I got information about User - username and id by forlooop.counter, but I can not understand how to delete the user
Alex
Amir Y.
Hey guys can i build a custom admin panel that has so many additional functionalities other than the django admin functionalities.... if so how can i do that?
Anonymous
Anonymous
And show your db in this file
Pranav
i want to send this english_text, marathi_text to html and access div edit innertext inside that div how i can do that
J.pro.
Hi my friends i have problems in get text Arabic from Django to my front end flutter
Charly
J.pro.
Doragonsureiyā
Please help me
No one can help you until you explain your difficulties.
Charly
J.pro.
And what does instead?
Iwant appears data in Arabic but it is appears as another letter don't understand
Suryo Adhy Chandra
Suryo Adhy Chandra
Nikita
Hi everyone, anybody can me help with celery? I can't run celery not use root user. Celery I installed in system not virtualenv and I tried created user celery me sistem write log systemd wrote what "Failed at step CHDIR spawning: Permission denied"
Anonymous
Alex
https://pastebin.com/fAHVE8wi why is the sql not running it's only working for the orm only
Doragonsureiyā