Skip to content

Commit

Permalink
Better install documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
batiste committed Sep 2, 2016
1 parent 25572ef commit a51acb9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
10 changes: 3 additions & 7 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@ Evaluate quickly the application

After you have installed all the dependencies you can simply create a website with the gerbi command::

gerbi --create mywebsite
$ pip install -r https://github.com/batiste/django-page-cms/raw/master/requirements/install.txt; pip install django-page-cms; gerbi --create mywebsite

Then visit http://127.0.0.1:8000/admin/ and create a few pages.
Then visit http://127.0.0.1:8000/


Install dependencies by using pip
==================================

The pip install is the easiest and the recommended installation method. Use::

$ sudo easy_install pip
$ curl -O https://github.com/batiste/django-page-cms/raw/master/requirements/all.txt
$ sudo pip install -r all.txt

Every package listed in the ``all.txt`` should be downloaded and installed.
$ pip install -r https://github.com/batiste/django-page-cms/raw/master/requirements/install.txt; pip install django-page-cms

If you are not using the source code version of the application then install it using::

Expand Down
21 changes: 16 additions & 5 deletions pages/management/commands/pages_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
from pages.tests.testcase import new_page
from django.contrib.auth import get_user_model

lorem = """Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Quisque tempus tellus enim, quis tempus dui pretium non.
Cras eget enim vel magna fringilla cursus ut sit amet mi.
Curabitur id pharetra turpis. Pellentesque quis eros nunc.
Etiam interdum nisi ut sapien facilisis ornare. Mauris in tellus elit.
Integer vulputate venenatis odio. Vivamus in diam vitae magna gravida
sodales sit amet id ex. Aliquam commodo massa at mollis blandit.
Donec auctor sapien et risus gravida, ultrices imperdiet est laoreet."""


class Command(BaseCommand):
help = 'Create a couple of dummy pages for a demo'

Expand All @@ -13,20 +23,21 @@ def handle(self, *args, **options):
UserModel.objects.create(username='demo', password='demo')

new_page(content={
'title': 'Home', 'slug': 'home', 'lead': 'Welcome to the Gerbi CMS'
'title': 'Home', 'slug': 'home', 'lead': 'Welcome to the Gerbi CMS', 'content':lorem
}, template='index.html')
prod_page = new_page(content={
'title': 'Products', 'slug': 'products', 'lead': 'Our products'
'title': 'Products', 'slug': 'products', 'lead': 'Our products', 'content':lorem
}, template='index.html')
new_page(content={
'title': 'Poney', 'slug': 'poney', 'lead': 'Our shiny poney'},
'title': 'Poney', 'slug': 'poney', 'lead': 'Our shiny poney', 'content':lorem},
parent=prod_page,
template='index.html')
new_page(content={
'title': 'Hat', 'slug': 'hat', 'lead': 'Fedora for elegance'},
'title': 'Hat', 'slug': 'hat', 'lead': 'Fedora for elegance', 'content':lorem},
parent=prod_page,
template='index.html')
new_page(content={
'title': 'Contact', 'slug': 'products', 'lead': 'Contact us at gerbi@example.com'
'title': 'Contact', 'slug': 'products',
'lead': 'Contact us at gerbi@example.com', 'content':lorem
}, template='index.html')

1 change: 1 addition & 0 deletions requirements/all.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# All the dependencies required for running the CMS
-r base.txt
-e git+https://github.com/django-haystack/django-haystack@42f53cda9a770ff7daf2ff792cbcab5cd843e2a7#egg=django-haystack
Markdown>=2.6.6,<2.7.0
Expand Down
2 changes: 2 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Basic dependencies required for running the CMS
# Keep that commented or tox will explode
# Django>=1.8,<1.10
django-mptt>=0.8.3,<0.9.0
six>=1.10.0,<1.11.0
Expand Down
3 changes: 3 additions & 0 deletions requirements/install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Requirement used in the documentation and install
Django>=1.8,<1.10
-r all.txt

0 comments on commit a51acb9

Please sign in to comment.