Django server msg Error

182 views
Skip to first unread message

Anudeep Gudimalla

unread,
Sep 19, 2024, 11:01:38 AMSep 19
to Django users
Hi all

Firstly, im learning Django by book "Django for beginners - WSVincent 5th edition" in chapter-2 i'm trying to up the server to display msg "Hello World!". The development server was up but it does not shows the msg. can anybody help me to  do it. Please find the screenshot  in attachment. 

Thank you.
Screenshot-Django.png

RANGA BHARATH JINKA

unread,
Sep 19, 2024, 11:08:54 AMSep 19
to django...@googlegroups.com
Hi,

Did you create a view and link it to a URL like /home? Then, you have to go to that URL to see the message.

Thanks,
Bharath

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a6d5026c-d037-4b03-9116-977736d050cfn%40googlegroups.com.


--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

Anudeep Gudimalla

unread,
Sep 19, 2024, 11:30:26 AMSep 19
to django...@googlegroups.com
Hi Bharath, 

Thanks for reaching out.

I have created the urls.py and views.py under pages folder and navigated as book says.

please find the attachments.

Screenshot-urls.png
Screenshot-views.png

Anudeep Gudimalla

unread,
Sep 19, 2024, 11:39:51 AMSep 19
to django...@googlegroups.com
Please find the shell screenshot attached.

Thank you.
Screenshot-poweshell.png

RANGA BHARATH JINKA

unread,
Sep 19, 2024, 11:48:21 AMSep 19
to django...@googlegroups.com
Hi,

What's your project folder? Did you create a new app inside the project? You have registered your pages app URLs in the project. But you have to create a new urls.py file inside the app and import view 

Gulshan Yadav

unread,
Sep 19, 2024, 12:31:10 PMSep 19
to django...@googlegroups.com

Please send me project name


On Thu, Sep 19, 2024, 9:43 PM Gulshan Yadav <gulshany...@gmail.com> wrote:

Which one are you clone bro?


Gulshan Yadav

unread,
Sep 19, 2024, 12:31:10 PMSep 19
to django...@googlegroups.com

Which one are you clone bro?


Anudeep Gudimalla

unread,
Sep 19, 2024, 12:32:37 PMSep 19
to django...@googlegroups.com
Firstly, i created virtual environment by 
python -m venv .venv
.venv\Scripts\Activate.ps1 - activated the venv
(.venv) $ python -m pip install django~=5.0.0 - installed django in it
(.venv) $ python -m pip install black - installed black in it.
(.venv) $ django-admin startproject django_project . - created a new django project (it created django_project along with manage.py)
(.venv) $ python manage.py runserver - i ran development server(it created db.sqlite3 along with above files)
(.venv) $ python manage.py startapp pages(after pages app created i navigated to django_project/settings.py under INSTALLED_APPS i added pages app)
Inside pages i created views.py and urls.py(which i sent screenshots) after that (.venv) $ python manage.py runserver  after running this 
, the server up and running but it does not show msg.

the above i followed and mentioned in the book too.

Thank you. 




Anudeep Gudimalla

unread,
Sep 19, 2024, 12:34:29 PMSep 19
to django...@googlegroups.com
Hi Gulshan,

project name you asking for chapter no?

it was chapter 2 in the book.

Thank you.

KPADE Kouami Antoine

unread,
Sep 19, 2024, 1:28:50 PMSep 19
to django...@googlegroups.com

The problème IS simple juste going to registre your app in project on setting.py file


Anudeep Gudimalla

unread,
Sep 19, 2024, 1:31:14 PMSep 19
to django...@googlegroups.com
I have Already registered the pages app  in settings.py file

LaVie

unread,
Sep 19, 2024, 6:04:55 PMSep 19
to Django users
Hi Anudeep,


I am glad you are taking the time to learn Django.
I believe the message has been displayed. Can I ask what changes were made?

Anudeep Gudimalla

unread,
Sep 20, 2024, 7:54:22 AMSep 20
to Django users
Hi LaVie,

Thanks for your response.

I sorted out the issue by mistake i wrote urls.py code in pages app instead of project urls.py.

Thank you.

Adarsh Chand ramola

unread,
Sep 20, 2024, 2:37:45 PMSep 20
to django...@googlegroups.com
What do you mean? You are a beginner 

--

ALINDA Fortunate

unread,
Sep 20, 2024, 3:42:12 PMSep 20
to django...@googlegroups.com
Have you got the help that you wanted?



--
ALINDA Fortunate
Graduate Of Computer Science
Gulu University
Passionate about Software Development in Python
If you can't explain it simply, you don't understand it well enough.
Kagadi.

Anudeep Gudimalla

unread,
Sep 20, 2024, 3:44:08 PMSep 20
to django...@googlegroups.com
I figured it out thanks for response 

ALINDA Fortunate

unread,
Sep 21, 2024, 2:07:55 AMSep 21
to django...@googlegroups.com

Sekou Dynasty

unread,
Sep 21, 2024, 5:40:21 AMSep 21
to django...@googlegroups.com
Hi Anudeep,

I'm really glad you were able to figure it out! By the way, which version control system are you using for the project?

Anudeep Gudimalla

unread,
Sep 21, 2024, 6:23:41 AMSep 21
to django...@googlegroups.com

TERENCE BOKO EFIO

unread,
Sep 21, 2024, 11:39:46 AMSep 21
to django...@googlegroups.com

Greetings brother, am a junior developer. I want to have a great understanding of Django as a beginner. If you won't mind, can you please share the WSVincent 5th edition book with me.


Bounama Kounta GOUDIABY

unread,
Sep 21, 2024, 6:44:58 PMSep 21
to django...@googlegroups.com
First of all, if you create your project, you also need to create an application. Then you create a file named urls.py in the application's folder. and change the "pages_urls" to "nom_application.urls"

Bounama Kounta GOUDIABY

unread,
Sep 21, 2024, 6:45:00 PMSep 21
to django...@googlegroups.com
Look at this video it's in French but if you watch you understand .it's me who produced this vodeio. Here is the Youtube link

Sekou Dynasty

unread,
Sep 21, 2024, 7:10:28 PMSep 21
to django...@googlegroups.com
That is great, Anudeep. Is it possible to share the git remote url?

kumbhaj shukla

unread,
Sep 22, 2024, 7:17:00 AMSep 22
to django...@googlegroups.com

Kumbhaj.tech

Looking for opportunities


Reply all
Reply to author
Forward
0 new messages