Doragonsureiyā
Hi all, Everything seems to be fine in the code section but my form is not getting posted
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Suraj
I have created a contact form using Bootstrap in django... everything looked fine but the data is not getting posted. I used method and action in the contact.html....but data is not going through. Version 3.10.2
Hari
Gud evening everyone I'm new to website development So i have Django project with mysql database So i deploy my project with custom domain name like pmkexample.in so how can i hosting to live server if any idea💡 just share article or guidance Thankq😊
Neeraj
I have created a contact form using Bootstrap in django... everything looked fine but the data is not getting posted. I used method and action in the contact.html....but data is not going through. Version 3.10.2
What is issue.? 1. Data doesn't fetch from database and not show in front-end 2. Data fetch but not show in front-end 3. Data not save in database.
shubham
can someone suggest me some free resources for creating micro services in django 3
Suraj
What is issue.? 1. Data doesn't fetch from database and not show in front-end 2. Data fetch but not show in front-end 3. Data not save in database.
First of all thanks for your response. I have a contact.html in my templates. I have created the website and contact page. In contact page , Form is visible and is fine. When we enter data...and click submit... it's not getting in... it's just still. I have written post method inside form actions. The data in the form should go in, so that I will proceed further with the models
Shazeb
can i remove www by default in django?
Doragonsureiyā
can i remove www by default in django?
What are you talking about?
Shazeb
DisallowedHost at / Invalid HTTP_HOST header: 'www.example.com'. You may need to add 'www.example.com' to ALLOWED_HOSTS. Request Method: GET
Shazeb
i only want to allow example.com
Shazeb
but if i try to reach www.example.com
Shazeb
i'm getting the above error message.
cj
i only want to allow example.com
add it to the ALLOWED_HOSTS constant ¯\_(ツ)_/¯
Shazeb
-_-
Д
can i remove www by default in django?
It's a routing question
Shazeb
ok
cj
-_-
ah... you want to redirect it from www.example.com to example.com only when the users write the address in their browser... that's nothing to do with Django, that's an nginx config —or whatever other webserver you're using—
Anonymous
Hallo guys. Just wanted to know which course in youtube and udemy is the best to start learning django
Anonymous
German
hello everyone, a slightly strange question, but can celery task run get request on schedule?
Janmejay
Can any one have project on e-commerce
German
okay thx. will it be optimal method for notifications, or i should pay attention to other ways?
S
how can i do this {% if request.path == ‘/post/{{post.id}}' %} so, if the path equal to /post/1 do something
Shazeb
can someone help
Shazeb
SystemCheckError: System check identified some issues: ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.
Shazeb
STATIC_URL = '/static/' STATICFILES_DIRS = [ BASE_DIR / "static" ] MEDIA_URL = '/media/' MEDIA_ROOT = "media" STATIC_ROOT = "static"
Shazeb
whats wrong in this?
Shazeb
ok
Alex
whats wrong in this?
You are using the same name for staticfiles_dir and static root,
Shazeb
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
Alex
You are using the same name for staticfiles_dir and static root,
I usually use my static root as : STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
Shazeb
if i change name to staticfiles, then ngnix is not loading anything
Shazeb
like css and js
Alex
if i change name to staticfiles, then ngnix is not loading anything
Inside of nginx config you have to place your new path name
Shazeb
location /staticfiles/?
Alex
location /staticfiles/?
location /static/ { alias /home/app/web/staticfiles/; }
Shazeb
ohh ok
👑 Dharmzeey
Please anytime I am running my web app on my local machine, after some time when I make changes to the css files, it does not reflect on the browser again and I will have to use another browser to continue, which after some times it develops the same problem Please why is that
👑 Dharmzeey
I tried clearing cache and site data, but the problem isn't solved. Please what can I do
Shazeb
Hey everyone, Is setting allow host to * is good idea?
Shazeb
if i use www. its giving me error
Shazeb
400 bad requesdt
Charly
if i use www. its giving me error
Add it to allowed hosts
Shazeb
but i want to redirect anyone who is going on www.
Shazeb
i already did, but if you add www. it will give me 400 bad req
Charly
i already did, but if you add www. it will give me 400 bad req
No if you did it on your webserver that request would never reach Django
Shazeb
i can show you my config, if you dont mind?
Charly
i can show you my config, if you dont mind?
No, I think you don't know what a webserver is, I mean you need to do the redirect in nginx or apache the one you are using
Shazeb
i'm taking about the same
Shazeb
ngnix
Charly
i'm taking about the same
Then do the redirect there, then no need to change anything on Django
Shazeb
so if i do the redirect, then it will not use www?
Shazeb
and i don't have to add www. in allowed host?
Charly
Right
Shazeb
Give me 5mins ill fix now
Shazeb
its not working
Charly
its not working
No code, no help
Shazeb
https://www.quickhighprotein.com/
Charly
https://www.quickhighprotein.com/
Do you understand that we are unable to see what you did?
Shazeb
yes.
Charly
yes.
I told you that it need to be solved on nginx
Shazeb
this is my redirect.conf
Shazeb
this is my main config
Shazeb
ok