Can't start Django 1.7.1 development server - django

I migrated my Django app from 1.4.3 to 1.7.1
I got it working for a short while
but now every time I try to run the development server it gets stuck on:
C:\Users\DAVID\Documents\TinyTap-web\tinytap>python manage.py runserver
Performing system checks...
System check identified some issues:
WARNINGS:
?: (1_6.W001) Some project unittests may not execute as expected.
HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure
. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.
System check identified 1 issue (0 silenced).
the localhost is not working , also tried with other IP/ports = same results.
I could get rid of this warning by adding TEST_RUNNER = 'django.test.runner.DiscoverRunner' to the settings file, but still development server is not running

Apparently it was related to migrations and "CircularDependencyError".
After deleting the database , and the migration folders and running manage.py migrate
I was finally able to runserver

Trying creating a new project
django-admin.py startproject mysite
If it works then there's problem with the current project you're trying to run. (You'll need to give us more information for us to help)

Related

In the netbox plugin development tutorial, where is manage.py being run from?

I am following the tutorial on plugin development at https://netbox.readthedocs.io/en/stable/plugins/development/
I have gone as far as creating the models and want to make migrations...
However, the manage.py is not found in the root of my plugin folder.
Where is it expected that manage.py is?
The manage.pyis part of the Django application (= website). It is located in the Django root folder, see e.g. Django tutorial.
So, a plugin never has got its own manage.py, but it may have got a set of migration files that are used by the Django app when python manage.py migrate is invoked and the plugin has been installed and defined as being a part of the Django app (within settings.py).
Assuming you've followed the installation instructions and installed Netbox in /opt/netbox, the manage.py file you need to use is located in /opt/netbox/netbox/ folder.
Don't forget to activate the virtual environment in /opt/netbox/venv and to set DEVELOP to True in /opt/netbox/netbox/netbox/configuration.py

Django Runserver Crashes without Message

I've been working a project for months using Python3 & Django, never had issues regarding starting django but yesterday I formatted my Mac, I have the project in Github so today I clone the project and had bunch of issues with Psycopg2 and Pillow but eventually fixed it.
The problem now is that, when on the terminal I put python manage.py runserver, django simply crashes without any message and I don't know how to find the problem or view any logs regarding the crash, this is all I get:
(backend) ➜ src git:(master) ✗ python manage.py runserver
3Watching for file changes with StatReloader
Performing system checks...
After that it simply crashes and nothing else happens. Any ideas on how to debug this problem? I've tried cloning it again and building it but same results.

Unit Test warning when migrating from 1.5 to 1.7

I have migrated my project from Django 1.5.1 to 1.7.
I have removed South from the installed apps. But when I execute the runserver command, I am getting the following warning, even though I have not written any unit test in the project.
Some project unittests may not execute as expected. HINT: Django 1.6
introduced a new default test runner. It looks like this project was
generated using Django 1.5 or earlier. You should ensure your tests
are all running & behaving as expected. See
https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner
for more information.
How can I remove this warning message?
Place this into your settings.py:
TEST_RUNNER = 'django.test.runner.DiscoverRunner'

Heroku app with Django and postgres crashing unexpectdly

I am new to Django development, but I am in a situation where I need to deploy a large project on Heroku.
I ran my app in local system, it worked fine.
I pushed the same to Heroku and it also worked fine. But after few hours I open my app URL in browser , then app is saying Some thing has broken,intimated to admin.
The app worked fine before few hours, but what happened after few hours.
I just pushed my old DB backup to Heroku DB, Thats it app running fine now.
But I confused what happened to my app, I am facing this problem again and again,
how can I avoid this problem in future.
My app configuration:
psycopg2==2.4.5
Django==1.4
This could be a number of causes. It sounds more like a database issue. I would run the following command
heroku pg # TAKE NOTE OF THE HEROKU_POSTGRESQL_[COLOR]_URL
heroku pg:reset HEROKU_POSTGRESQL_[COLOR]_URL --confirm [appname]
This will reset your postgres database that is the active one, remove all tables etc.
Then I would run the regular command to get your database backup and running.
manage.py syncdb
You can also do the following
manage.py validate
This will go through your modules and tell you if any errors are present.
If that fails - enable debug in your settings.py file.
Also you can run "heroku logs" this will tell you the last few errors and statuses that have been hit with your app.
Let me know if this works, if not I will help debug further.

can't get django to work in eclipse + windows

I've installed django on my windows machine, added the pydev and django plugins for eclipse, create a django project, and ran manage.py createapp to create one app. Now when I run manage.py runserver (via eclipse's "custom command" option") It says Validating models... but when I go to http://localhost:8000 I get no response, as though the server is not running. What am I doing wrong?
Try running with --noreload to avoid getting two processes. It helps with error output redirection in eclipse, and may give you more hints towards the actual problem.
Also, do the same from the command-line to see if you get the same problem.
Update: Per Fabio's comment above, you can work around this problem by hacking the code, as explained in this question.