Naggafin
[with permission from meta group] if anyone is dissatisfied with django's stock form customization and also isn't a fan of crispyforms, I made a package that gives forms a very familiar Meta interface for customization. check it out anyone who is interested: https://github.com/Naggafin/django-extensible-forms also, I was running into an issue with keeping my URL endpoints current inside of my frontend JavaScript code (always a difficult thing to do with a decoupled codebase), and so I made a solution which allows you to reverse URLs from within JavaScript like you do in Python. check it out if you think it would be helpful: https://github.com/Naggafin/django-urls-templatetag
Anonymous
pleasei need asistant my data is not show at the database what could possibly be the problem
Anonymous
https://linkode.org/#aIKl3HXhi12gyZG6GY77M5
Nerd
On line 8 call the method by adding () And on line 16 it should be request.method not request.mothed
vaseem cholakkan
hey all i have a doubt consider iam having a model product and it have fields like name ,etc.. and for images i have created another model which have foriegn key to products whichs on delete is models.cascade, how this deletion will occur like if i delete an image will it remove corresponding product or if i delete a product the corresponding image is removed?
vaseem cholakkan
please help ASAP
Nerd
It is when you delete the product
vaseem cholakkan
It is when you delete the product
Tnx i was confused of a stack overflow anser
Nerd
Okay
tejasweni
ImportError: cannot import name 'HttpReponse' from 'django.http' (C:\Users\dell\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\http\init.py)
tejasweni
I'm getting this error can anyone please help
tejasweni
Django version 4.2.4
tejasweni
Python 3.11.4
Nerd
Not knowing English as a programmer is a bug😂
Ankur Patel
it is possible to develop drag and drop tools that help in creating a content? in django
jahanbini01
i can not send mail with gmail error: No connection could be made because the target machine actively refused it
Stanislav
Hi there, can anyone show me some sources on making jwt without using simple jwt and other similar tools, like on your own huh?)
Анатолий
i can not send mail with gmail error: No connection could be made because the target machine actively refused it
Did you turned on two-factor authorization for an email account you're using?
Анатолий
And also make sure you pass an app password (or smth sounds like this) in your settings (It must be passed in EMAIL_HOST_PASSWORD variable if I'm right)
Kiki
Hiii
Kiki
Anyone good with generating pdf in django in a letterhead format
Kiki
I'm using Pisa , please help me with it or suggest something please
deni
https://stackoverflow.com/questions/77023763/celery-in-django-celery-beat-doesnt-work help pls
Sat
How to set Django sso authentication using saml for azure ad, is there anyone that can help me with this
Lauriano
Hi Guys, Can I use a foreign key as a return from a str function, in django?
𝒜𝔞𝔣𝔞𝔨𝔥
Using paython and django code
Vaibhav
You need help with?
𝒜𝔞𝔣𝔞𝔨𝔥
Yess
𝒜𝔞𝔣𝔞𝔨𝔥
Please help me login page using paython and django code ( email id, password, confirm password, name)
Lauriano
yes
in this example, it no use https://docs.djangoproject.com/en/4.1/topics/db/examples/many_to_one/ it's bad pratice ?
Sina
hello i have a question i runned my project in my localhost it was working with out problem and when i deployed in server i think static doe'snt load and i did collectstatic before deployment
Sina
Where does you images point to
it's not only image also css and js can't be loaded
Nerd
Check if the collectstatic worked as check if it generated some files
Sina
as i know i have to link the file location in nginx right? can you give me a example of nginx configuration about this
Nerd
Oh okay
Nerd
Where is it hosted
Proton
as i know i have to link the file location in nginx right? can you give me a example of nginx configuration about this
It has to do with Linux permissions The server isn’t permitted to view the folder and collect the information it needs
Proton
Try the following: For Linux server permissions (DigitalOcean or any Linux server) chmod -R 777 /path/to/folder Change ownership of folder from root:root to www-data chown -R www-data:www-data /path/to/folder/
Muflone
ok thanks i'll try
chmod is the worst thing you could ever do to your webserver Avoid following advices from people recommending you to break anything
Proton
Well from experience, it’s the only thing that works You could share other ways of doing this
Nerd
Absolutely wrong and non sense
Can you prove anything instead of just jumping to conclusions?
Nerd
What Proton says make sense Any reason why it a non sense?
Muflone
What Proton says make sense Any reason why it a non sense?
Settings the permissions in an unsafe way, adding permissions which are NOT USED by nginx is non sense, dangerous and harmful
Nerd
Proton any counter argument? What to learn from this
Nerd
And Muflone in this case what will be the ideal solution
Muflone
And Muflone in this case what will be the ideal solution
1) make sure the issue is related to permissions 2) in the case, set the directory permissions to 750 or 755 and files permissions to 644
Proton
This is development Nothing is safe and everything is unsafe I remember spending weeks stuck on this same issue SINA is facing now. After spending lots of time reading, I ended up on the file and folder permissions.
Muflone
oh so what should i do
Read the message above your last reply
Nerd
Sina try this let see
Muflone
This is development Nothing is safe and everything is unsafe I remember spending weeks stuck on this same issue SINA is facing now. After spending lots of time reading, I ended up on the file and folder permissions.
Great result You spent weeks on a thing and you learned nothing from it Also telling nothing is safe is the perfect reason because no one should ever listen to any hint from you
Proton
But you still ended at permissions Muflone
Sina
Read the message above your last reply
ok thank you i'll try them
Sina
Sina try this let see
i can't right now but i'll try tomarrow and let you guys know about it
Muflone
But you still ended at permissions Muflone
There's an IMMENSE difference between 777 and what I wrote Read again please
Proton
Muflone we are gathered here to learn I change folder permissions to 777 and you decided to use 755 The best thing to do is to explain the difference between 777 and 755 and the other mods to SINA He will understand it better
Proton
At least if I didn’t learn well, I could also learn from you
Sina
-R 777 is not 755 for folders and 644 for files, at all
our question is whats diffrence between 755 and 777 premision
Nerd
-R 777 is not 755 for folders and 644 for files, at all
I think this is not clear But I will read around this myself
Muflone
I agree with you
I'd be happy to explain the difference but 1) you're not sure the issue is related to permissions 2) admins won't agree in explaining this in the Django group which is only related to Django
Sina
I'd be happy to explain the difference but 1) you're not sure the issue is related to permissions 2) admins won't agree in explaining this in the Django group which is only related to Django
we guess its related to permissions and i think when it makes problem in my django app its related to django so ill be happy to know about them
Sina
i have this problem since 2022 when i tried to deploy my last app i could'nt find the solution
Muflone
Proton
I'd be happy to explain the difference but 1) you're not sure the issue is related to permissions 2) admins won't agree in explaining this in the Django group which is only related to Django
And that’s the difference Muflone I have experienced the same issue on three projects after deploying on DigitalOcean The issue here was permissions Trust me. If 777 isn’t the right thing to do SINA you could try what Muflone said with 755 and 644
Sina
nginx configuration is not Django related, it's related to your webserver configuration
ok never mind about it ill explain to friends. 777 - all can read/write/execute (full access). 755 - owner can read/write/execute, group/others can read/execute. source : google