Ageev
You must collect all static files in some directory ( python manage.py collectstatic) and serve with files with nginx.
vaseem cholakkan
i want to fillText a string in the shape of heart to a html canvas
ROG 💻
Do you know how the user who added the data and who modified it could be saved in the model using the django-simple-history library? Although I have it added and it generates an audit of my model, the user who entered the data or modified it does not register.
ROG 💻
In my model named Orders I have it added to the end of the definition of the fields of my model like this: history = HistoricalRecords()
Lokesh
Lokesh
Okay then fork the repo and implement by yourself
Roqeeb
I'm currently developing a webapp using Django as backend vanilla for all frontend work but when run my frontend work without backend it looks great but if I try to run it inside back end environment everything is messed up
Bandar
Anonymous
heyy
can someone help me figure out a django and s3 related code logic please
Anonymous
I am using elevenlabs api for tts. the api is sending me an audio file in return. i want to save that audio file in my s3 bucket and get back an url
stuck with the logic part
https://pastebin.run/-gwhb7pgw6m5
ashu
Lokesh
Adarsh
F
I failed 3 times to deploy my Django app on AWS, following 3 different tutorials, each time for a different reason. Any solid tutorial to recommend for that?
KingFx
try to deloy on pythonanywhere
F
Will give a look, thanks
Walter
hey guys can you tell me
how to deploy my Django web application live and use postgres sql for free.its a E-commerce website for small scale home business.
Leonardo
install your dependences and see if have psycopg2...
Leonardo
to install dependencies: python install -r requirements.txt
Leonardo
See this example: https://github.com/LBarros77/egi-api
Rishav
I'm getting this warning please help.
" You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them. "
Jimmies San
Есбол
RuntimeWarning: Pickled model instance's Django version 3.2.18 does not match the current version 4.2.5.
who faced with this
Maxim
Eternity
Eternity
It's not very good idea to change the database during the project
Saman
Hello
have you every faced this issue ? :
TypeError: Direct assignment to the forward side of a many-to-many set is prohibited. Use category.set() instead.
Jimmies San
Saman
Saman
yes, use category.set()
def update(self, instance, validated_data):
instance.title = validated_data.get('title', instance.title)
categories = validated_data.get('category', instance.category.all())
print(categories)
instance.category.set(categories)
instance.save()
return instance
i did but it gets the same error
Haya
Developing a distributed application in the Django language using microservices technology that provides school management services.
It includes three microservices:
1-Student admission service.
2-Student attendance service.
3- Registration service for one of a number of subjects (of your choice).
•You must use API Gateway.
this is my Assigment in University.I need to help me, to know what mean the microservices technology in Django and what mean the API Gateway in Django and what should make
I'll make many app for each services in same project or make many project to each services that content one app ?
Doragonsureiyā
Sk
Jimmies San
Jimmies San
and you are at university, you want to learn. so you should find out how to do it
Jimmies San
and btw people can help you with chores or tips or suggestions
Jimmies San
not making a project like that from scratch
Jimmies San
or do you pay for it?
Elilooli
hi I've started my first project in django and I can't get access to the "first project" localhost server,
I use manage. py runserver it successfully runs it and give a link but the link gives "timedout" error.
here's what I did to try and fix it but it did not:
turned off firewall and proxy
tried some different ports
changed IPv addresses
flushed DNS cashe
deleted security policy for that server in my browser
pinged the IP (it was working)
I have no idea what else to do
User
How can I use multiple databases in django? Without configuring them in settings.py
SH
Is it possible to put data from one model to separate tables in admin page?
For example, I have a class:
class Book(BaseModel):
name = CharField(max_length=255)
genre = CharField(max_length=255, null=True, choices=("classic", "modern", "poetry"))
In admin panel, for book model I want to see 3 tables for each ganre (it can be more than 3 ganre, it does not matter):
An admin panel, in Book change_list I want to see:
Classic books
=====================
id | name | ganre |
---------------------
3 |b3 | classic|
4 |b4 | classic|
10 |b10 | classic|
---------------------
Moder books
=====================
id | name | ganre |
---------------------
Poetry
=====================
id | name | ganre |
---------------------
1 |b1 | poetry |
2 |b2 | poetry |
5 |b5 | poetry |
6 |b6 | poetry |
----------------------
All tables should be on the same page in admin panel, and be active for updating.
Eternity
Is it possible to put data from one model to separate tables in admin page?
For example, I have a class:
class Book(BaseModel):
name = CharField(max_length=255)
genre = CharField(max_length=255, null=True, choices=("classic", "modern", "poetry"))
In admin panel, for book model I want to see 3 tables for each ganre (it can be more than 3 ganre, it does not matter):
An admin panel, in Book change_list I want to see:
Classic books
=====================
id | name | ganre |
---------------------
3 |b3 | classic|
4 |b4 | classic|
10 |b10 | classic|
---------------------
Moder books
=====================
id | name | ganre |
---------------------
Poetry
=====================
id | name | ganre |
---------------------
1 |b1 | poetry |
2 |b2 | poetry |
5 |b5 | poetry |
6 |b6 | poetry |
----------------------
All tables should be on the same page in admin panel, and be active for updating.
Did i understand you correctly, you want to see more than one model at the same page in admin panel, do you?
George
Hi, why i get this exception?
i write it in Installed_app, but still get error
ModuleNotFoundError: No module named 'django.contrib.registration'
Hamzat
Please I need help
I am trying to send automated welcome email after user registration but I get the below error after my page loads for a while
WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Anonymous
𝒜𝔞𝔣𝔞𝔨𝔥
Truff booking details online payment method and delete method?
⟨ Simon |
User
cj
Is that possible in any other framework?
you want to connect to a database dynamically, well you have to manually set the connection string on the driver you're using, it's not hard... but that's not how you should work... but ¯\_(ツ)_/¯
User
User
User
Apart from isolation
Gabriel
How can I use multiple databases in django? Without configuring them in settings.py
Using Database Routers is a good way.
My Django/API access database credentials from AWS Secret Manager, and the password changes every week. So i need to get these ones on The fly. I use DatabaseRouters to do this.
You can use to get which db u want too. Use the middleware to route the database based of client id.
The problem is this happens each request, so u need a good perfomance algorithm and solution to not affect the request time so much
D
Hello guys I want to change image but it didn't change how to change please help me
Junior
Hello guys, i am doing a autentication using allauth, but i need custom views, and i dont find resources, anyone can help me?
Stanislav
Junior
Yes i want change code of views
Junior
Change redirect and show message diferent
Stanislav
Change it in the lib then if it doesn’t have a base auth that you could reimplement
Junior
Its alternative, what do you use to create authentication?
Eternity
Jimmies San
so, the replication happens at cluster level, not application level
Jimmies San
but via application you can query the writer or the reader, based on the logic of that bit of the application. and of course it means you have to configure them in the settings file, like someone else already said
Jimmies San
it assumes you know if you are going to write or just read
Jimmies San
Jimmies San
however, you need to explain a bit more your specific use case because without that we can talk for years ending no where :)
Jimmies San
Jimmies San
if it didn't happen it's only because your app doesn't have a heavy load yet. be careful. i would fix this logic asap if I were you :)
Stanislav