-2

I can't run the command 'python manage.py reunserver' on my terminal. I dont know why, here is what the terminal shows me :

enter image description here

Can please someone help me ?

I tried to execute the django dev server but it didn't worked. Normally, it show something like this : enter image description here

  • Show us the INSTALLED_APPS section of your `settings.py` file. – John Gordon Jan 07 '23 at 20:47
  • Here it is : INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "listings", ] – Mehdi El Maaroufi Jan 07 '23 at 20:49
  • 2
    Please include *code*, not *images of code*: see [*Why not upload images of code errors when asking a question*](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question). [edit] the question and include code fragments. – Willem Van Onsem Jan 07 '23 at 20:49
  • Okay, so `listings` is one of the installed apps. Is this an app you wrote yourself, or is it a third-party app? – John Gordon Jan 07 '23 at 20:51
  • Yes, it is an app I wrote myself. – Mehdi El Maaroufi Jan 07 '23 at 20:53
  • Can you share the directory structure of your project? – John Gordon Jan 07 '23 at 22:23

2 Answers2

1

You are not using virtual env. You need to activate your virtual env which you are using in your second image first then it will work flawlessly.

Divya Prakash
  • 898
  • 1
  • 6
  • 14
  • And how can I do this pease ? – Mehdi El Maaroufi Jan 07 '23 at 20:51
  • To create a virtual env, run: `python -m venv venv` in the root of your project. Then, to activate the virtual env, run: `source venv/bin/activate` (for Linux/Mac) or `venv\Scripts\activate.bat` (for Windows) at the root of your project. – Michael Pu Jan 07 '23 at 21:42
0

Try again do new project with following commands:

python -m venv venv
venv\Scripts\Activate
pip -m install django
django-admin startporject NAME
derfacn
  • 28
  • 6