ᅠ ᅠ
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
Muflone
And then where to download the media?
https://docs.djangoproject.com/en/4.2/ref/settings/#media-root
Andrew
Hello, I need to send a notification from the admin panel to a specific user, is that possible in Django
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
I connected file static to html
But nothing happening
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
Kumar Shreyansh
Django latest version course training along with python for backend job
Ummm, django is a python framework for backend web development, not sure what you are asking
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
Fitzgerald
you can use imports
how please guy
Kumar Shreyansh
Fitzgerald
Hey, can you tell me what is the context of similar content of a model, and how it is being repeated
g the context are categories and articles, and i don't want similar categories to repeat
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")
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
Cimpah
which details pals
Maxim
which details pals
at least what do you mean by "not running" any error?
Cimpah
it is not executing the request. it is returning nothing with no error message
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.
Maxim
👋🏻 django 3.2, admin mode, system adds 3 empty fields , please help to stop this ... ( https://ibb.co/B6MWQs7 )
text on screenshot it must be in english or at least provide a text translation here
Maxim
👋🏻 django 3.2, admin mode, system adds 3 empty fields , please help to stop this ... ( https://ibb.co/B6MWQs7 )
https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.exclude
Victor
https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.exclude
nope , this is other exclude... In my case system (django ) creating this 3 empty fields every time that i open 'document'
Doragonsureiyā
nope , this is other exclude... In my case system (django ) creating this 3 empty fields every time that i open 'document'
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
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?
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
i have a problem with it, i can't upload images from my admin panels(
just state your issue with details please stop sending useless messages
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
when i try upload image form my pc it returns 403
find out what the HTTP 403 status means
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
Umidjon
Are you add crsf_token to your form?
No. Because I upload image from admin panel. Where I should put csrf i can not find bro
NINJA
Hello
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
And check you Middleware - 'django.middleware.csrf.CsrfViewMiddleware'
can i send zip file to ur directory? i need complete it tomorrow
Doragonsureiyā
can i send zip file to ur directory? i need complete it tomorrow
Can i send you a private message? No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
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
Hello everyone, please advise the fastest way to translate a django site into another language
hiring a dev to do it or coding it your self, there is no tool that will translate Django into another framework
Ilya
hiring a dev to do it or coding it your self, there is no tool that will translate Django into another framework
Oops, not another programming language, but a localization language! I'm trying django rosette, but I still can't get it to run, are there any simpler analogues, free or limited trial?
Caleb
Oops, not another programming language, but a localization language! I'm trying django rosette, but I still can't get it to run, are there any simpler analogues, free or limited trial?
oww i am not sure if there are other tools specifically for the django cms translation but check the below link https://djangopackages.org/grids/g/i18n/
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.