Questions tagged [django-manage.py]

django-manage.py refers to Django's command-line utility for common administrative tasks.

django-manage.py refers to Django's command-line utility for common administrative tasks.

188 questions
1
vote
0 answers

Is there somewhere i can run manage.py command line in VS2019?

I'm looking to run manage.py command line to load data from my model with something like python manage.py loaddata mytest I'm using Visual Studio 2019 to be more familiar with the new version. But i'm unable to run manage.py command line. Does…
1
vote
2 answers

how to test django fixture json file

I has a script that will generate a JSON file (let me call it data.json) that for my django application, usually I can test it by running command python manage.py testserver data.json However, I would like to run this thing in unit tests rather than…
1
vote
2 answers

run django manage.py command in cron

I've written few management commands to run from cron. I'm using pipenv virtual environment running from terminal directly is working great. cd pipenv run python manage.py I added same script as cron cd…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
2 answers

Django: Management Command Disappeared and I can't test the script

I had a command all set up and working, then I set up a Cron job for it and now it disappeared from manage.py help's list of all available commands. It is under /app/management/commands/feed_update.py and it has a Command(BaseCommand) class with a…
DantheMan
  • 7,247
  • 10
  • 33
  • 36
1
vote
1 answer

I can't open manage.py

On the command prompt, (Windows 10) I created a virtual environment, I then created a new project, I installed django in the virtual environment using pip. Then decided to run the command python manage.py runserver To run djangos web server, This…
PrimeBenefiter
  • 1,043
  • 2
  • 8
  • 9
1
vote
1 answer

Modifying manage.py for development and production

My project has a base.py, a dev.py and a production.py (pretty self explanatory). On my PC I only keep the dev.py and base.py and on the server I only keep production.py and base.py. While the WSGI isn't an issue, I do find myself always having…
DDiran
  • 533
  • 1
  • 6
  • 23
1
vote
4 answers

Django manage.py runserver never finishes "validating models"

I am trying to follow the django tutorial. I am running on windows+eclipse. When I run python manage.py runserver I get the message Validating models... and afterwards see no progress... Am I doing something wrong?
olamundo
  • 23,991
  • 34
  • 108
  • 149
1
vote
0 answers

Automating startproject Django command

I have this following method to create project as below. import os project_directory = "/Users/home/project_directory/" def create_function(project_name): os.system("django-admin.py startproject {0} {1}".format( project_name, …
Amar
  • 666
  • 5
  • 13
1
vote
0 answers

Strange error Django 1.9 "runserver" command not working in one of my virtualenvs

I started having problems recently with one of my apps. It started after running command "runserver" a few times but now It doesn't start at all. wsgi.py """ WSGI config for iesc project. It exposes the WSGI callable as a module-level variable…
Gustavo Reyes
  • 1,313
  • 1
  • 17
  • 31
1
vote
1 answer

Saving images from Django database in a management command

I've found out how to load images from the file system into Django, but how do you get them out? I've figured out how to get stuff from the database in my management command and can do a query like: for m in my_models.objects.filter(get=some): …
user764357
1
vote
0 answers

Django settings import error- project_name.settings does not work, settings works

I have a Django project, version 1.8.7 I am trying to run manage.py. The manage.py scrip produces an error: ImportError: No module named project_name.settings My directory structure is like this: project_name: - __init__.py - other_stuff …
RandomGuyqwert
  • 425
  • 6
  • 18
1
vote
1 answer

EC2 instance can not access in browser

I created one EC2 instance for Django project with Ubuntu server. I installed all required package of django, python etc successfully. But when I am trying through ssh with private ip : python manage.py runserver xxx.xx.xx.xx:8983 its running, but…
Daya
  • 47
  • 1
  • 6
1
vote
1 answer

Django Test error AttributeError: 'tuple' object has no attribute 'setdefault'

I am trying to run tests in django which are placed in tests folder.Following is the output. python manage.py test Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File…
1
vote
1 answer

django manage.py - Is there a way to get the --settings argument from the environment?

Hi I have different instances of the same project that use different settings file, so for each instance I have different argument for manage.py python manage.py --settings=some_settings And I want to create scrips with different…
Martin Massera
  • 1,718
  • 1
  • 21
  • 47
1
vote
1 answer

django 1.7 migrate error when adding verbose names to foreign key fields

I have added some verbose names onto a series of FK fields in my schema [all the way thru a chain of related tables] but get this error when I try to run python manage.py migrate or python manage.py migrate…
Ammar Akhtar
  • 1,698
  • 3
  • 13
  • 25