-
-
Save eculver/776851 to your computer and use it in GitHub Desktop.
script to automagically create a django-cms-based project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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