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

Django dumpdata output is empty

we have a Django 1.4.5 project with a PostgreSQL 9.3 backend. Unfortunately we are facing the problems when attempting to create fixtures for one of the apps (which is called sddb). The database is full of objects that belong to sddb…
Vitaly Isaev
  • 5,392
  • 6
  • 45
  • 64
1
vote
1 answer

Django management command: [Errno 61] Connection refused

I have written a Django custom management command—call it command.py. When I run it using manage.py command, I get the following error: error: [Errno 61] Connection refused The command doesn't import anything other than the standard BaseCommand and…
Micah Walter
  • 908
  • 9
  • 19
1
vote
1 answer

Django - sqlclear fails to delete database with AbstractUser foreign key constraints

I'm using Django 1.6 + MySQL. My model has a custom_user class that extends AbstractUser. class CustomUser(AbstractUser): dob = models.DateField() class Meta: db_table = 'custom_user' I want to delete the…
user
  • 17,781
  • 20
  • 98
  • 124
1
vote
0 answers

django and postgres: sqlclear always fails to delete constraint

django 1.6 with postgres 9.1 When trying to re-init a db I typically use the management command sqlclear so I can target tables specific to an app. In django 1.6 and postgres, whenever I use this command, it will always fail when it attempts to…
w--
  • 6,427
  • 12
  • 54
  • 92
1
vote
1 answer

Django strange behavior: manage.py commands do not end

during the last days I am observing a very strange behavior in one of my django projects: When I run some manage.py commands I see that although the commands are executed they do not end. For instance, if I try running syncdb: c:\django> python…
Serafeim
  • 14,962
  • 14
  • 91
  • 133
1
vote
1 answer

Circular import is only stopping Django command, not shell or web response

I have two classes which import each other: profile/models.py class Company(models.Model): name = ... class CompanyReview(models.Model): company = models.ForeignKey(Company) from action.models import CompanyAction action =…
neurix
  • 4,126
  • 6
  • 46
  • 71
1
vote
1 answer

Django - finding the module where warnings are coming from?

Here's my test output. I can't figure out where the bad DateTimeField is being set, because all I can see is: /home/workspace/ticktockgo/venv/local/lib/python2.7/site-packages/django/db/models/fields/init.py which isn't very useful at narrowing the…
Charles Offenbacher
  • 3,094
  • 3
  • 31
  • 38
1
vote
2 answers

Running a plain python interpreter in presense of ipython with manage.py shell

I have ipython installed, I want to run a plain python interpreter instead with manage.py shell. So I try, python2.5 manage.py shell --plain Which gave me an error, and text which suggest that --plain was passed to ipython So I read,…
agiliq
  • 7,518
  • 14
  • 54
  • 74
1
vote
2 answers

pysqlite segmentation fault?

I am on OSX 10.6 and have recently upgraded my Python from 2.6 to 2.7, so I had to upgrade python packages. This time I decided to go with brew and installed sqlite, libspatialite and spatialite-tools with brew and brew doctor says everything is…
onurmatik
  • 5,105
  • 7
  • 42
  • 67
1
vote
1 answer

NameError at / name 'editareapage' is not defined

Ok so i am a noob building a basic site in django with python. I am trying to implement a new page in my site called edit area. Whenever i visit the page all i get is this... NameError at / name 'editareapage' is not defined Request Method:…
user1074202
  • 139
  • 1
  • 4
  • 14
1
vote
2 answers

Separate logging for management commands

How can I configure logging in Django to use Sentry by default for all WARNING and higher messages, but when I run a management command lower it to INFO and add a console logger? In normal operation (running the site via mod_python or uWSGI), I only…
Jan Fabry
  • 7,221
  • 2
  • 36
  • 41
1
vote
1 answer

Django - distinguish development server (manage.py runserver) from the regular one (eg. Apache)

I need a way to distinguish development server in Django (run eg. by ./manage.py runserver 0.0.0.0:8000) from the one being run on Apache. In case of Apache I use WSGI daemon mode, but I would like to find some more reliable solution for detecting…
Tadeck
  • 132,510
  • 28
  • 152
  • 198
0
votes
1 answer

overriding def queryset doesn't work when pulling foreignkey items?

I've got a modeladmin like this class StudentAdmin(admin.ModelAdmin): date_hierarchy = 'dob' def queryset(self, request): queryset = Student.objects.filter(created_by=request.user) return queryset class…
darren
  • 18,845
  • 17
  • 60
  • 79
0
votes
0 answers

manage.py runserver: error: unrecognized arguments: --insecure

while running server make run facing this error I checked for available solution,like- checked debug setting in 'settings.py' file. I tried to kill redis and celery but didn't worked. Anyone can provide solution to this error?
0
votes
0 answers

Why do I have to activate my virtual environment for the second time - i.e. from within a Python script despite having it already activated?

I wrote many scripts to help me manage my django projects. One of them, cr_app.py creates a new app: #!/usr/bin/env python3 from subprocess import run def main(): create_app() def create_app(): name = input("The name of the app?\n") …
John Smith
  • 835
  • 1
  • 7
  • 19