Skip to content
Browse files

Made the runserver command more flexible.

  • Loading branch information...
1 parent 017294d commit 1b5819c67456624202feae42768671f2b1a3d515 @eykd committed Apr 3, 2012
Showing with 22 additions and 7 deletions.
  1. +10 −0 MANIFEST.in
  2. +12 −7 paved/django.py
View
10 MANIFEST.in
@@ -0,0 +1,10 @@
+grant docs
+include LICENSE*
+include pavement.py
+include paver-minilib.zip
+include TODO*
+include distribute_setup.py
+include CHANGES*
+include README*
+include setup.py
+prune docs/_build
View
19 paved/django.py
@@ -14,6 +14,7 @@
manage_py = None,
project = None,
settings = '',
+ runserver = 'runserver_plus',
runserver_port = '',
syncdb = Bunch(
fixtures = [],
@@ -110,14 +111,18 @@ def start(info):
Uses `django_extensions <http://pypi.python.org/pypi/django-extensions/0.5>`, if
available, to provide `runserver_plus`.
- """
- cmd = 'runserver'
- try:
- import django_extensions
- cmd = 'runserver_plus'
- except ImportError:
- info("Could not import django_extensions. Using default runserver.")
+ Set the command to use with `options.paved.django.runserver`
+ Set the port to use with `options.paved.django.runserver_port`
+ """
+ cmd = options.paved.django.runserver
+
+ if cmd == 'runserver_plus':
+ try:
+ import django_extensions
+ except ImportError:
+ info("Could not import django_extensions. Using default runserver.")
+ cmd = 'runserver'
port = options.paved.django.runserver_port
if port:

0 comments on commit 1b5819c

Please sign in to comment.
Something went wrong with that request. Please try again.