𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
𝑀𝓇. 𝐿𝑒𝓋𝒾𝒶𝓉𝒽𝒶𝓃
Use sp takes us a lot of time
t
hello i want to deploy my app to cloud with docker and i use this repo https://github.com/LondonAppDeveloper/django-docker-deployment-with-https-using-letsencrypt but i get errors so much errors any tutorial to containerize django app with redis celery postgresql certbot ?
aditya
1. Consider a situation where you need to migrate your database from MySQL to Postgresql , but at the same time live data for your site from users keep on coming, without downtime how would you migrate? 2. In production, migrations folder is deleted (database is still alive) so, if you want to change the table schema then how did you do that ? (Because current changes depends on previous migration)
Priyanshu Pratap
I am assigned with a project and there are multiple endpoints like to register user there is endpoint to fetch the data of user there is also endpoint and it is said to secure the endpoints using token authentication...how can i do with it JWT ( I am new to this topic )like if i create a token which is generated at the time of register how can i use it in all the other views where authentication is required. Like to fetch the token from different view and send it into header
Charly
aditya
And what did you answered?
1. Kitchen sync can help us to do this. Once our system completely gets sync we can migrate our database from MySQL to pgl But he was not happy with this answer.
cj
That's an interview question
then this is the wrong group to look up for cheating on interviews
Doragonsureiyā
Thanks for such great advice bot
You're welcome! 😊
kaka
Hello everyone. I'm new here. And I'm new to Django as well. But a teacher gave us a project to design a management system using Django without even teach us the basics. Please can anybody help me. The project is due in 2 weeks 🙏
Doragonsureiyā
Pius
Can someone pls recommend a book or YouTube channel that properly explains how to use JWT with DRF
Carlos Alberto
Can someone pls recommend a book or YouTube channel that properly explains how to use JWT with DRF
https://www.django-rest-framework.org/api-guide/authentication/#json-web-token-authentication
Hari
How to do form validation in django
Doragonsureiyā
How to do form validation in django
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box write down the same words you asked here Step 4: Read the firsts results
Taha
Hi guys I have a question from you I want visitor to enter a file in one file field in the site with file input and I want to get it and put it in admin panel for admin to submit and accept it How can I do that?
KENNEDY
Just Add Python to path
Temur
Le_chy
Hello need help on the mpesa integration
Doragonsureiyā
Hello need help on the mpesa integration
No one can help you until you explain your difficulties.
Lords
Hi team , any one have idea how to integrate interpreter like w3 schools if we want to run query we need to run it and needs to show result how to do it through python
mea
https://pyscript.net
This is an abomination
Maria
Hi team.. I am facing an issue. I am having a django app that works in local env But it works wrong in prod. But the data in models and code in both environments is same. Has anyone faced a similar issue?
Doragonsureiyā
Hi team.. I am facing an issue. I am having a django app that works in local env But it works wrong in prod. But the data in models and code in both environments is same. Has anyone faced a similar issue?
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.
Cc
Hi, Has anyone used the Pandas to_sql function doing unit testing? It happens that when I run the unit tests, the data is tried to be inserted into the dev environment database and not into the Django test database. Has anyone had this problem?
Cc
Thanks for answering. This is exactly what I do, I mock the connection, when I insert data into the database through the django ORM it works, the data generated by the tests is deleted when they finish but when I use the pandas to_sql function it uses the dev database :(
Cc
Yes I understand, the question is because I am working with files with millions of lines of information and since we have the BE and FE separated, I wanted to try with large files on the BE side. And given that when I insert data normally in the unit tests they are deleted at the end, the question arose as to why the same thing does not happen when I use df.to_sql. Anyway, thank you very much for your help.
cj
that's why you'd better mock DB connections
Marco dev
good morning! When running python3 manage.py test I get the error: return self.cursor.execute(sql) django.db.utils.ProgrammingError: relation "eventos_produtora" does not exist but makemigration, migrate and runserver work normally.
Marco dev
Want you create an app?
is already created
Shohruh
Hello There was a post model, I migrated it to the database then I added new fields to the post, and if I migrate to the database by doing makemigrations, a new column is not added to the table Can you tell me the solution?
$@£d@®
Save your changes in models.py then do python manage.py makemigrations then migrate
Shohruh
Save your changes in models.py then do python manage.py makemigrations then migrate
👇 i did it but the new column is not being added to the table in the database
$@£d@®
When you run makemigrations you seen your changes in terminal
салли
Guys could anyone help me with sending push notifications to iOS app without using any third party libs?
Charly
салли
Without using libs will it be a lot of work, why you require that?
I mean without libs which are wrote especially for notifications, it’s will be ok to use requests or httpx
ruthless
Hello, I can't send mail My error: SMTPAuthenticationError at /profile/ (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a780a6bcccasm269907966b.12 - gsmtp') My code: msg = EmailMessage('Request Callback',                        'Here is the message.', to=['ruthlessfront@gmail.com']) msg.send()
$@£d@®
Use email host user and email host password in settings.Py
The Inspired
Use email host user and email host password in settings.Py
also, make sure you have actually configured gmail to allow django to use it to send mail.
ruthless
In my settings.py Is that correct? DEFAULT_FROM_EMAIL = 'ruthlessfront@gmail.com' SERVER_EMAIL = 'ruthlessfront@gmail.com' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'ruthlessfront@gmail.com' EMAIL_HOST_PASSWORD = 'password'
ruthless
Admin
hello,how to do horizontal scrollbar for each row move in admin site list display?
Chrvieldarara
How can i login to smtp?
from django.core.mail import send_mail send_mail( "Subject here", "Here is the message.", "from@example.com", ["to@example.com"], fail_silently=False, )
$@£d@®
And also paste that password in email host password
ruthless
Create your email host password from Google account setting and search app password then create your password
https://stackoverflow.com/questions/76443121/there-is-no-way-to-use-app-password-on-gmail-account-trough-django-app
ruthless
Try this it's a easy method to create password
In my google account settings app passwords is not available
Maria
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.
I'm writing to excel files using pandas there are like 20 excel files with 2 sheets each. I'm doing my transformation on data in excel sheet like each column is merged to another df to simulate a vlookup . It works correctly using my dev model data . But in production the excel sheets are being written partially. The model data and code in dev and prod is the same. Can it be due to memory issues as prod has limited memory than dev ? Can please advice.. has anyone faced similar
$@£d@®
If you are use pc right now go to crome and go to manage your Google account and search app password
$@£d@®
And create
Daice
Plz I need help with this [no attribute 'get' ] how do I fix this error in my django plz I need ur help
Daice
Impossible to know as you haven't provided any detail
Can I dm I can be able to send u a picture of it
Charly
Can I dm I can be able to send u a picture of it
No, help is provided here. And there is no need to use an image when code and errors are text.
Doragonsureiyā
Can I dm I can be able to send u a picture of it
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev
Vasily
Any way to make migrations not for model but for db rows? Idea is to create migration for django-cms current content state.
Vasily
yes, it is called data migration
I mean any tool for automatically make that type of migrations.
Charly
I mean any tool for automatically make that type of migrations.
No, you need to code it as if it was a schema migration