Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Load data in setup_all. Changelog.

  • Loading branch information...
commit 884976241c094bbc08c3d2f546026b832a65810e 1 parent a4ba571
Philip Neustrom philipn authored
9 CHANGELOG
View
@@ -0,0 +1,9 @@
+=============================
+LocalWiki changelog
+=============================
+
+
+Version 0.2, 2011-11-28
+-----------------------------
+
+Initial public-facing release.
3  deb_utils/localwiki.postinst
View
@@ -35,9 +35,6 @@ case "$1" in
# If first time setup, initialize site and wiki
if [ ! -d "$datadir/deploy" ]; then
- echo "Adding default pages ..."
- localwiki-manage loaddata basic_pages
-
echo "Configuring apache ..."
mkdir "$datadir/deploy"
cp "$confdir/localwiki.wsgi.template" "$datadir/deploy/localwiki.wsgi"
9 sapling/utils/management/commands/setup_all.py
View
@@ -2,6 +2,11 @@
from django.core.management import call_command
+def has_pages():
+ from pages.models import Page
+ return Page.objects.all()
+
+
class Command(BaseCommand):
help = ('Sets up the localwiki install. '
'Only run this command on a fresh install.')
@@ -11,3 +16,7 @@ def handle(self, *args, **options):
call_command('migrate', verbosity=0)
call_command('collectstatic', interactive=False, verbosity=0)
call_command('reset_permissions', verbosity=0)
+
+ if not has_pages():
+ print "Adding basic pages.."
+ call_command('loaddata', 'basic_pages')
Please sign in to comment.
Something went wrong with that request. Please try again.