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
2
votes
1 answer

Django manage.py custom command on Heroku

I am trying to run a cron job with a Heroku hosted website. I am using a Django back-end. I have written a custom manage.py command that works locally (status_crawl.py). I have seen a few guides and posts on how to fix this, but the suggestions…
AdamG
  • 3,718
  • 2
  • 18
  • 28
2
votes
2 answers

Python 2.6 on MacOSX - ImportError: No module named _collections

I'm a little bit baffled by this error I'm getting when I try to runserver or syncdb - the server was running just fine the other night when I last logged on, so I have no idea why all of a sudden it's not working. Google gave me the following page…
gersande
  • 465
  • 1
  • 8
  • 25
2
votes
1 answer

Why is django manage.py syncdb failing to create new columns on my development server?

I am trying to create a development server from a production server from which I can test out new ideas. I created a duplicate of my production server's database by dumping it using Postgres' db_dump and then imported the dump into a new database. I…
EMiller
  • 2,792
  • 4
  • 34
  • 55
2
votes
1 answer

Django Management Command Cron on Dotcloud

I'm trying to run a cron to run a custom Django management command. I'm running on DotCloud. When the cron runs, I get the following error: Traceback (most recent call last): File "./manage.py", line 2, in from django.core.management import…
user523513
  • 957
  • 1
  • 7
  • 8
2
votes
1 answer

django management command: using LabelCommand

i want to pass argument along with this management command. i run this code from command line as python manage.py example1 amita where example1 is name of my file and amita is argument. on running this i am getting error.i am pasting the…
Amita Singh
  • 107
  • 1
  • 8
1
vote
0 answers

Django manage.py ModuleNotFoundError with Pants

First time poster, so let me know if I need to provide more info! I have a Django project of the following structure: a/b/c/d/ ├── e │ ├── BUILD.pants │ ├── myapp │ │ ├── BUILD.pants │ │ ├── migrations │ │ ├── models.py │ │ ├──…
1
vote
4 answers

running django development server opens manage.py in text editor

I've tried searching for why this keeps happening as I think I've seen others mention this problem. Whenever I run manage.py runserver from the command line, it just opens the manage.py file from the project directory in notepad. If I include…
user637965
1
vote
1 answer

How to quickly reset Django DB after changes?

I'm often experimenting around creating different models, changing relations and so forth. This usually happens when starting a new project. At this phase I do not want to create any migrations but instead just get the thing up and running. So i…
JasonTS
  • 2,479
  • 4
  • 32
  • 48
1
vote
1 answer

python manage.py collect static not working. Raises a 'utf-8' codec can't decode byte 0xff issue

Hi guys so i have been trying to deploy my django application to heroku and i ran through a couple of issues. Below is some of the static setting that i have in my settings.py file STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR,…
NMukama
  • 1,114
  • 9
  • 10
1
vote
1 answer

TypeError: argument of type 'PosixPath' is not iterabl

please help i get this error from python manage.py makemigrations Migrations for 'post': post/migrations/0022_auto_20200929_1749.py - Remove field category from post - Remove field tag from post Traceback (most recent call last): File…
1
vote
1 answer

How to clear all data from an app in Django?

I want to remove all data from all models defined in a single Django app. The number of models might change in the app, hence I don't want to hard code model names. It would be great if it might be done using manage.py command, however I was not…
niekas
  • 8,187
  • 7
  • 40
  • 58
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
1 answer

What is usecase of Django Management script?

I heard of about Django Custom Management script in lots of community and i am not getting why should i write custom management script as django manage.py a lot of useful command? I am very new in django... Can anyone tell me some usecase of custom…
user11149657
1
vote
1 answer

Unable to run a manage.py command from app/views.py via subprocess

Python/Django newbie here! In my new project, I am able to load the django template pages and the admin section, as well as update and delete things from the admin... I've been able to collectstatic without a problem and I can also run all commands…
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