Nitin
How can I set the sessionID path. I am using authenticater() and auth_login() for login. But default it sets the path /.
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
Believe
When user click the button, can download this txt file
https://djangoadventures.com/how-to-create-file-download-links-in-django/
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
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'
if you don't know where to import AuthError from, just handle all exceptions except Exception as error: print(type(error)) that's gonna show the source module of that exception
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 ?
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?
jobless
Check in models.py
And... What should I do?
jobless
show what you have done
Unable to send images in this grp
Charly
Unable to send images in this grp
No need to send images when you want to share code which is text
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"), ]
jobless
remove the . from views and try again
No module named 'views'
Charly
No module named 'views'
from yourappname.views......
jobless
from yourappname.views......
And iam getting the o/p at webserver for only home path and not getting output for demo path
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
Doragonsureiyā
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
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Yashveer
Can we send website link in this group?
Charly
Can we send website link in this group?
Why do you want to send a link if you were asking for it?
jobless
because you need to add a oath
I already add a path... You can see it in above code I have sent you
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
Set-up
Be explicit
Yashveer
Charly
Set-up
Ok, so as you refuse to explain: no you can't share any links.
jobless
yes but you can't use the same
Can you edit my code to show me how to do it please
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
Can you edit my code to show me how to do it please
No, just the forst argument for the path() function needs to be the url, and you can't use the same for two views
jobless
No, just the forst argument for the path() function needs to be the url, and you can't use the same for two views
Yeah now I have set one path for one url and iam again getting the error as "ImportError: attempted relative import with no known parent package"
Charly
Yeah now I have set one path for one url and iam again getting the error as "ImportError: attempted relative import with no known parent package"
path("", home,name="home") instead of that do something like: path("/home", home,name="home")
jobless
Ok bro thanks for your patience
jobless
No dude, I already gave you the solution for that
It's working now bro thank you so much
⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻
Where I can host django website for free 🥲
Knight ️
www.pythonanywhere.com
It has a time limit
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
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
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
Doragonsureiyā
Please help me
No one can help you until you explain your difficulties.
J.pro.
No one can help you until you explain your difficulties.
When I bring the data from the back end dgano to the fultter screen, the data do not appears in Arabic
J.pro.
And what does instead?
Iwant appears data in Arabic but it is appears as another letter don't understand
Suryo Adhy Chandra
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
Hello... u can import User from django.auth.models then u can specify the filter entity via username etc than delete it
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"
Alex
https://pastebin.com/fAHVE8wi why is the sql not running it's only working for the orm only