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

Django: split management commands into subfolders

The Django management commands documentation shows all commands being created in an app/management/commands folder. Is it possible to put commands into subfolders, like app/management/commands/install and app/management/commands/maintenance? How…
Ollie Glass
  • 19,455
  • 21
  • 76
  • 107
13
votes
3 answers

Are there any purposes for the management folder in Django other than commands?

Why are management commands not in their own app-level folder? Are there other items which can be added to the management directory or is this structure purely vestigial?
spulec
  • 777
  • 5
  • 9
13
votes
5 answers

How do I preload imports into Django's manage.py shell command?

When I run manage.py shell on my Django project to take a peek at something there are common imports that I always want to run at the start of the shell (e.g. I always want to import my model files.) How can I have these run automatically everytime…
MikeN
  • 45,039
  • 49
  • 151
  • 227
11
votes
2 answers

Django - disable one of system checks

Is it possible to permamently disable only ONE (not all) of the system checks (for example E301)? Is it possible to change project settings.py to skip this system check for all ./manage.py commands?
domandinho
  • 1,260
  • 2
  • 16
  • 29
11
votes
2 answers

Satchmo clonesatchmo.py ImportError: cannot import name execute_manager

I get satchmo to try, but I have a great problem at first try, and I don't understand whats wrong. When I making $ python clonesatchmo.py into clear django project, it trows an error: $ python clonesatchmo.py Creating the Satchmo…
Pruntoff
  • 615
  • 3
  • 8
  • 18
8
votes
1 answer

Migrating django admin auth.groups and users to a new database using fixtures

Here's the scenario: I'm using django's admin interface and I would like to be able to load users and groups via fixtures (if this is possible.) I'm able to dump users/groups like so: manage.py dumpdata auth auth.group > usersandgroups.json But…
7
votes
4 answers

Pycharm cant open manage.py task

In one of my projects , I cannot open manage task console. It works for other projects but not for this one. It worked before, but it stopped recently. I tried using old versions of the project, but its still broken. I get this error: Failed to…
Luka Prelic
  • 181
  • 2
  • 12
7
votes
1 answer

How to make Django management command not open a transaction?

I'm writing a management command where I want to change the default isolation level. Django and my database will default it to "READ COMITTED" and I need it to be "READ UNCOMMITTED" only for this particular management command. When…
andrefsp
  • 3,580
  • 2
  • 26
  • 30
6
votes
3 answers

Django makemessages for apps in site-packages

How can I collect translation strings outside of my project folder using Django's built-in makemessages facility? The management command makemessages is very convenient and I'd like to use it for applications located in site-packages.
viam0Zah
  • 25,949
  • 8
  • 77
  • 100
6
votes
2 answers

Django not finding apps in virtualenv when using manage.py syncdb

My problem is in getting manage.py syncdb to run within a virtualenv. It was working fine at one point, but seems to have broken sometime around when I installed South and updated pip and distribute. Anyways, when the virtualenv is activated, I can…
Mike Lewis
  • 734
  • 1
  • 7
  • 18
5
votes
3 answers

Django manage.py - Creating auth_permission and django_content_type tables

I am unable to use syncdb because my app uses some MySQL views. I have run manage.py sqlall , but this does not output the SQL for django_content_type table or the auth_permission tables. I have also had a look into south and django…
hajamie
  • 2,848
  • 2
  • 22
  • 20
5
votes
2 answers

Django Bash completion not working on manage.py

I am trying out the django_bash_completion script provided by Django but can't use it with python manage.py command. I am trying out the django_bash_completion script provided by Django. I have added it to active script in the virtual environment.…
Fazle Rabbi
  • 231
  • 1
  • 5
  • 17
5
votes
1 answer

Django add management command without installing as app

I've created a package for use with django, the main feature of which is accessible through a management command. However, in order to make management commands accessible, django seems to insist on the package being listed as an app in…
Joost
  • 4,094
  • 3
  • 27
  • 58
5
votes
1 answer

Why doesn't Django's test command recognize some options?

I'm running a project on Django 1.8.12 and I'd like to preserve test database between runs as described in the documentation. Even though the test command itself lists the -k/--keepdb option in help text, using it fails: vagrant@vagrant…
Antti Mäki
  • 108
  • 1
  • 8
5
votes
1 answer

Django Call Management Command in View, But Don't Wait

I'm calling a management command from a view as follows: from django.http import JsonResponse from django.core.management import call_command def index(request): call_command('mymanagementcommand') response = {'result': 'success', …
user3449833
  • 779
  • 2
  • 10
  • 28
1
2
3
12 13