Jimmies San
No need to restart Django for it.
Jimmies San
Restarting the service should loss many visitor.
Depends from your setup. But i assume that if you have just one single server without LB for your service it means that you have not so many users. And btw it takes very little time to restart a service. And you can reload a service without restarting it, will be quicker and more reliable
Erik
Erik
My web is a bit large scale and it works on tens of syncronized server.
My web is based on Django, Gunicorn and Ngnix.
Erik
Jimmies San
is it on AWS? how do you deploy the service on the fleet?
Erik
It is on AWS
Erik
Please go on.
Erik
And Thank you again.
Jimmies San
how do you deploy your app?
Jimmies San
how do you update the application to all these servers?
Jimmies San
that process should have a step/job to actually replace the code when you make a change, and at that point it should trigger a restart or replace of the servers. that should be enough
Erik
I'm using Docker ECR.
Jimmies San
ECR is an aws service to store container images. it's just a part of your workflow.
I am seeking a detailed explanation of the processes that take place between the developers merging a pull request and the code being served to the customers. Understanding the steps in between is crucial for me to provide assistance effectively.
.bit
Only for changes in backend you need to restart mostly
Jimmies San
Only for changes in backend you need to restart mostly
if they have tens of servers to serve the app, it means that there is a LB in front of them: and it should mean that a deployment strategy in place [like blue/green or kind of] should already take care of replacing or upgrading the instances with zero downtime
Jimmies San
i am trying to understand its setup, because "jump into the server and systemd reload nginx" doesn't feel the right answer in this case
.bit
Yeah would like to know more about the setup
Rose
User Mohammed has 1/3 warnings; be careful!
Reason:
useless messages flood (rule #3)
Mohammad Hossein
Hey guys, i started reading the first page of django docs and i think it's cool. Do you think are the docs good for learning django or you prefer a course or something?
Rose
User Dj - 505 has 1/3 warnings; be careful!
Reason:
totally offtopic
Dj - 505
Maxim
🌺🌸🌎🌑🌌
I want an add to cart application in Django
🌺🌸🌎🌑🌌
But is not work with me
Maxim
Rose
But is not work with me
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.
🌺🌸🌎🌑🌌
Why I can not sent photo here
🌺🌸🌎🌑🌌
No reversedmarh at
🌺🌸🌎🌑🌌
Ok
Rose
User Никита has 1/3 warnings; be careful!
Reason:
rule #10 violation
Дел
Hello
Might anyone explain how to create an url which users are able to download files from the server?
I'm really confused. Made hundreds of searches but still cannot understand how web server and sftp and all these stuff work together to download a file from the server.
Please give me a hand.
Anonymous
Y
Y
Rose
User Popcorn has 1/3 warnings; be careful!
Reason:
useless emoji (rule #3)
Y
https://backendengineer.io/django-rest-framework-file-upload-api/
Once you have the file upload model you can register it to the admin interface and upload files to your server through it
Once you have set up the API, you can retrieve the uploaded files full paths from it, then you can build a frontend to make them downloadable.
Emmanuel
ali
I'm looking for a way to control media files in production, I read in django documentation, which django doesn't support media files in production, but we can use it in development. So, if someone knows how can I config media files in production on the host server, I'll be happy.
Muflone
ali
Muflone
What?
click on it and see the previous linked messages
ali
Muflone
ali
Vincent
Hello, I need help with users in multiple companies. Do I need to take id from front-end (probably using middlewares in Django to save current ids in session) in order to secure my routes or there is a better way to handle this?
Mirco
_untold_._mystery_
I need complete study material for django
Rose
I need complete study material for django
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/)
* Tutorial from MDN (https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django)
* Tutorial from django-girls (https://tutorial.djangogirls.org/en/)
Rose
User อดิศร has 1/3 warnings; be careful!
Reason:
useless messages (rule #3)
Rishav
I made a field for last updated time , but it shows UTC time, I want to convert it into IST. How to do it help?
bansh
Hooman
Hello
How can I order my tables in admin.py
Hooman
I like to order in ui?
Don
please for help how can i send email using django with html template?
Don
anytime i have an error saying authentification failed
Behnam
which one of linkedin django group is best?
Sagar
Don
Sagar
Yes
They might not be correct
Sagar
Can you provide the code which you are using?
Sagar
I may help you
Don
I may help you
here is my setting.py "DEBUG = True
EMAIL_HOST ='smtp.gmail.com'
EMAIL_HOST_USER = 'emakotech@gmail.com'
EMAIL_HOST_PASSWORD ='mypassword'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
Don
here my function to send email "def sendmails( email, name):
my_subject = "Email du ForumItEcole"
my_recepient = [email]
html_message = render_to_string("email.html", context={"name": name})
plain_message = strip_tags(html_message)
message = EmailMultiAlternatives(
subject=my_subject,
body=plain_message,
from_email=settings.EMAIL_HOST_USER,
to=my_recepient
)
message.attach_alternative(html_message, "text/html")
message.send()"
Sagar
What is the error?
Sagar
Instead of EmailBackend can you use ConsoleBackend
Sagar
If you are able to see email in the terminal
Sagar
Then the issue is with your SMTP details
Sagar
- Go to your Google Account -> Security -> App passwords.
- Under "Select app," choose "Mail" and "Select device," choose "Other (Custom name)" to specify your Django app.
- Click "Generate" and use the generated password in your EMAIL_HOST_PASSWORD setting.
Also have you followed these steps?
As you are using gmail