ᅠ ᅠ
Or just static+media (static/css and static/file)?
Muflone
nginx serves the static and the media files
move them where nginx has access to
separate discussion about media files, they shouldn't live in static or you'll end up having to run collectstatic continously
Muflone
static files: css, js, fonts, theme resources, whatever the developer used to design the website (they don't change, you collect them when you deploy the website)
media files: content uploaded from the user side after the site was deployed
ᅠ ᅠ
Andrew
Hello, I need to send a notification from the admin panel to a specific user, is that possible in Django
Kumar Shreyansh
ERS1N
Hello there, my website is not showing background , how can i fix that ?
ERS1N
I connected file static to html
Muflone
here we go again
ERS1N
Muflone
use the search feature, man
in a nutshell: static files are not managed from django, nor python. you have to make them be served from another web server.
#static
Ammar
hey every one
i heve purchase and purchase item models where purchase can have multiable items
I want to get purchase data togather with total price which is ( item price * quantity from the items relation ) for all Purchase
what I am doing now is
purchases = Purchase.objects.annotate(
total_price = Sum(F("items__price") * F("items__quantity"))
)
which get the total price for each purchase along with his data
so i need to calculate the sum of total price in python side using a for loop to sum all the (total_price) in final_price
is there is a better apporch ?
bb4117
Django latest version course training along with python for backend job
Ali
Hi guys 
I am use django 
When i login to my account on mobile i give  error csrf token  403
But only on mobile device and not problem on desktop
After show error 403 i comeback my index page and refresh website i see to login it
Fitzgerald
hello every one please how to avoid repetition of similar content of a model in a template . can i manage that with django's template tag , if yes how
Muflone
Artyom
Fitzgerald
Kumar Shreyansh
Fitzgerald
Fitzgerald
https://dpaste.org/9OcBN
Fitzgerald
i think it may be in order now
Nat
Hi everyone,
I'm using import_export on django and I've a field called idetifier with a Custome Regex widget. the value is validated from the regex pattern obtained from kwargs of the clean method in the Widget. is there any way to pass this regex to the clean method as kwargs
Nat
from the resource like TestResource(dataset, regex=r"ID\d{3}\Z")
×͜×X̷Z̷X̷⸙ꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋ ︎ ︎ ︎ ︎ ︎ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ
ManDo
Hi community, I have a problem when I use response.json()
the error is: 'ascii' codec can't encode character '\u1ed1' in position 466
(‘\u1ed1' = ‘ố’ in Vietnamese)
Any idea?
Anonymous
Hi,I want to render single form in multiple steps for single model and store data in data base. Django-Formtools not working
Ammar
hey i am using django q to run background task
if i want to fail the task if something happen how can i do that ( like a condition to fail the task and fire it again )
Cimpah
hi guys. I have installed python on my laptop. now I have run "pip install virtualenv" but its not running
Doragonsureiyā
Cimpah
which details pals
Cimpah
it is not executing the request. it is returning nothing with no error message
Maxim
Victor
👋🏻 django 3.2, admin mode, system adds 3 empty fields , please help to stop this ... ( https://ibb.co/B6MWQs7 )
Sheharyar
Hi, I have some personal projects that I want to deploy for free. Can someone plz recommend me free services where I can deploy.
Doragonsureiyā
Maxim
Victor
Maxim
Victor
Dark
Does anyone know about dask? I want to insert an csv file in dask in batches.
So my question is how to determine like dask.dataframe wrok to use or dasks futures?
Anonymous
Hi, I have a problem with Django forms and I can't send the pictures of my codes in this group. Can anyone help me in PV?
cj
Umidjon
i have a question can u help me?
Umidjon
who did use django tinymce?
Umidjon
i have a problem with it, i can't upload images from my admin panels(
Maxim
Umidjon
i did integration with tinymce but i can't upload image my local pc
Umidjon
that is problem
Umidjon
when i try upload image form my pc it returns 403
Maxim
Umidjon
Forbidden (CSRF token missing.): /admin/app/post/add/upload_image
[26/Jul/2023 15:26:59] "POST /admin/app/post/add/upload_image HTTP/1.1" 403 2506
Umidjon
it's log
Дмитро
NINJA
Hello
Дмитро
Umidjon
Umidjon
i can not send screenshot
Дмитро
Just copy and send code, don't photo
Дмитро
Okay, are you sure that you don't use the html form to upload images? I know you're use admin panel, but I'll ask just in case
Дмитро
And check you Middleware - 'django.middleware.csrf.CsrfViewMiddleware'
Umidjon
Umidjon
Umidjon
Zakir
MultiValueDictKeyError at /
'password'
Request Method: POST
Request URL: http://127.0.0.1:8000/
Django Version: 4.2.3
Exception Type: MultiValueDictKeyError
Exception Value:
'password'
_
Raised during: website.views.home
Python Version: 3.11.3
Zakir
i'm getting this error
Ilya
Hello everyone, please advise the fastest way to translate a django site into another language
Caleb
Azizbek Xushnazarov
Hi everyone
Can someone give some recommendations about this:
https://stackoverflow.com/questions/76774536/handling-blocking-external-api-calls-in-django
Adam
Hello, please advise. What would be better to use for JWT authorization at DRF? Flexibility is not worth looking at I think, everything will be on the same domain for the first time. I am primarily interested in security.
1. Access and Refresh tokens are stored in HttpOnly cookie and Access token is passed to Header under Authorization
2. Access and Refresh are stored in HttpOnly cookie and I will expect additional X-CSRFToken in each request (csrf tokens are disabled by default in DRF). The access token will not be passed anywhere at all, I will read it on the server directly from the cookie.
Mirco