dcramer / django-devserver

A drop-in replacement for Django's runserver.
BSD 3-Clause "New" or "Revised" License
1.27k stars 159 forks source link

Drop in replacement may fail in Django 1.7 with django.contrib.staticfiles #100

Closed nealtodd closed 8 years ago

nealtodd commented 10 years ago

In Django 1.7, if django.contrib.staticfiles is in INSTALLED_APPS and django.contrib.staticfiles comes before devserver in INSTALLED_APPS then staticfile's sub-classed runserver management command is used instead of django-devserver's runserver management command.

This breaks the drop-in replacement nature of devserver.

Putting devserver ahead of django.contrib.staticfiles results in django-devserver's runserver being used.

Might not be anything that can be done about that other than a note in the README about the ordering in INSTALLED_APPS.

bee-keeper commented 10 years ago

Can confirm this is the case, in addition using as drop in server generates the error mentioned in the link below.

Command Command defines both "requires_model_validation" and "requires_system_checks", which is illegal. Use only "requires_system_checks".

https://github.com/dcramer/django-devserver/pull/99

danxshap commented 9 years ago

Does this mean it can't be used with Django 1.7, or is there a workaround?

nealtodd commented 9 years ago

@danxshap - the current release of devserver can't be used out-of-the-box from Github master or PyPI.

The workaround for #99 is to use the PR in that issue or delete line 70 in runserver.py. It will then run fine with Django 1.7 as long as you don't have django.contrib.staticfiles before it in INSTALLED_APPS (this issue).

dukebody commented 9 years ago

Wouldn't it be better to use a different command name like django_extensions do with runserver_plus? Something like "python manage.py devserver".

x1024 commented 9 years ago

This has been the case for almost a year. Are you planning on shipping a version of devserver that works with the latest Django release?