Skip to content

Instantly share code, notes, and snippets.

@eculver
Forked from chrisglass/install_django_cms.sh
Created January 12, 2011 20:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eculver/776851 to your computer and use it in GitHub Desktop.
Save eculver/776851 to your computer and use it in GitHub Desktop.
script to automagically create a django-cms-based project
#!/bin/bash
# This should be run on a relatvely modern version of Ubuntu (9.10 or later,
# without any sort of confidence)
PROJECT_NAME=$1
if [ x$PROJECT_NAME = "x" ] ; then
# No project name!
echo "Usage: $0 <project name>"
exit 1
fi
echo "********************************************************"
echo "This will install the following GLOBALLY:"
echo ""
echo "django-cms, setuptools, PIL, pip, South, appmedia, classytags"
echo ""
echo "This is not 'the right way' to install Django-CMS and should"
echo "be considered for demonstration purposes only."
echo "For a proper installation procedure, please refer to the"
echo "django-cms documentation at:"
echo "http://docs.django-cms.org"
echo "********************************************************"
echo "Are you sure you want to install? (y/n)"
read answer
if [ $answer != 'y' ] ; then
exit 1
fi
sudo aptitude install python2.6 python-setuptools python-imaging
sudo easy_install pip
sudo pip install django-cms south django-appmedia
django-admin.py startproject $PROJECT_NAME
cd $PROJECT_NAME
rm settings.py
rm urls.py
wget https://gist.github.com/raw/776313/settings.py
wget https://gist.github.com/raw/776313/urls.py
mkdir templates
cd templates
wget wget https://gist.github.com/raw/776313/example.html
cd ..
python manage.py syncdb --all
python manage.py migrate --fake
python manage.py runserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment