DEV Community

Stesha Quarcoo
Stesha Quarcoo

Posted on

Problems with django-admin function?

Django is basically a backend framework that utilizes Python as its main language to integrate with front-end web development.
More info about Django here

Using Django as a newbie can be tough. So much new stuff to do as well as new terms to understand. And nothing hurts more than starting a new language and being hit with..... an error message.

Many Django users know that to start Django, you need to first install it under Python with "pip". Now after installation, to use Django you need to create a project. The project is the entire directory/folder. Within the project, one can now create an app which is basically the application that will be used in your website. The project-app relationship is sort of similar to a folder-file relationship, where apps make up the files and project the folder.

So to create a new Django project, navigate to your desired directory in your terminal or Command prompt using 'cd'. Now here is where the problem may arise. The standard code for creating the Django project is

django-admin startproject PROJECT_NAME
Enter fullscreen mode Exit fullscreen mode

where the PROJECT_NAME is the desired name for your project. Now, if it this goes well for you, Hallelujah. But some of us may be unfortunate to be hit with this:
Image description
Now don't panic, that is the purpose of this article. I asked Bing AI for any debugging tips and here was the response
Still I found no help. So I experimented for a while and tried this

python -m django startproject article
Enter fullscreen mode Exit fullscreen mode

Image description

AND IT WORKED!!

Image description

Image description

NOTE: This was tested in Windows OS.

In a nutshell, I have explained a little bit of how to fix a minute Django problem and also how to understand a bit of Django. I hope you enjoyed this. Please share and Happy Dev'ing

Top comments (1)

Collapse
 
b0ym3r profile image
Stesha Quarcoo

Was this okay?