kopia lustrzana https://github.com/rtts/django-simplecms
New helper command: simplecms
rodzic
a69d51a0dc
commit
25350b4706
28
README.md
28
README.md
|
@ -1,23 +1,15 @@
|
||||||
Django Simple CMS
|
# Django Simple CMS
|
||||||
=================
|
|
||||||
|
|
||||||
Hello stranger! You have stumbled on my personal Django boilerplate
|
*A super simple but very extensible content management system for
|
||||||
repository. It contains all those code fragments that I find myself
|
Django websites.*
|
||||||
writing over and over again when I create websites for clients.
|
|
||||||
There's models for Pages and Sections in the `cms` app, as well as
|
|
||||||
some basic HTML and CSS designs. There's a NumberedModel in the
|
|
||||||
`numberedmodel` app. There's simple SASS compiler in `simplesass`.
|
|
||||||
|
|
||||||
With these apps it's very simple to setup a basic website. Simply use
|
This project provides the basic building blocks of *Pages* and
|
||||||
the project template from the `examples` directory as a starting
|
*Sections* and all the views needed to display and edit them.
|
||||||
point. Then run the following Django commands:
|
|
||||||
|
|
||||||
$ ./manage.py migrate
|
## Installation
|
||||||
$ ./manage.py createsuperuser
|
|
||||||
$ ./manage.py runserver --nostatic
|
|
||||||
|
|
||||||
(The `--nostatic` argument is needed to make `simplesass` work.)
|
Use the provided helper command `simplecms` to quickly setup a new
|
||||||
|
project:
|
||||||
|
|
||||||
Now point your browser to http://localhost:8000/ and there will be a
|
pip install https://github.com/rtts/django-simplecms.git
|
||||||
website ready to be edited using the CMS views! All you need to do
|
simplecms mysite
|
||||||
next is to hire a graphic designer ;-)
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
test -z $1 && echo "Please provide a project name!" && exit 1
|
||||||
|
test -d $dev/$1 && echo "That project already exists!" && exit 1
|
||||||
|
|
||||||
|
mkdir $1 && cd $1
|
||||||
|
pip3 freeze > requirements.txt
|
||||||
|
examples_dir=$(python3 -c 'import os,examples;print(os.path.dirname(examples.__file__))')
|
||||||
|
cp -r $examples_dir/{project,app,manage.py} .
|
||||||
|
sed -i s/example/$1/ project/settings.py
|
||||||
|
|
||||||
|
# Assume the user has sudo access to postgres
|
||||||
|
sudo su postgres -c "createuser $1; createdb -O $1 $1" || true
|
||||||
|
|
||||||
|
cat << EOF > .gitignore
|
||||||
|
*.pyc
|
||||||
|
__pycache__/
|
||||||
|
EOF
|
||||||
|
|
||||||
|
./manage.py migrate
|
||||||
|
./manage.py createsuperuser
|
||||||
|
./manage.py runserver --nostatic
|
|
@ -1,10 +0,0 @@
|
||||||
--no-binary :all:
|
|
||||||
Django
|
|
||||||
django-ckeditor
|
|
||||||
django-extensions
|
|
||||||
django-embed-video
|
|
||||||
django-polymorphic
|
|
||||||
easy-thumbnails
|
|
||||||
psycopg2
|
|
||||||
libsass
|
|
||||||
swapper
|
|
6
setup.py
6
setup.py
|
@ -9,11 +9,17 @@ setup(
|
||||||
author_email = 'jj@rtts.eu',
|
author_email = 'jj@rtts.eu',
|
||||||
license = 'GPL3',
|
license = 'GPL3',
|
||||||
packages = find_packages(),
|
packages = find_packages(),
|
||||||
|
scripts = ['bin/simplecms'],
|
||||||
include_package_data = True,
|
include_package_data = True,
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'django',
|
'django',
|
||||||
'django-ckeditor',
|
'django-ckeditor',
|
||||||
|
'django-extensions',
|
||||||
'django-embed-video',
|
'django-embed-video',
|
||||||
|
'django-polymorphic',
|
||||||
'easy-thumbnails',
|
'easy-thumbnails',
|
||||||
|
'psycopg2',
|
||||||
|
'libsass',
|
||||||
|
'swapper',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue