#################### minimal convenience for pushing work-in-progress in an apache-based depl.
# xxx until we come up with a packaging this is going to be a wild guess
# on debian04 I have stuff in /usr/share/myslice and a symlink in /root/myslice
-INSTALLED_MAIN =/usr/share/unfold
+INSTALLED_MAIN =/usr/share/pyshared
# this is for a debian box
INSTALLED_APACHE =/etc/apache2/sites-available/
@exit 1
else
+$(RSYNC) ./apache/myslice.conf $(SSHURL)/$(INSTALLED_APACHE)/
- +$(RSYNC) ./apache/init-ssl.sh ./apache/init-ssl.py $(SSHURL)/$(bindir)/
+ +$(RSYNC) ./apache/unfold-init-ssl.py $(SSHURL)/$(bindir)/
endif
restart:
+# xxx it might be smarter to install wsgi.py in some other location
+# so we don't have to hard-wire these paths here
<VirtualHost *:80>
- WSGIScriptAlias / /usr/share/unfold/myslice/wsgi.py
+ WSGIScriptAlias / /usr/lib/python2.7/dist-packages/myslice/wsgi.py
<Directory /usr/share/unfold/myslice>
<Files wsgi.py>
Order deny,allow
# this to be optional on that port
<VirtualHost *:443>
- WSGIScriptAlias / /usr/share/unfold/myslice/wsgi.py
+ WSGIScriptAlias / /usr/lib/python2.7/dist-packages/myslice/wsgi.py
<Directory /usr/share/unfold/apache>
<Files myslice.wsgi>
Order deny,allow
import traceback
traceback.print_exc()
-if not ROOT:
- raise Exception,"Cannot find ROOT for myslice"
+if os.path.isdir(os.path.join(ROOT,"static")):
+ DATAROOT=ROOT
+else:
+ DATAROOT="/usr/share/unfold"
+ if not os.path.isdir(os.path.join(DATAROOT,"static")):
+ DATAROOT=None
+
+if not ROOT: raise Exception,"Cannot find ROOT for myslice"
+if not DATAROOT: raise Exception,"Cannot find DATAROOT for myslice"
####################
ADMINS = (
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': os.path.join(ROOT,'myslice.sqlite3'), # Or path to database file if using sqlite3.
+ 'NAME': os.path.join(DATAROOT,'myslice.sqlite3'), # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
-STATIC_ROOT = os.path.join(ROOT,'static')
+STATIC_ROOT = os.path.join(DATAROOT,'static')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
- os.path.join(ROOT,"templates"),
+ os.path.join(DATAROOT,"templates"),
)
INSTALLED_APPS = (
# 'django.contrib.admindocs',
'portal',
# temporary - not packaged
- 'trash',
+ # 'trash',
'sample',
# DEPRECATED # 'django.contrib.formtools',
# DEPRECATED ## 'crispy_forms',
packages= [ os.path.dirname(init) for init in (glob("*/__init__.py")+glob("*/*/__init__.py")) ]
setup(packages = packages,
+ # xxx somehow this does not seem to show up in debian packaging
scripts = [ 'apache/unfold-init-ssl.sh' ],
data_files = [
( '/usr/share/unfold/static/js', glob ('static/js/*')),