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
6
votes
2 answers

Django runserver bound to 0.0.0.0, how can I get which IP took the request?

I'm running a temporary Django app on a host that has lots of IP addresses. When using manage.py runserver 0.0.0.0:5000, how can the code see which of the many IP addresses of the machine was the one actually hit by the request, if this is even…
Ben
  • 6,687
  • 2
  • 33
  • 46
5
votes
2 answers

Running Django custom manage.py task on Heroku - Importing Issues

I'm trying to run a custom django command as a scheduled task on Heroku. I am able to execute the custom command locally via: python manage.py send_daily_email. (note: I do NOT have any problems with the custom management command itself) However,…
kturner
  • 1,091
  • 2
  • 10
  • 15
5
votes
1 answer

Pycharm: makemigrations and migrate ignore my changes

Here's what I'm doing all the time, and I guess it's not the right solution: modify my models delete the db.sqlite3 file launch makemigrations then migrate If I dont delete the db.sqlite3 file I have this when I try to run makemigrations then…
Olivier Pons
  • 15,363
  • 26
  • 117
  • 213
5
votes
2 answers

upgrading python django project 1.3 to 1.5

currently i have python project using django version 1.3 running on mountain lion OS and now i want to upgrade it to django 1.5. But when i put it and try to do python manage.py runserver i get an error saying Error: Can't find the file…
4
votes
1 answer

How to fix 'django.db.utils.OperationalError: near "None": syntax error' db.sqlite3?

I am attempting to create a user model for my Django REST framework and, sadly, I'm experiencing some unexpected difficulty: when I run 'python manage.py makemigrations' everything functions as it should, but, when I try to run a migration, I am…
Isaiah I
  • 131
  • 1
  • 9
4
votes
3 answers

How to load .sql file with manage.py

I have a .sql file from one of my production servers, and am now trying to load it into the database of another. I tried python manage.py loaddata, but its giving me an error CommandError: Problem installing fixture 'social': sql is not a known…
TJB
  • 3,706
  • 9
  • 51
  • 102
4
votes
5 answers

How to customize the Django manage.py shell?

Almost every time I use the manage.py shell in Django, I want to have certain things imported. I want to import * from my models.py module, for instance. Currently, my work around is to put all the imports in a file named s.py, and then after I fire…
SerMetAla
  • 4,332
  • 5
  • 31
  • 25
4
votes
2 answers

manage.py doesn't pass the argument to the command

I have a problem when trying to create migrations. manage.py behave in a very weird way - it takes arguments which are given for schemamigration and answers that I provided non-existing option. When I run # ../manage.py schemamigration locations…
lukaszzenko
  • 317
  • 4
  • 11
4
votes
3 answers

manage.py - not in project folder?

I'm trying out Django for the first time, and I'm trying to follow the tutorial provided by the django team. After I've created a new project I get the following folder/file structure, just as the tutorial says I should: mysite/ manage.py …
holyredbeard
  • 19,619
  • 32
  • 105
  • 171
3
votes
4 answers

Why it shows Unknown command: 'collectstatic', when I try to collect-static

I am trying to deploy my Django project on Digital Ocean. I created my droplet and spaces on Digital Ocean and created a static folder to store my static files. I pulled my code from my github-repo. then I installed all requirements and tried to…
Rasheed kotoor
  • 257
  • 2
  • 14
3
votes
1 answer

DeprecationWarning: Using or importing the ABCs from 'collections' instead of fr om 'collections.abc' is deprecated, and in 3.8 it will stop working

I downloaded a code from github and trying to run it as it is by running command in git bash: python manage.py runserver But I am experiencing this error: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from…
callme_dg
  • 31
  • 1
  • 2
3
votes
3 answers

manage.py runserver - ImportError: No module named MYSITE

I can't get the dev environment running! I've been following the instructions here (tutorial on DjangoProject page). When I type manage.py runserver I get the following error: ImportError: No module named MYSITE I am executing the command within…
XYZ91525
  • 33
  • 1
  • 3
3
votes
1 answer

Adding command arguments to the Django runserver command and handle() method setup for local secure HTTP server

I'll keep this as vague as possible - as it's quite a broad question. I'm building a payment system within my Django project - and it would be amazing to be able to run my project over a secure server connections. And now were moving into a more…
user10261970
3
votes
1 answer

manage.py datadump of a large database in Django 1.1 (creating testdatabase)

To be able to do some decent unittests I want to create a testdatabase. After reading the Django docs, I came to the conclusion that the best way to do this is by creating a testdatabase from the actual database, with the use of fixtures. To create…
markijbema
  • 3,985
  • 20
  • 32
3
votes
1 answer

Print sql queries in jupyter notebook with django-extensions plugin

Is it possible to show SQL queries like in this command: python manage.py shell_plus --print-sql but in Jupyter Notebook? I tried this command python manage.py shell_plus --notebook --print-sql but it not worked.
Andrei
  • 1,313
  • 4
  • 18
  • 35
1
2
3
13 14