Commits

Luke Plant committed 2a226b9

Factored out some constants

Comments (0)

Files changed (1)

 from fabric.contrib.files import exists
 from fabric.context_managers import cd, lcd, settings, hide
 
+# CHANGEME:
+
+USER = 'foo'
+HOST = 'foo.com'
+APP_NAME = 'myapp'
+
 # Host and login username:
-env.hosts = ['foo@foo.com'] ## CHANGEME!
+env.hosts = ['%s@%s' % (USER, HOST)]
 
 # Directory where everything to do with this app will be stored on the server.
-DJANGO_APP_ROOT = '/home/foo/webapps/myapp_django/' ## CHANGEME!
+DJANGO_APP_ROOT = '/home/foo/webapps/%s_django/' % APP_NAME
 
 # Directory where static sources should be collected.  This must equal the value
 # of STATIC_ROOT in the settings.py that is used on the server.
-STATIC_ROOT = '/home/foo/webapps/myapp_static/' ## CHANGEME!
+STATIC_ROOT = '/home/foo/webapps/%s_static/' % APP_NAME
 
 # Subdirectory of DJANGO_APP_ROOT in which project sources will be stored
 SRC_SUBDIR = 'src'
 
 
 # Commands to stop and start the webserver that is serving the Django app.
-# CHANGEME!  These defaults work for Webfaction
 DJANGO_SERVER_STOP = posixpath.join(DJANGO_APP_ROOT, 'apache2', 'bin', 'stop')
 DJANGO_SERVER_START = posixpath.join(DJANGO_APP_ROOT, 'apache2', 'bin', 'start')
 DJANGO_SERVER_RESTART = None
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.