diff --git a/QUICKSTART.rst b/QUICKSTART.rst index 6c89d9749..8b81fafe8 100644 --- a/QUICKSTART.rst +++ b/QUICKSTART.rst @@ -17,7 +17,22 @@ Now you find a directory named 'feincms' in your development directory. This is $ mv feincms/ myFeinCMSSite -Now you can choose between the quickstart variant which takes about a minute (depending on your network connection) or the manual setup, which is as easy as the quickstart variant, but let's you understand what your doing. if you are doing this the first time choose the manual variant, as it's taking you only a minute longer. +Now you can choose between the quickstart variant which takes about a minute (depending on your network connection) or the manual setup, which is as easy as the quickstart variant, but let's you understand what your doing. + + +Quickstart Variant +------------------- + +Change into your project folder and run the setup script + +:: + + $ cd myFeinCMSSite + $ ./quickstart-virtualenv.sh # (or use ./quickstart.sh instead if you want to install the development versions of the libraries from git, like the manual variant does) + +Wait while django and mptt are being fetched and then follow the on-screen instructions to start the runserver and enjoy the installation. + +The username and password for the examples admin-interface are 'admin' and 'password'. Manual Setup Variant @@ -48,27 +63,8 @@ Step into the example app and start the runserver The username and password for the examples admin-interface are 'admin' and 'password' -Quickstart Variant -------------------- - -Change into your project folder and run the setup script - -:: - - $ cd myFeinCMSSite - $ ./quickstart.sh - -Wait while django and mptt are being fetched and then follow the on-screen instructions to start the runserver and enjoy the installation - -:: - - $ cd example - $ ./manage.py runserver - -The username and password for the examples admin-interface are 'admin' and 'password' - Further Steps -------------------- +------------- Feel free to delete all files you do not need for your installation: diff --git a/README.rst b/README.rst index 4ea3407c4..52d45f52c 100644 --- a/README.rst +++ b/README.rst @@ -87,7 +87,7 @@ do not have an IRC client you can use the Quickstart ---------- -You can find a short quickstart guide at QUICKSTART.rst +You can find a short quickstart guide at QUICKSTART.rst (or just run ./quickstart-virtualenv.sh). Optional Packages ----------------- diff --git a/example/requirements.txt b/example/requirements.txt new file mode 100644 index 000000000..43f3207cc --- /dev/null +++ b/example/requirements.txt @@ -0,0 +1,3 @@ +Django==1.4 +django-mptt==0.5.2 +PIL==1.1.7 diff --git a/feincms/module/page/models.py b/feincms/module/page/models.py index eaddcfb5f..0d1d49c44 100644 --- a/feincms/module/page/models.py +++ b/feincms/module/page/models.py @@ -143,11 +143,11 @@ class Page(create_base_model(MPTTModel)): parent = models.ForeignKey('self', verbose_name=_('Parent'), blank=True, null=True, related_name='children') parent.parent_filter = True # Custom list_filter - see admin/filterspecs.py in_navigation = models.BooleanField(_('in navigation'), default=True) - override_url = models.CharField(_('override URL'), max_length=300, blank=True, + override_url = models.CharField(_('override URL'), max_length=255, blank=True, help_text=_('Override the target URL. Be sure to include slashes at the beginning and at the end if it is a local URL. This affects both the navigation and subpages\' URLs.')) - redirect_to = models.CharField(_('redirect to'), max_length=300, blank=True, + redirect_to = models.CharField(_('redirect to'), max_length=255, blank=True, help_text=_('Target URL for automatic redirects.')) - _cached_url = models.CharField(_('Cached URL'), max_length=300, blank=True, + _cached_url = models.CharField(_('Cached URL'), max_length=255, blank=True, editable=False, default='', db_index=True) request_processors = SortedDict() diff --git a/quickstart-virtualenv.sh b/quickstart-virtualenv.sh new file mode 100755 index 000000000..d9e84c17c --- /dev/null +++ b/quickstart-virtualenv.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# This script downloads all the software needed to run FeinCMS +# +# The difference from quickstart.sh is that this script sets up a virtualenv +# with release versions of the software instead of downloading the +# development versions from git +# + +PYTHON_VERSION=2.7 +ENV_DIR=~/env/feincms + +PYTHON=python${PYTHON_VERSION} +PIP=pip + +# Use virtualenv if present, fall back to virtualenv-2.7 if not. +VIRTUALENV=virtualenv +hash "${VIRTUALENV}" 2>&- || VIRTUALENV=virtualenv-${PYTHON_VERSION} + +# Set PIP_DOWNLOAD_CACHE if it isn't already set. If it's already set then +# it's more efficient to re-use the existing cache than to have a separate +# one for this app. +if [ "${PIP_DOWNLOAD_CACHE}" == "" ]; then + export PIP_DOWNLOAD_CACHE=~/env/cache +fi + +echo Installing required packages into $ENV_DIR... \(this will take some time\) + +if [ ! -d "${ENV_DIR}" ] ; then + # If the virtualenv doesn't yet exist, then create it. + mkdir -p `dirname "${ENV_DIR}"` + "${VIRTUALENV}" --no-site-packages --distribute --python=${PYTHON} "${ENV_DIR}" + . "${ENV_DIR}"/bin/activate + ${PIP} install -r example/requirements.txt -E "${ENV_DIR}" +fi + +cat <