Questions tagged [manage.py]

`manage.py` is a command-line utility for Django's administrative tasks. It is an automatically created thin wrapper around `django-admin.py`.

manage.py is similar to django-admin but it does some extra tasks like putting your project's package on sys.path and sets the DJANGO_SETTINGS_MODULE environment variable so that it points to your project’s settings.py file.

Usage

manage.py <command> [options]

Source

201 questions
1
vote
1 answer

run a cloned repository for django project

Traceback (most recent call last): File "/home/cand/Python_Project/Data Science Github/gitando/django-simples/manage.py", line 10, in main from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The…
1
vote
3 answers

python manage.py makemigrations says table already exists in Django project

I am trying to get a coworker of mine up and running with a project I have already created. When we try to run the server it says one of the tables already exists. We googled it and tried to makemigrations and migrate --fake from posts like this…
1
vote
1 answer

what is the difference between os.environ.setdefault() vs os.environ.putenv()

It is my understanding that both are supposed to set environmental variables. But toggling between these two in django's manage.py file leads to different outcomes. >>> help(os.environ.putenv) putenv(name, value, /) …
bl3ssedc0de
  • 780
  • 1
  • 11
  • 15
1
vote
2 answers

ImportError : Couldn't import Django

I have installed django==3.1.4 and activated Venv on my windows machine and it works fine in myBlog project. But today when I try to run the server, got this error ImportError: Couldn't import Django. Are you sure it's installed and available on…
RENJITH V.S
  • 93
  • 1
  • 8
1
vote
2 answers

django: I accidentally deleted the manage.py file. how to recover it?

I accidentally deleted the manage.py file with vim nerdtree. apparently, there isn't a way to recover it I I don't know what to do. can I somehow create a new one or restore it?
Arman Zanjani
  • 197
  • 11
1
vote
2 answers

python manage.py runserver not working in pycharm

django isn’t working in pycharm
HASEEB ASGHAR
  • 11
  • 1
  • 4
1
vote
1 answer

When designing a CLI, how does one indicate that FILE is required (either by stdin or by argument)

Best is to go over an example. I want my CLI to be able to be run both ways, how do I correctly convey this in the help docs? Usage: my-cli import FILE my-cli import [FILE] (in case where stdin is used only) e.g. my-cli import test.xlsx my-cli…
dnk8n
  • 675
  • 8
  • 21
1
vote
0 answers

Unable to start Django application with python manage.py runserver 0.0.0.0:8080 on CloudFoundry

I am trying to host Django application in CloudFoundry. I am able to host the application if I use external package gunicorn. But with Django's inbuilt runserver, the application is not getting started. The Procfile content with Gunicorn is: web:…
richa verma
  • 247
  • 2
  • 13
1
vote
1 answer

How to make `manage.py` search tests also in a `tests` subfolder and not only in the app toplevel directory?

This is my directory structure: ~ |--- scratchpad |--- manage.py |--- my_project |--- __init__.py |--- settings.py |--- urls.py |--- wsgi.py |--- my_app |--- __init__.py …
user4385532
1
vote
0 answers

Django Connection Error(Oracle 11g Database)

When my Django program connected to Oracle 11g DB, an error occurred. When I input “python manage.py migrate” command, a below error occurred. (When my Django connected to sqlite3 DB, no problem.) Django 1.11.22 cx-Oracle 7.2.2 python 3.6 …
Terry
  • 19
  • 4
1
vote
1 answer

pre-built django project gives error on migrate

I have a pre-built django project, and need to run it on ubuntu 18. Went through & installed all prerequisites, using postgresql as db engine. created a db for project and added user with required privilleges & then updated those settings into…
Sollosa
  • 379
  • 4
  • 13
1
vote
2 answers

Errors when creating django project in pycharm

I am a beginner in python and pycharm, I want to create a Django project under pycharm but when I click on the create button I got this errors: knowing that I am using the latest version of pycharm (2019.1) Error creating Django application: Error…
hanou23
  • 39
  • 5
1
vote
1 answer

Finding source of manage.py subcommand

I'm new to django and working on a modern django/Wagtail CMS app that is seeded using the command python manage.py loadfixtures. It seems like loaddata is the more common command, and I'm finding it incredibly difficult to find any documentation on…
erikdstock
  • 1,117
  • 9
  • 16
1
vote
1 answer

django/postgresql setup - psycopq2.OperationalError

I'm getting a 'psycopq2.OperationalError' when executing: python manage.py syncdb. The postgresql server seems to be up and running when tested with a djangostack script. Anyone run across this? Just going through the django tutorial and setting…
Igor
  • 63
  • 1
  • 1
  • 6
1
vote
1 answer

Django : DiscoverRunner overriding raise error

I'm currently trying to define an other test_runner. To do so, i changed my settings.py : TEST_RUNNER = 'test_runner.MezzoTestsRunner' Here is my MezzoTestsRunner class : class MezzoTestsRunner(DiscoverRunner): def __init__(self): …
AntoineLB
  • 482
  • 3
  • 19