Jack
STATIC_URL = '/static/' STATICFILES_DIRS = [ str(BASE_DIR / 'mystaticfiles'), ] i want it to go into folder /mystaticfiles automatically
Rohan
It literally says / operator won’t work on 2 strings
Rohan
BASE_DIR + ‘/mystaticfiles’
Jack
ok thanks let me try
Rohan
.
Ok
Rajesh
Ok
Php concatenation operator
Rajesh
No
🙏
NoOne
Is there any way to retrieve sessionid in views and save to other model So that it can be used to retrieve data
Brandon
Hello everyone could someone recommend a good tutorial for deeployment of Django to amazon web services?
Marcos
Is there any way to retrieve sessionid in views and save to other model So that it can be used to retrieve data
https://docs.djangoproject.com/en/3.2/topics/http/sessions/#using-sessions-in-views
Rabbits
Use F
Thank you.
Doragonsureiyā
Thank you.
You're welcome! 😊
Sai
Google
Jack
any solution for this? ImportError: cannot import name 'login' from 'django.contrib.auth.views'
Anonymous
how to do like button in django
Anonymous
good for you
GOPINATH
Hi forks can anyone help me out in creating django rest framework with token authentication
GOPINATH
I have set up my api only the authentication part is remaining
Li
@the_real_g1 which auth problem?
Li
@the_real_g1 which auth problem?
ask here so anyone who knows and have time will answer instead of pm me for I won't have time and know the answer ecactly.
Jack
When you go into webpage/api there is restricted access but if you go into the frontend api like webpage/frontend you can edit and request are sent i dont want people can go website/frontend if they dont login
Zvs
Hello guys, the question is: How can I pass arguments to the beat_shudle selery that appear only after the view?
pat
Can't import models from tasks.py in celery worker.. Everything is installed in the same venv.. Any idea?
Axror
Hi everyone. I have a problem. pls help. I deployed django app to server with gunicorn and nginx. Then my static folder files don't load in templates. How can I fix it.
Axror
STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static') ] STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
Axror
it is my settings.py file
Doragonsureiyā
Hi everyone. I have a problem. pls help. I deployed django app to server with gunicorn and nginx. Then my static folder files don't load in templates. How can I fix it.
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Axror
yeap
Li
in production, you need to run python manage.py collectstatic
this will copy all required static files, (eg: custom/admin/restframework/)
Peaches
In debug mode you can do python manage.py runserver —insecure
Axror
debug=False
I have nothing changed
Li
When you go into webpage/api there is restricted access but if you go into the frontend api like webpage/frontend you can edit and request are sent i dont want people can go website/frontend if they dont login
For django views (with template), you can use LoginRequiredMixin https://docs.djangoproject.com/en/3.2/topics/auth/default/#the-loginrequired-mixin For rest framework you'll have to use IsAuthenticated permission class https://www.django-rest-framework.org/api-guide/permissions/#isauthenticated
Anushka
someone suggest staic files error in django
Anushka
?
mat
Wdy
Anushka
Anyone suggest me
Doragonsureiyā
Anyone suggest me
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
Doragonsureiyā
someone suggest staic files error in django
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
E
wanna ask how to join 2 apps on 1 projects for example 1 project have auth and crud apps thanks
Jack
wanna ask how to join 2 apps on 1 projects for example 1 project have auth and crud apps thanks
Just join the /paths at the main project redirecting to the 2 apps
Poojitha
even i am choosing the file, and clicking on add it is showing that no file chosen. Can anyone tell me what might be the reason? django
BurN
Does anyone know why this request hasn't been merged yet? I have the same issue https://github.com/jazzband/django-auditlog/pull/273 or is there a way to override the package model?
Daşqın
Hello
Mirco
Hello
!hello
Doragonsureiyā
Hello
Please move your "Hello" and other social talk to @PythonOfftopic.
Daşqın
how can i make guest user like "guest user of zoom " in Django?
Daşqın
Any idea?
Elii
Hey guys In some apps, when we want to register we have to enter email or phone Now, I want to something like this, What should I do? PS: I write a custom user model that inherited from AbstractBaseUser and do I define phone and email field?
N
Hi guys! I am creating a telegram bot admin panel for polling users. I have a Question model that contains questions and one-to-many Choices model containing possible choices. I also have Profile model which contains telegram user id. The problem is that i can't realize how to properly store user's answers, so that i can then filter them in django admin by their answers. I tried to create Reply model for storing question and user's answer and created admin-inline. It worked and looks quite normal, but i can't sort users by their answers (for example by their city). Is there any way to do that?
✙Yaroslav
How to use multipleChoice in serializer with model?
Ononiwu Maureen
Pleasw who has experience with swagger
Ononiwu Maureen
See how it renders
Ononiwu Maureen
https://ayalo-auth-api.herokuapp.com/swagger
Ononiwu Maureen
I can't type any thing
Shreehari
Hi, i have website where i am using allauth to login with google auth. I want to make use of github oauth to gather public data from the user's github account. Here they have to authorize but not login/signup. Is there any way i can achieve it without creating/login the user again? I just want to link user's github account with their existing user account on our website even if github email is different than the registered email on our website.
Aidanek
Error: failed to push some refs to 'https://git.heroku.com/damp-brushlands-57714.git' Any ideas what might be causing the error?
Michael
Hi I keep getting this errors when trying to receive response from an API 👇 NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001DB11CF4FD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) Any ideas?
Michael
The URL is wrong
I checked and the URL is correct HTTPSConnectionPool(host='api.paystack.cotransaction', port=443): Max retries exceeded with url: /verifyEhCIeThO6nDGqNB_VuyLxRtSTt0FqyI_S0CEusneBylBTfC-eMmsyC49rna_pcEAcrY (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001DB11CF4FD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
...
hi everyone I am in a company and I want to deploy my django project on the company server I need help thank you
âshîsh
hi everyone I am in a company and I want to deploy my django project on the company server I need help thank you
Your company needs to enable the python deployment environment on their hosting website. If they don't have then ask them to purchase. Then only you can deploy your Django project there.
âshîsh
in fact it is local server and everything happens locally
Local server is different and deployment your project on cloud server is different. Local server only give access to your local IP.
âshîsh
If it's happening locally everything then just run it as usual. You just need to do in your settings.py- ALLOWED_HOSTS=[*] and runserver- python manage.py runserver _your_ip:port