Alex
Yes. I didn't use docker.
then systemd is your choice.
D
then systemd is your choice.
Also I visited StackOverflow and found this answer I had this same problem and to get it to work I had to set the DJANGO_SETTINGS_MODULE environment variable to be the path to my settings.py file export DJANGO_SETTINGS_MODULE=project_name.settings How to implement it with code?
Alex
Locally everything worked without it, but thanks, I'll try
and by the way - you should wrap your gunicorn service in a systemd unit as well https://docs.gunicorn.org/en/stable/deploy.html#systemd
Macdonald
I need help. I forked a Django web app. I am running local server and the static is loading. But as soon as I edit one line of code, and save the file. It doesn't load the static files. What's the possible solution to such a problem ?
AmirHossein
hi $: ls mysite asgi.py __init__.py __pycache__ settings.py urls.py wsgi.py $: export DJANGO_SETTINGS_MODULE=mysite.settings $: django-admin runserver - no module named mysite why can't I specify the settings module which I want to use?!
Cacio Lucas
I'm having some trouble trying to anotate a new field in my queryset, everytme a try to annotate a sum of a subfield from a m2m relationship it messes with my previous annotation, can someone help me?
YUSUF CR
Can we make PWA with Django? Or is it completely another technology?
.
django spa using Unpoly js https://github.com/alnuaimi94/realworld
Macdonald
Use collectstatic bro
Thanks Bro let me try that tomorrow morning
Богдан
User.objects.filter(answers__question__theme__id=1) Tell me please, this request will display all the answers of users to questions on theme #1. How to make it so that it displays only those users who had more than 34 answers on the first theme? How to write a request in this case? https://pastebin.com/mwE67cdG
Anonymous
Hi guys I need help
Anonymous
Please help me
Jitendra Kumar
What's your problem?
Doragonsureiyā
Hi guys I need help
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
Anonymous
I'm using django server with runssl command to use it with https but after sometime the server is not responding to any requests please help
Vxvek
Guys when I make my website debug=false.. my static files is not coming I'm using cpanel
Vxvek
My code :STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static") ] STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
EDEN
Hey! Anyone know how to do Mobile - OTP VERIFICATION in django?
fn
Hi all! If anybody knows how to do it, please share, help is appreciated! https://stackoverflow.com/questions/71076149/how-to-count-foreign-key-objects-with-annotation-in-django
Monde
hey guys I am working on data analytics dashboard and I am using the dash framework to display my graph but I am having a hard time trying to connect the framwork to my already existing postgresql data base i have seen chart.js but I like dash better because of the built in component and asthetics, my question is, is there an easy way to connect a plotly-dash app to a django database and have it display data on a peruser basis ?
shiva
How to validate multiple objects using django serializers?
IDK
with creating serializer using serializers.Serializer
Vinit
How to fix error No module name Django.core.asgi
not_found
How to fix error No module name Django.core.asgi
CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [("redis-server-name", 6379)], }, }, }
not_found
Add the channel layer to asgi.py file: from channels.layers import get_channel_layer channel_layer = get_channel_layer()
Ali
Hello It's a manager in django models class ArticleManager(models.Manager): def pubandslug(self, slug): return self.filter(pub=True, slug=slug) Is it true?
Ali
I want have a method instead this: ArticleObj.objects.get(pub=True, slug=slug)
Mirco
I want have a method instead this: ArticleObj.objects.get(pub=True, slug=slug)
So think about a custom queryset instead of a manager
Ali
So think about a custom queryset instead of a manager
What's different of them? I'm learning django and just wanted to write a manager to learn more about managers
Mirco
What's different of them? I'm learning django and just wanted to write a manager to learn more about managers
they can look similar but custom manager cannot be chainable instead custom querysets can be so if you think you wanna add more filter to the queryset that pub_and_slug returns use a custom querysets
Doragonsureiyā
Ok Thanks🙏🌹
You're welcome! 😊
Mohammad
I want to change _id to id Is there a way?
Mohd Zaid
is sendgrid on heroku free or it charges money ??
Mirco
is sendgrid on heroku free or it charges money ??
I don't think it'll be free , for sure it has a free tier or quota limit
Mirco
can you provide me the limit for free tier
google it, you can find everything about it
Imtiaz
anyone here know about hadoop spark??
Doragonsureiyā
anyone here know about hadoop spark??
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
₩1|$0|\|
Hello.Hello. Help as a recaptcha implement
....
https://stackoverflow.com/questions/71079018/serialize-models-method-with-parameter-in-django-rest-api-error-object-of-type . can anyone answer this question ?
Mohd Zaid
I am getting this error
Mohd Zaid
Please help me outn
Mohd Zaid
gaierror at /create_user/LNrKYV7Q/ [Errno -2] Name or service not known while sending an email in production heroku but it works fine in local
Anonymous
Sorry
Anonymous
Greetings. I have a project uploaded on heroku and when uploading the image everything goes well and can be viewed for a period of time. Once that time has passed, the image seems to be relocated or that is my impression due to the error that is generated. Ask 1. Heroku internally changes static file paths in a django project 2. What would be the default path for heroku to work with static files in a django project.
Mohammad
where ? give more context
Yeah, I use Djongo as Database and there is no id in Mongodb and I have to set _id
david
Hi all What is the best version of Linux that runs at a lower Possibilities?
Mirco
Yeah, I use Djongo as Database and there is no id in Mongodb and I have to set _id
You get hurt yourself with your hands Django does not work well with Mongo DB
Mirco
What should I use after that?
Postgres to unlock Django superpowers
Sunken
What should I use after that?
Node js is fine if you need to use mongo DB :)
Doragonsureiyā
Hi all What is the best version of Linux that runs at a lower Possibilities?
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Mirco
My data is json
Postgres can work well with JSONs 😊
Mirco
Node js is fine if you need to use mongo DB :)
Nah, FastAPI works fine with Mongo afaik https://www.mongodb.com/developer/quickstart/python-quickstart-fastapi/ Also their doc has a tutorial about it
Mohammad
Mirco
My data is json
If you really need to work with Mongo, use FastAPI instead of Django
Mirco
No fastapi is good for Mongodb
Yeah, use that if you need to work with Mongo
Mirco
I don't know Fastapi
Good chance to learn it then 😊 It's easy
Doragonsureiyā
Ok thanks
You're welcome! 😊
Sunken
I have problem with admin login. I get the "please enter the correct username and password" error. How can I solve it?