~dylanmccall/harvest/gsoc-client-stuff

« back to all changes in this revision

Viewing changes to harvest/opportunities/management/commands/init-harvest.py

  • Committer: Daniel Holbach
  • Date: 2010-02-22 13:58:52 UTC
  • Revision ID: daniel.holbach@canonical.com-20100222135852-dh80jevpinmr857j
simplify installation

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
from django.core.management.base import NoArgsCommand
4
4
 
5
 
import settings
6
 
 
7
5
import subprocess
8
 
import os
9
6
 
10
7
class Command(NoArgsCommand):
11
8
    help = "Make sure Harvest is set up properly."
13
10
    def handle_noargs(self, **options):
14
11
        print " * Compiling messages."
15
12
        subprocess.call(["./manage.py", "compilemessages"])
16
 
 
17
 
        path = settings.PROJECT_PATH
18
 
        
19
 
        if os.path.exists(os.path.join(path, "settings.py.sample")) and \
20
 
           os.path.exists(os.path.join(path, "settings.py")):
21
 
            print " * Showing diff between settings.py.sample and settings.py."
22
 
            subprocess.call(["diff", "-u", 
23
 
                             os.path.join(path, "settings.py.sample"),
24
 
                             os.path.join(path, "settings.py")])