Nerd
Okay Sina do use what Muflone shared and give as response when you are done
Muflone
But I repeat once again, make sure the issue is related to permissions. What are the webserver logs telling you?
Sina
755 for directories is not that, you're confusing that for files
ok you are saying 755 is what i have to give right? ill try it thank you for your answer
Muflone
ok you are saying 755 is what i have to give right? ill try it thank you for your answer
No, read my precious answer 755 or 750 for directories only 644 for files Giving files the permissions 777 is a SEVERE security issue
Sina
But I repeat once again, make sure the issue is related to permissions. What are the webserver logs telling you?
there is no log about it and i check network on browser i saw the location of js and css are linked to page
Nerd
Per what Muflone is saying you need to consider if it folder or files If it files, 777 is a severe security issue Am i right Muflone?
Muflone
chown -R 750 /path/to/folder chown -R 644 /path/to/folder/* right?
No, if your static files have subdirectories find -type d find -type f Treat them differently. I'll not proceed further, admins will warn you and me for this discussion unrelated to Django
Proton
@sina Is the website running, if yes, view the console and let’s see what’s there
Sina
@sina Is the website running, if yes, view the console and let’s see what’s there
The resource from “http:/ip.ip.ip.ip/static/admin/css/dark_mode.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Muflone
No permissions issue, it seems
Sina
yh I think so too, a type mismatch
its about all static files not just this
Sina
sent this error for all 100 css files and ...
Proton
Is it a 404?
Sina
Is it a 404?
No its example.com/admin
Nerd
Naa I think the expected type is an html type but generally it should be css
Sina
its defult admin panel page i didn't write these static files
Nerd
I think Proton can guide you on one on one deployment on Digital Ocean if he has the time
Proton
I think you are also following Muflone Kindly explain why its bad In that case, anyone who comes across this wouldn't go by my steps but rather yours because they understand That is why we are all here. Thanks
Nima
Hi guys I want to use latitude and longitute to add address for each user Does anyone know what I should do or know a resource to handle this issue? Thank
Nima
Use python library
From which library? Can you explain more? Thanks
vijay
vijay
No one
Hi everyone, I deployed django in cPanel. Everything is ok, but when I am trying switch language. It changes some words not all ? So what's the problem ?
No one
Ok,sorry for that
Muflone
I think you are also following Muflone Kindly explain why its bad In that case, anyone who comes across this wouldn't go by my steps but rather yours because they understand That is why we are all here. Thanks
Ok I'll explain: 777 means everyone can read, write, execute anything. You have your webserver running, working fine. 1) if the hosting is shared among multiple users, other users can scan your files, reading your data, passwords but also edit them, changing for example your tokens, receiving your PayPal transactions or whatever you may use 2) if your application allow users to upload things (photos, pdf), someone could also upload executables, php or python scripts. Your permissions are set to allow anyone to execute anything, running unwanted scripts in your webserver, where they can write or delete anything There are also other possible cases but this are the most frequent to happen If you have a problem with your door you don't want to remove the lock but to fix whatever your door has
No one
Hi everyone, I deployed django in cPanel. Everything is ok, but when I am trying switch language. It changes some words not all ? So what's the problem ?
When I run in an app in my laptop everything is going well and I make command messages --all also it's fine, but when I deployed in cPanel first I can't run the command it gave me ( Make sure you have GNU gettext tools 0.15 or newer installed ) also when I switch a language in my website It translated some words not all words in website ? I will show you a pictuer
No one
Ok
No one
But I tried to run sudo apt-get install gettext. It shows me bash sudo command not found
Anonymous
Not Found: /cdn-cgi/rum [02/Sep/2023 12:31:17] "POST /cdn-cgi/rum? HTTP/1.1" 404 3070 Not Found: /cdn-cgi/rum [02/Sep/2023 12:31:23] "POST /cdn-cgi/rum? HTTP/1.1" 404 3070 how can i fix this type of error in my django app
Anonymous
i really do not know why my task is bring this error i need hel
Anonymous
it is my images from the database that is not showing
Anonymous
thanks in anticipation
Nishant
To convert a datetime field to a string and keep the original field name, you can use the ExpressionWrapper and Cast functions to create a new alias for the field
Sarvar
do you hear about caching
Ankur Patel
hello, due to +static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) in urls.py, my login page not found error occured
Edmund
Okay
Bakhtiyor Ergashev
#question #help Hello, I am working with multiple database in DRF and When I created a new organization I have to create a database fot it and add to databases in settings as dynamically. Now I have a problem that code error is connection to server at "postgres" (172.23.0.3), port 5432 failed: FATAL: sorry, too many clients already while changing other database and I sent the database name from headers.
George B
I'm still learning Django, yesterday I tried to test hello world and it doesn't seem to show on Vs code. I've linked all the files and added everything but still nothing happens. What should I try in order to fix this?
George B
show ur code
I'll post it on Monday and give more details, thanks
aditya
django project idea
ŁÜČÎFĘŘ
hey guys please I have problem with these server http//127.0.0.1:8000 on my phone is not running
ErrorØ47
hey guys please I have problem with these server http//127.0.0.1:8000 on my phone is not running
You should use your computer's local IP address in your phone instead of 127.0.0.1
AZAMAT 々
hey guys please I have problem with these server http//127.0.0.1:8000 on my phone is not running
The code will work only on the device you run it on. If you want it to work on all devices, you need to upload the project to the server.
ŁÜČÎFĘŘ
thanks guys
Kumar Shreyansh
hey guys please I have problem with these server http//127.0.0.1:8000 on my phone is not running
Hey, i can help here but can't guarantee it'll work on mobile bcos of several reasons. Like my brother error047 said, if you can find the ip address of your computer, awesome. Bcos then you can add it to the ALLOWED_HOSTS in the settings.py file, along with 127.0.0.1 as well. And then you go to the command prompt and type: python3 manage.py runserver 0.0.0.0:8000 (I use ubuntu) And now if you go the ip address that you put in the settings.py file, via port 8000, you'll find your website running. You see, the browsers on the phone strictly filter websites which are not secured, which your website won't be if it's running on django development server, and that's why you won't be able to see it on your phone. Besides that, your website should also be responsive to mobile devices for it to appear correctly. That's how I serve my current application to the testing team in my office. But it won't work on my phone bcos I have already tried it. It says, can't connect, not secure. Hope that helps ☺️
ŁÜČÎFĘŘ
oh thanks I will work on it I think it will work
M. Hossein
To use celery with rabbitmq, is it enough if I only know what rabbitmq is and put it's url as celery message broker? Or should take a full course on rabbitmq?
Tips
How can develop microservices using Django??
A
How can develop microservices using Django??
Create project app inside django project that is microservice
vijay
How can develop microservices using Django??
For microservices, use flask instead
i
Why vijay why yar
vijay
Why vijay why yar
Django is for large scalable project
vijay
Kind of fullstack
N.Gamani
What are basic things need to become a django devloper?
N.Gamani
Kindly anyone respond
N.Gamani
What do you mean
vijay
N.Gamani
Ok
N.Gamani
I'm asking about basic requirements
Priyanshu Pratap
For a full stack in django you should know about django rest Framework as well as django channels to use it in your website if you want to create a robust and superior e commerce website or something like that...also you should know about caching and how its done (memcache or redis)...but for a low end if you are stating with django...only basic python concepts are good to go like oops,functions,arrays, strings and some libraries like math, random, os
Legend
I have installed django-crispy-forms , I included in my apps and use it in my template. But anytime I run it , it'll not work it gives an error with template does not exist