Aditi
How to link another webpage to one webpage in django
Miracle
How to link another webpage to one webpage in django
Use the url feature of Django inside the template to do that
Jiraiya
Can someone please list the django specific topics, that someone with 1-2 years of professional experience should be comfortable with?
Oluwatobi
Hi guys , Does anyone have any learning resources they could share on Django and every other thing needed to be a backend In English please
Doragonsureiyā
Hi guys , Does anyone have any learning resources they could share on Django and every other thing needed to be a backend In English please
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Denys
Hello, can anyone help me please. I'm new to django, i tried to deploy website, but I got error: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"). MYsql is running and information is correct in settings.py
Отабек
I have been learning python since 1.5 years to run a startup project or not
-shdmhr
Deploying where?
Charley I can't send picture here can I send it in pv u have django question
Charly
Charley I can't send picture here can I send it in pv u have django question
No, pictures are worthless to share code and errors that are text
Doragonsureiyā
Charley I can't send picture here can I send it in pv u have django question
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://dpaste.org, https://hastebin.com, https://bin.kv2.dev or your favorite one!
-shdmhr
No, pictures are worthless to share code and errors that are text
Please I can't describe it without picture
Diana
Hi! I dont know if I can ask it here. But as a backend dev, who learns Django, I want to also have some proper frontend for my site. Are there any resourses to find some learners of frontend and suppose to them working together on the project that I work on?
Mayur
Which is best platform to host django projects to add in resume ? plz suggest
Doragonsureiyā
Which is best platform to host django projects to add in resume ? plz suggest
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so delete your question here and move to the @PythonOfftopic group and ask there.
Denys
Charly
render com
Then no you don't have a local database on render
Denys
should i deploy in another place?
Charly
should i deploy in another place?
No, you need to have a database server anywhere
Denys
thanks
-shdmhr
No, you need to have a database server anywhere
This is my code in urls.py path('delete/<int:userid>/',delete) in views.py def delete(request,userid): user.objects.get(id=userid).delete() return(redirect("home")) I think my code is true but when I click on delete django say page not found
-shdmhr
there is no home url
I'm not writing all of my code just part of it and in my urls there is a home url
Charly
I mean at least the relvant parts ¯\_(ツ)_/¯
-shdmhr
we need more code then
My problem is why page not found I have a url and view
-shdmhr
You tired me really
Charly
My problem is why page not found I have a url and view
If you have the url and it i named home it should work, if not you did something wrong
Charly
thats why we need the code
Charly
You tired me really
why you so hesitant to share the code properly?
-shdmhr
why you so hesitant to share the code properly?
Because I write codes in my computer and I chat with my phone it is hard
-shdmhr
why you so hesitant to share the code properly?
Telegram in my country is filter and there is no vpn for computer
Charly
Because I write codes in my computer and I chat with my phone it is hard
yes but copy the code to a paste site in you computer then just share the url here
-shdmhr
Wait a second
شادمهر
yes but copy the code to a paste site in you computer then just share the url here
in urls.py python from django.urls import path from .views import homepage,uzer,delete urlpatterns = [ path('',homepage,name="home"), path('uzer/<int:uzerid>/',uzer), path('delete/<int:userid>/',delete) ] in views.py python from django.shortcuts import render, redirect from.models import user def homepage(request): keyuser = user.objects.all() return render(request,"home.html",{"allkeyuser":keyuser}) def uzer(request,uzerid): uzermodel = user.objects.get(id=uzerid) return render(request,"uzer.html",{"uzermodel":uzermodel}) def delete(request,userid): user.objects.get(id=userid).delete() return redirect("home")
-shdmhr
Even gpt say my code is right
-shdmhr
But I don't know what is problem
Charly
Is empty coute
empty? so just localhost:8000/ ?
Charly
Never mind
okay then 🙄
Rahul sinha
send django complete course link
Doragonsureiyā
send django complete course link
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
S
Anybody from Hyderabad, India? I need help with my django python project..
Charly
Anybody from Hyderabad, India? I need help with my django python project..
Help is provided here so not relevant the city you came from
Doragonsureiyā
Anybody from Hyderabad, India? I need help with my django python project..
No one can help you until you explain your difficulties.
S
I have created a form page, want to insert data from that form to mongodb
Charly
I have created a form page, want to insert data from that form to mongodb
Don't use mongodb with Django, read the documentation of Django on how to use databases and models
S
It is running project I am enhancing
S
Error: failed to load resource, the server responded with a status of 400(Bad request)
S
I don't get option to upload image here
Charly
I don't get option to upload image here
Why you need an image when code and error are text?
Doragonsureiyā
I don't get option to upload image here
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://dpaste.org, https://hastebin.com, https://bin.kv2.dev or your favorite one!
S
I posted error message, you say can't help with no details..
Charly
I posted error message, you say can't help with no details..
Where did that message come from? Where is the code ?
ْ
I posted error message, you say can't help with no details..
Yes, he means you are sending the error without the details of the problem. How will we know that this error is the result of any problem, so write the code and error in one of these links and share it with us so that we can help you.
S
Can anyone help i has deployed django project working correctly on both http and https but i am not able to see the images and css is not coming proper why ???
S
Yes i have read but not working i am using gunicorn and apache
Charly
Yes i have read but not working i am using gunicorn and apache
Then thats not django isssue, go to @pythonofftopic and show what you have done with apache
Miracle
Can you please elaborate it?
To link a page to to another page, Django has a template system that allows calling different pages by using their alias name specified in your url.py for that app. For instance let's assume you have two apps in your project called inventory and products. If you want to call products from inventory, you can do this after setting up their respective url.py with unique alias, in this case let me use the app name as the alias. So the inventory template will have something like this inside it <a href="{% url products %}">Visit the product page</>
Abhi
How to link another webpage to one webpage in django
Use the url and view features and plus like used href = {% url pagename %}
Abhi
In production you have use python manage.py collectstatic command which collect all static files
This makes another folder of all static files like asset where the static workable
Abhi
I have created a form page, want to insert data from that form to mongodb
So it is like simple where you want to store the details in mongodb database?🤔