Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3014b7b
Showing
1,393 changed files
with
152,285 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
development.db | ||
_build | ||
settings_local.py | ||
fab_settings_local.py | ||
*.pyc | ||
.coverage | ||
media/uploads |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
CMS Core - Django boilerplate | ||
============================= | ||
|
||
This is a base for future CMS projects. | ||
|
||
The goal is to create a system which will run many CMS sites from one | ||
main directory with this Django project | ||
|
||
Currently based only on django-fiber | ||
|
||
Install | ||
------- | ||
|
||
.. code-block:: python | ||
mkvirtualenv cms-core --no-site-packages | ||
workon cms-core | ||
git clone git://github.com/zalun/cms-core.git | ||
cd cms-core | ||
pip install -r requirements/compiled.rst | ||
pip install -r requirements/production.pip | ||
mkdir -w media/uploads | ||
# create local config (especially database access) | ||
vi settings_local.py | ||
# create database | ||
./manage.py syncdb | ||
./manage.py migrate) | ||
License | ||
------- | ||
Mozilla Public License |
Empty file.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
{% load fiber_tags %} | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>{% block title %}{{ fiber_page.title }}{% endblock %}</title> | ||
<link rel="stylesheet" href="{{ STATIC_URL }}css/base.css"> | ||
</head> | ||
<body class="{% block body_class %}{{ fiber_page.title|slugify }}{% endblock %}"> | ||
<div id="wpr-page"> | ||
<div id="page"> | ||
<header> | ||
<div id="logo">Django Fiber example</div> | ||
<nav id="mainmenu" class="clearfix"> | ||
{% show_menu "mainmenu" 1 1 %} | ||
</nav> | ||
</header> | ||
<aside id="aside-left"> | ||
<nav id="submenu"> | ||
{% show_menu "mainmenu" 2 3 %} | ||
</nav> | ||
</aside> | ||
<section id="main"> | ||
<nav id="breadcrumbs" class="clearfix"> | ||
<ul> | ||
{% for fiber_page in fiber_current_pages %} | ||
<li> | ||
<a href="{{ fiber_page.get_absolute_url }}">{{ fiber_page.title }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
<article> | ||
{% show_page_content "main" %} | ||
</article> | ||
</section> | ||
<aside id="aside-right"> | ||
{% show_page_content "aside" %} | ||
|
||
{% show_content "address" %} | ||
</aside> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from fabric.api import env, local, run | ||
|
||
|
||
def ve_prepare_cmd(cmd): | ||
"""Switch to virtual environment and before command | ||
""" | ||
return """ | ||
export WORKON_HOME=%s && | ||
source %s && | ||
workon %s && | ||
%s | ||
""" % (env.workondir, env.ve_wrapper, env.virtualenv, cmd) | ||
|
||
|
||
def ve_local(cmd, *args, **kwargs): | ||
return local(ve_prepare_cmd(cmd), *args, **kwargs) | ||
|
||
|
||
def ve_run(cmd, *args, **kwargs): | ||
return run(ve_prepare_cmd(cmd), *args, **kwargs) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import os | ||
|
||
# jsFiddle generic pplications | ||
APPS = ['base'] | ||
ALLAPPS = APPS[:] | ||
|
||
PROJECT_DEV = 0 # edit all apps | ||
PROJECT_PRODUCTION = 1 # do not edit | ||
|
||
GIT_ORIGIN = None | ||
|
||
# install APPS from master branch, but do not prepare them to be edited | ||
PROJECT_TYPE = PROJECT_PRODUCTION | ||
|
||
SERVERS = { | ||
'local': 'localhost', | ||
'stage': None, | ||
'production': None} | ||
|
||
BRANCH = { | ||
'local': 'master', | ||
'production': 'production'} | ||
|
||
# Directory project files | ||
# Uses the fabfile as reference | ||
LOCAL_DIR = { | ||
'local': os.path.abspath(os.path.dirname(__file__)), | ||
'production': None} | ||
|
||
# usually directory above LOCAL_DIR - used to install apps for EDGE | ||
MAIN_DIR = { | ||
'local': '/'.join(LOCAL_DIR['local'].split('/')[0:-1]), | ||
'production': None} | ||
|
||
# Projectname defaults to lowercase main directory name | ||
PROJECT_NAME = MAIN_DIR['local'].split('/')[-1].lower() | ||
|
||
# Virtual environment name default to current PROJECT_NAME | ||
VIRTUALENV = { | ||
'local': PROJECT_NAME, | ||
'production': PROJECT_NAME} | ||
|
||
# Location of the virtualenvwrapper script | ||
VE_WRAPPER = { | ||
'local': '/usr/local/bin/virtualenvwrapper.sh', | ||
'production': '/usr/local/bin/virtualenvwrapper.sh'} | ||
|
||
WORKON_HOME = { | ||
'local': '~/Environments', | ||
'production': None} | ||
|
||
# coverage settings | ||
COVERAGE_MODULE_EXCLUDES = [ | ||
'tests$', 'settings$', '^urls$', 'locale$', | ||
'__init__', 'django', | ||
'migrations', 'fixtures', 'features', | ||
] | ||
# --------------------- | ||
# This is not used yet | ||
|
||
# defaults to projectname and $HOME defaults to /opt/DEPLOY_USER | ||
DEPLOY_USER = PROJECT_NAME | ||
USER_HOME = "/opt/%s" % DEPLOY_USER | ||
|
||
# Database name and user default to project user | ||
DATABASE_USER = DEPLOY_USER | ||
DATABASE_NAME = PROJECT_NAME |
Oops, something went wrong.