Alejandro
Hi everyone, hope you don't mind I ask a django related question.. I have multiple databases in my django project and have them setup with DB routers.. I just noticed that for migrating all my databases I need to do: python manage.py migrate --database=my_db1 python manage.py migrate --database=my_db2 ... I find it quite annoying that I have to specify every database manually, is there any way to migrate all the databases in the project at once? Thanks!
Alejandro
Do a script with all comands
Well, ofc but that would be the last option..
Maks
Please need help I reinstalling python and a project on Django which was working before now does not work and show many errors despite on that I installed venv again and all dependencies. What is the problem?
Charly
Index out of range
you need to be way more specific, share code and full errors
cj
Index out of range
that says absolutely nothing
Doragonsureiyā
How I may share code here ?
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Maks
Thank you
Rudraksh
I have saved some records with auto_now_add true. But when i have displayed the time it shows incorect time
Rudraksh
I know it is because UTC timezone but how to display in local timezone in template
h
tell me the solution of OperationalError at admin/..../..... no such column:...
h
Probably run migrations
can we talk in ib?
h
Probably run migrations
i already try this but nothing happened
Charly
h
ok ❤️
Vikas
Password rest email is not received in my production
Vikas
Received in local
Doragonsureiyā
Password rest email is not received in my production
What is this word salad supposed to mean?
Mukhil
how can send form data to views without refresh page
Vikas
Email received in my local
Vikas
But not in production
Charly
But not in production
What do logs say?
Mukhil
this is my new project so i need to add note without refresh
Mukhil
django include template is possible ?
Vikas
How i resolve
Vikas
??
Charly
django include template is possible ?
why do you ignore what I told you?
Charly
How i resolve
Impossible to say without any more details
Mukhil
ok
Mukhil
i will test with ajax .....thanks
Vikas
Amazon s3 buket issue in my email
Madhu
I unable to connect django Google login auth with my database to filter and display in the frontend. Anyone help
Charly
yes
No templates as ususal don't work for dynamic applications that require load data without refreshing the page
Charly
Amazon s3 buket issue in my email
s3 has nothing to do with email
Vikas
What will o do
Vikas
Please resolve any ans
Maxim
What will o do
stop flooding
Charly
Please resolve any ans
No as you haven't provided any useful information to help you, only random things
ram
anyone help me facing issue while connecting mongodb with django
Doragonsureiyā
anyone help me facing issue while connecting mongodb with django
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
Charly
Anyone
Impossible to help without any detail
Rahat
Hello
Rahat
Please help me encryption implement in drf
Aslan
Hello, is there a type in models for lists?
Alejandro
If not another option I thought is to create my own manage.py command to migrate all the databases
Aravind
Guys
Aravind
Iam a beginner
Aravind
I working on crud operation
Aravind
In that I can't do update function
Aravind
When i enter the details to update it's not saving
Aravind
And also not redirecting to home page
Aravind
What are the codes needed for your references?
ram
anyone help me facing issue while connecting mongodb with django
I have created the cluster in mongoatlas and trying to connect to django client = MongoClient(f"mongodb://{(urllib.parse.quote(MONGOUSER))}:{urllib.parse.quote(MONGOPASS)}@ipaddress" f":27017/?authSource=admin&readPreference=primary&ssl=false") Getting the error, authentication failed
Alejandro
Hi everyone, hope you don't mind I ask a django related question.. I have multiple databases in my django project and have them setup with DB routers.. I just noticed that for migrating all my databases I need to do: python manage.py migrate --database=my_db1 python manage.py migrate --database=my_db2 ... I find it quite annoying that I have to specify every database manually, is there any way to migrate all the databases in the project at once? Thanks!
I solved this by creating my own manage.py command: # migrate_all.py from django.core.management.base import BaseCommand, CommandError from django.core import management from django import db class Command(BaseCommand): help = 'Migrates all databases' def handle(self, *args, **options): for database_name in db.connections.databases.keys(): management.call_command('migrate', f'--database={database_name}') then I can do python manage.py migrate_all
Alejandro
way better than having a script lying around with the hardcoded database names.. if I ever need to add a new db I don't need to change anything
Alejandro
And the only
was not the only option as you can see ;)
Pavan
I am able to perform Bulk Edit on my table of records… I want to save the edited log like what is changed, who has changed and time in the history… Audit log is being used and the model class is registered for AuditLog in models.py But still I do not see records updated in auditlog table when I perform bulk edit. Can someone help me with the solution?
Technical
How do you evaluate it's spam
Technical
When I have clicked on read the rule button it shows username not found
...
Points : Current _ Target___
...
Adding in this model py in django
...
Anyone know how to code this
𝚅𝚊𝚖𝚙𝚒𝚛𝚎
Hi bodies Does anyone know how to override Django's default translation files, because when I want to customize the word site, for example, Django puts its own default translation.