prepare 0.3.1; DjangoCMS integration app

This commit is contained in:
Artur Barseghyan 2014-11-19 00:47:07 +01:00
parent 6c7c4a42c4
commit e66bd2e1e0
42 changed files with 773 additions and 38 deletions

View file

@ -1,5 +1,11 @@
Release history and notes
=====================================
0.3.1
-------------------------------------
2014-11-19
- DjangoCMS integration app.
0.3
-------------------------------------
2014-11-09
@ -11,7 +17,7 @@ need to do is update the app paths in the ``settings`` module of your project.
- Minor core improvements related to the themeing of the form handler plugins.
- Several presentational form element plugins have been renamed.
The ``fobi.contrib.plugins.form_elements.content.image`` plugin has been
renamed to `fobi.contrib.plugins.form_elements.content.content_image`.
renamed to ``fobi.contrib.plugins.form_elements.content.content_image``.
The ``fobi.contrib.plugins.form_elements.content.text`` plugin has been
renamed to ``fobi.contrib.plugins.form_elements.content.content_text``.
The ``fobi.contrib.plugins.form_elements.content.video`` plugin has been
@ -19,7 +25,7 @@ need to do is update the app paths in the ``settings`` module of your project.
If you have used any of the above mentioned plugins, make sure to update
the app paths in the ``settings`` module of your project.
- The ``fobi.contrib.plugins.form_elements.content.dummy`` plugin has been moved
to ``fobi.contrib.plugins.form_elements.text.dummy`` location. If you have
to ``fobi.contrib.plugins.form_elements.test.dummy`` location. If you have
used it, make sure to update the its' path in the ``settings`` module of
your project.
- Added readme to the following content form element plugins: ``dummy``,

View file

@ -25,7 +25,7 @@ recursive-include src/fobi/contrib/themes/foundation5/templates *
recursive-include src/fobi/contrib/themes/foundation5/widgets/form_handlers/db_store_foundation5_widget/templates *
recursive-include src/fobi/contrib/themes/simple/templates *
#recursive-include src/fobi/contrib/apps/djangocms_integration/templates *
recursive-include src/fobi/contrib/apps/djangocms_integration/templates *
#recursive-include src/fobi/contrib/apps/feincms_integration/templates *
recursive-include src/fobi/contrib/plugins/form_elements/content/content_image/templates *

View file

@ -56,6 +56,7 @@ Main features and highlights
- Theming. There are 3 ready to use themes bundled: Bootstrap 3, Foundation 5
and Simple (in style of Django admin).
- Implemented integration with FeinCMS (in a form of a FeinCMS Page widget).
- Implemented integration with DjangoCMS (in a form of a DjangoCMS Page plugin).
- Reordering of form elements using drag-n-drop.
- Data export (``db_store`` form handler plugin) into XLS/CSV format.

View file

@ -217,13 +217,22 @@ Should haves
+ Make it possible to use a custom user model.
+ Improve the "Simple" theme (Django admin integration part).
+ Place a basic README.rst in each plugin.
- Make it possible to use something else than Django's ORM (django-mongoengine,
SQLAlchemy).
+ As another prove of concept, write an integration app for Django-CMS.
+ Add birthday field.
+ Add data export features to ``db_store`` plugin.
+ Make 3 base templates for the DjangoCMS integration app. Save things in
settings and make the template to be chosen depending on the fobi_theme (
likely, move the declation of the FOBI_THEME above the declaration of the
Django-CMS templates).
- Rename the ``birthday`` field to ``date_drop_down`` field.
- Make a real ``birthday`` field (with no year selection).
- Improve the Django-CMS integration app (make sure it works with
Django-CMS < 3.0).
- Make it possible to use something else than Django's ORM (django-mongoengine,
SQLAlchemy).
- Fix the view saved form entries template (nicer look) for Foundation 5
theme.
- Fix the input_format option in the date and datetime fields.
- Fix the ``input_format`` option in the date and datetime fields.
- Finish form importers concept and the MailChimp form importer plugin.
- Make sure it's possible to assign CSS and JS files to the form handler
plugins.
@ -267,7 +276,6 @@ Could haves
- Add datetime range and date range fields.
- Add a property "allow_multiple" to the form handlers, for form handlers.
- Make a django theme for jquery UI.
- As another prove of concept, write an integration app for Django-CMS.
- Base fieldset. Allow users to add more than one field to a fieldset.
- Make it possible (just checkbox) to set a fieldset as clonable.
- Confugure defaults values of each plugin in projects' settings module.
@ -279,7 +287,7 @@ Could haves
- Finish select multiple model objects plugin (issue with processing form data
on form submit).
- Add option to redirect to another page.
- Conditional inputs
- Conditional inputs.
- Perhaps, completely re-write the base template for the foundation 5 theme?
Would haves

View file

@ -36,6 +36,14 @@ fobi.contrib.apps.djangocms_integration.defaults module
:undoc-members:
:show-inheritance:
fobi.contrib.apps.djangocms_integration.helpers module
------------------------------------------------------
.. automodule:: fobi.contrib.apps.djangocms_integration.helpers
:members:
:undoc-members:
:show-inheritance:
fobi.contrib.apps.djangocms_integration.models module
-----------------------------------------------------

View file

@ -56,6 +56,7 @@ Main features and highlights
- Theming. There are 3 ready to use themes bundled: Bootstrap 3, Foundation 5
and Simple (in style of Django admin).
- Implemented integration with FeinCMS (in a form of a FeinCMS Page widget).
- Implemented integration with DjangoCMS (in a form of a DjangoCMS Page plugin).
- Reordering of form elements using drag-n-drop.
- Data export (``db_store`` form handler plugin) into XLS/CSV format.

View file

@ -1,5 +1,4 @@
Django>=1.5,<1.8
FeinCMS>=1.9,<1.10
Jinja2
MarkupSafe
MySQL-python

View file

@ -0,0 +1,5 @@
django-cms==3.0.6
#django-cms==2.4.1
djangocms-picture
djangocms-snippet
djangocms-text-ckeditor

View file

@ -0,0 +1 @@
FeinCMS>=1.9,<1.10

View file

@ -10,6 +10,7 @@ And to activate the app index dashboard::
ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'admin_tools_dashboard.CustomAppIndexDashboard'
"""
from django.conf import settings
from django.utils.translation import ugettext, ugettext_lazy as _
from admin_tools.dashboard import modules, Dashboard, AppIndexDashboard
@ -42,13 +43,23 @@ class CustomIndexDashboard(Dashboard):
]
))
# FeinCMS pages
self.children.append(modules.AppList(
_('Pages'),
models = conf.feincms_pages,
collapsible = False,
deletable = False
))
if 'feincms' in settings.INSTALLED_APPS:
# FeinCMS pages
self.children.append(modules.AppList(
_('FeinCMS Pages'),
models = conf.feincms_pages,
collapsible = False,
deletable = False
))
if 'cms' in settings.INSTALLED_APPS:
# DjangoCMS pages
self.children.append(modules.AppList(
_('DjangoCMS Pages'),
models = conf.djangocms_pages,
collapsible = False,
deletable = False
))
# Append an app list module for "Administration"
self.children.append(modules.AppList(

View file

@ -24,6 +24,11 @@ fobi_data = [
feincms_pages = [
'page.*',
]
djangocms_pages = [
'cms.models.*',
]
# *******************************
# ************ Django ***********
# *******************************

View file

@ -6,6 +6,7 @@ To activate your custom menu add the following to your settings.py::
ADMIN_TOOLS_MENU = 'admin_tools_dashboard.menu.CustomMenu'
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
@ -38,11 +39,19 @@ class CustomMenu(Menu):
]
))
# FeinCMS pages integration
self.children.append(items.AppList(
_('Pages'),
models = conf.feincms_pages
))
if 'feincms' in settings.INSTALLED_APPS:
# FeinCMS pages integration
self.children.append(items.AppList(
_('FeinCMS Pages'),
models = conf.feincms_pages
))
if 'cms' in settings.INSTALLED_APPS:
# DjangoCMS pages integration
self.children.append(items.AppList(
_('DjangoCMS Pages'),
models = conf.djangocms_pages
))
# append an app list module for "Administration"
self.children.append(items.AppList(

View file

@ -0,0 +1,2 @@
#workon fobi
./manage.py runserver 0.0.0.0:8000 --settings=settings_bootstrap3_theme_djangocms --traceback -v 3

View file

@ -295,6 +295,20 @@ FOBI_CUSTOM_THEME_DATA = {
),
],
},
'djangocms_integration': {
'form_template_choices': [
(
'fobi/bootstrap3_extras/view_embed_form_entry_ajax.html',
gettext("Custom bootstrap3 embed form view template")
),
],
'success_page_template_choices': [
(
'fobi/bootstrap3_extras/embed_form_entry_submitted_ajax.html',
gettext("Custom bootstrap3 embed form entry submitted template")
),
],
},
},
'foundation5': {
'page_header_html_class': '',
@ -317,6 +331,20 @@ FOBI_CUSTOM_THEME_DATA = {
),
],
},
'djangocms_integration': {
'form_template_choices': [
(
'fobi/foundation5_extras/view_embed_form_entry_ajax.html',
gettext("Custom foundation5 embed form view template")
),
],
'success_page_template_choices': [
(
'fobi/foundation5_extras/embed_form_entry_submitted_ajax.html',
gettext("Custom foundation5 embed form entry submitted template")
),
],
},
},
'simple': {
'page_header_html_class': '',
@ -327,6 +355,8 @@ FOBI_CUSTOM_THEME_DATA = {
'form_primary_button_html_class': 'btn-primary',
'feincms_integration': {
},
'djangocms_integration': {
},
}
}
@ -435,20 +465,31 @@ except:
pass
if DEBUG and DEBUG_TOOLBAR:
# debug_toolbar
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
try:
# Make sure the django-debug-toolbar is installed
import debug_toolbar
INSTALLED_APPS += (
'debug_toolbar',
)
# debug_toolbar
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}
INSTALLED_APPS += (
'debug_toolbar',
)
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}
except ImportError:
pass
if DEBUG and TEMPLATE_DEBUG:
INSTALLED_APPS += (
'template_debug',
)
try:
# Make sure the django-template-debug is installed
import template_debug
INSTALLED_APPS += (
'template_debug',
)
except ImportError:
pass

View file

@ -0,0 +1,67 @@
from settings import *
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS += [
'cms', # DjangoCMS
'mptt',
'menus',
'sekizai',
#'djangocms_admin_style',
# Some plugins
'djangocms_picture',
'djangocms_snippet',
'fobi.contrib.apps.djangocms_integration', # Fobi DjangoCMS app
#'djangocms_page', # Example
]
try:
#INSTALLED_APPS.remove('admin_tools') \
# if 'admin_tools' in INSTALLED_APPS else None
#INSTALLED_APPS.remove('admin_tools.menu') \
# if 'admin_tools.menu' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.dashboard') \
if 'admin_tools.dashboard' in INSTALLED_APPS else None
except Exception as e:
pass
MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES)
MIDDLEWARE_CLASSES += [
#'django.middleware.cache.UpdateCacheMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
#'django.middleware.cache.FetchFromCacheMiddleware',
]
TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS)
TEMPLATE_CONTEXT_PROCESSORS += [
'cms.context_processors.media',
'sekizai.context_processors.sekizai',
'cms.context_processors.cms_settings',
]
FOBI_DEFAULT_THEME = 'bootstrap3'
#FOBI_DEFAULT_THEME = 'foundation5'
#FOBI_DEFAULT_THEME = 'simple'
CMS_TEMPLATES = (
('cms_page/{0}/page_with_sidebar.html'.format(FOBI_DEFAULT_THEME),
'General template with sidebar for {0}'.format(FOBI_DEFAULT_THEME)),
('cms_page/{0}/page_without_sidebar.html'.format(FOBI_DEFAULT_THEME),
'General template without sidebar for {0}'.format(FOBI_DEFAULT_THEME)),
)
MIGRATION_MODULES = {
'cms': 'cms.migrations_django',
'menus': 'menus.migrations_django',
}
LANGUAGE_CODE = 'en'
#FEINCMS_RICHTEXT_INIT_CONTEXT = {
# 'TINYMCE_JS_URL': STATIC_URL + 'tiny_mce/tiny_mce.js',
#}

View file

@ -9,6 +9,13 @@ INSTALLED_APPS += [
'page', # Example
]
try:
#INSTALLED_APPS.remove('admin_tools') if 'admin_tools' in INSTALLED_APPS else None
#INSTALLED_APPS.remove('admin_tools.menu') if 'admin_tools.menu' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.dashboard') if 'admin_tools.dashboard' in INSTALLED_APPS else None
except Exception as e:
pass
FEINCMS_RICHTEXT_INIT_CONTEXT = {
'TINYMCE_JS_URL': STATIC_URL + 'tiny_mce/tiny_mce.js',
}

View file

@ -0,0 +1,3 @@
=====================================
django.contrib.admin custom templates
=====================================

View file

@ -0,0 +1,3 @@
============================
DjangoCMS page templates
============================

View file

@ -0,0 +1,162 @@
{% load static i18n cms_tags sekizai_tags menu_tags placeholder_tags %}
<!DOCTYPE html>
<html lang="en"{% block html-attributes %}{% endblock html-attributes %}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
{% block favicon %}
<link rel="shortcut icon" href="{% block favicon-image %}{% endblock favicon-image %}">
{% endblock favicon %}
<title>{% block page-title %}{% page_attribute page_title %}{% endblock page-title %} | {% block site-title %}{% endblock site-title %}</title>
{% block stylesheets %}
{#<!-- Additional core CSS files that somehow can't be put into the python theme -->#}
{% endblock stylesheets %}
{% block theme-stylesheets %}
{#<!-- This is where stylesheets declared in the Python theme are listed -->#}
{% for css_file in fobi_theme.get_media_css %}
<link href="{% static css_file %}" rel="stylesheet" media="all" />
{% endfor %}
{% endblock theme-stylesheets %}
{% block extra-stylesheets %}
<!-- Custom styles for this template -->
<link href="{% static 'css/fobi_example_page.css' %}" rel="stylesheet">
{% endblock extra-stylesheets %}
{% block head-javascripts %}
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
{% endblock head-javascripts %}
{% block extra-head-javascripts %}{% endblock extra-head-javascripts %}
{% block extrahead %}{% endblock extrahead %}
{% render_block "css" %}
</head>
<body{% block body-attrs %}{% if fobi_theme %} class="theme {{ fobi_theme.html_class }}"{% endif %}{% endblock body-attrs %}>
{% cms_toolbar %}
{% block before-main-wrapper %}
{% endblock %}
{% block main-wrapper %}
{% block navbar-wrapper %}
<div class="{% block navbar-class %}{% endblock navbar-class %}" role="navigation">
{% block navbar %}
<div class="{% block navbar-container-class %}{% endblock navbar-container-class %}">
{% block navbar-content %}
{% block navbar-header %}
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<a class="navbar-brand" href="{{ fobi_dashboard_url }}">{{ fobi_theme.project_name }}</a>
</div>
{% endblock navbar-header %}
{% block navbar-menu-wrapper %}
<div class="collapse navbar-collapse">
{% block navbar-menu %}
<ul class="nav navbar-nav">
{% block navbar-menu-content %}
{% endblock navbar-menu-content %}
</ul>
{% endblock navbar-menu %}
</div><!-- /.nav-collapse -->
{% endblock navbar-menu-wrapper %}
{% endblock navbar-content %}
</div><!-- /.container -->
{% endblock navbar %}
</div><!-- /.navbar -->
{% endblock navbar-wrapper %}
{% block main-content-wrapper %}
<div class="container">
{% block messages-wrapper %}
{% include fobi_theme.messages_snippet_template_name %}
{% endblock messages-wrapper %}
{% block main-content %}
<div class="row row-offcanvas row-offcanvas-right">
<div{#% block main-content-inner-attrs %#} class="col-xs-12 col-sm-9"{#% endblock main-content-inner-attrs %#}>
{% block responsive-nav %}
<p class="pull-right visible-xs">
<button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">Toggle nav</button>
</p>
{% endblock responsive-nav %}
{% block content-wrapper %}
<div class="row">
<div class="{% block content-class %}col-18 col-sm-18 col-lg-12{% endblock content-class %}">
{% block content %}
{% endblock content %}
</div><!--/span-->
</div><!--/row-->
{% endblock content-wrapper %}
</div><!--/span-->
{% block sidebar-wrapper %}
<div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
{% block sidebar %}
<div class="list-group">
{% block sidebar-content %}
{% endblock sidebar-content %}
</div>
{% endblock sidebar %}
</div><!--/span-->
{% endblock sidebar-wrapper %}
</div><!--/row-->
{% endblock main-content %}
{% block content-footer-separator %}
<hr>
{% endblock content-footer-separator %}
{% block footer-wrapper %}
<footer>
{% block footer %}
<p>{% block footer-content %}{{ fobi_theme.footer_text|safe }}{% endblock footer-content %}</p>
{% endblock footer %}
</footer>
{% endblock footer-wrapper %}
</div><!--/.container-->
{% endblock main-content-wrapper %}
{% endblock main-wrapper %}
{% block javascripts %}
{#<!-- Theme core JavaScript that somehow can't be put into the Python theme -->#}
{#<!-- Placed at the end of the document so the pages load faster, although might be changed, if plugins need it to be otherwise -->#}
{% endblock javascripts %}
{% block theme-javascripts %}
{#<!-- This is where javascripts declared in the Python theme are listed -->#}
{% for js_file in fobi_theme.get_media_js %}
<script src="{% static js_file %}"></script>
{% endfor %}
{% endblock theme-javascripts %}
{% render_block "js" %}
</body>
</html>

View file

@ -0,0 +1,5 @@
=======================================
Bootstrap3 page templates for DjangoCMS
=======================================
DjangoCMS templates for the Bootstrap3 theme
(``fobi.contrib.themes.bootstrap3``).

View file

@ -0,0 +1,9 @@
{% extends "cms_page/base.html" %}
{% load i18n %}
{% block navbar-class %}navbar navbar-fixed-top navbar-inverse{% endblock navbar-class %}
{% block navbar-container-class %}container{% endblock navbar-container-class %}
{% block site-title %}{% trans "DjangoCMS Bootstrap 3 example" %}{% endblock site-title %}

View file

@ -0,0 +1,11 @@
{% extends "cms_page/bootstrap3/base.html" %}
{% load cms_tags menu_tags placeholder_tags %}
{% block content %}
{% placeholder page_content %}
{% endblock %}
{% block sidebar-content %}
{% placeholder page_sidebar %}
{% endblock %}

View file

@ -0,0 +1,10 @@
{% extends "cms_page/bootstrap3/base.html" %}
{% load cms_tags menu_tags placeholder_tags %}
{% block main-content %}
{% placeholder page_content %}
{% endblock %}
{% block sidebar-content %}
{% endblock %}

View file

@ -0,0 +1,5 @@
========================================
Foundation5 page templates for DjangoCMS
========================================
DjangoCMS templates for the Foundation5 theme
(``fobi.contrib.themes.foundation5``).

View file

@ -0,0 +1,160 @@
{% extends "cms_page/base.html" %}
{# Foundation 5 master base template #}
{% load i18n static %}
{% block html-attributes %} class="no-js"{% endblock html-attributes %}
{% block site-title %}{% trans "DjangoCMS Foundation 5 example" %}{% endblock site-title %}
{% block navbar-wrapper %}
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1>
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<a href="{{ fobi_dashboard_url }}">
{{ fobi_theme.project_name }}
</a>
</h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
{% block navbar-menu-content %}
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">Main Item 1</a>
<ul class="dropdown">
<li><label>Section Name</label></li>
<li class="has-dropdown">
<a href="#" class="">Has Dropdown, Level 1</a>
<ul class="dropdown">
<li><a href="#">Dropdown Options</a></li>
<li><a href="#">Dropdown Options</a></li>
<li><a href="#">Level 2</a></li>
<li><a href="#">Subdropdown Option</a></li>
<li><a href="#">Subdropdown Option</a></li>
<li><a href="#">Subdropdown Option</a></li>
</ul>
</li>
<li><a href="#">Dropdown Option</a></li>
<li><a href="#">Dropdown Option</a></li>
<li class="divider"></li>
<li><label>Section Name</label></li>
<li><a href="#">Dropdown Option</a></li>
<li><a href="#">Dropdown Option</a></li>
<li><a href="#">Dropdown Option</a></li>
<li class="divider"></li>
<li><a href="#">See all &rarr;</a></li>
</ul>
</li>
<li class="divider"></li>
<li><a href="#">Main Item 2</a></li>
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">Main Item 3</a>
<ul class="dropdown">
<li><a href="#">Dropdown Option</a></li>
<li><a href="#">Dropdown Option</a></li>
<li><a href="#">Dropdown Option</a></li>
<li class="divider"></li>
<li><a href="#">See all &rarr;</a></li>
</ul>
</li>
{% endblock navbar-menu-content %}
</ul>
</section>
</nav>
{% endblock navbar-wrapper %}
{% block navbar-content %}
<!-- Navigation -->
<nav class="top-bar" data-topbar>
<ul class="title-area">
<!-- Title Area -->
<li class="name">
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<h1>
<a href="{{ fobi_dashboard_url }}">{{ fobi_theme.project_name }}</a>
</h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#"><span>menu</span></a>
</li>
</ul>
<section class="top-bar-section">
<ul class="left">
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<li{% if request.path == fobi_dashboard_url %} class="active"{% endif %}>
<a href="{{ fobi_dashboard_url }}">{% trans "Home" %}</a>
</li>
</ul>
</section>
</nav><!-- End Navigation -->
{% endblock navbar-content %}
{% block responsive-nav %}{% endblock responsive-nav %}
{% block main-content-wrapper %}
{% block messages-wrapper %}
{% include fobi_theme.messages_snippet_template_name %}
{% endblock messages-wrapper %}
{% block main-content %}
<div class="row {#left#}">
<div{% block main-content-inner-attrs %} class="large-12 columns"{% endblock main-content-inner-attrs %}>
<!-- Content -->
{% block content-wrapper %}
{% block content %}
<h3>Get in Touch!</h3>
<hr>
<h4 class="subheader">Risus ligula, aliquam nec fermentum vitae, sollicitudin eget urna. Donec
dignissim nibh fermentum odio ornare sagittis.</h4>
<div class="show-for-small" style="text-align: center">
<a class="small radius button" href="#">Call To Action!</a><br>
<a class="small radius button" href="#">Call To Action!</a>
</div>
{% endblock content %}
{% endblock content-wrapper %}
{% block sidebar-wrapper %}
<div class="large-4 columns hide-for-small">
{% block sidebar %}
{% block sidebar-content %}
<h4>Get In Touch!</h4>
<hr>
<a href="#">
<div class="panel radius callout" style="text-align: center">
<strong>Call To Action!</strong>
</div></a> <a href="#">
<div class="panel radius callout" style="text-align: center">
<strong>Call To Action!</strong>
</div></a>
{% endblock sidebar-content %}
{% endblock sidebar %}
</div><!-- End Content -->
{% endblock sidebar-wrapper %}
</div>
</div>
{% endblock main-content %}
{% endblock main-content-wrapper %}

View file

@ -0,0 +1,15 @@
{% extends "cms_page/foundation5/base.html" %}
{% load cms_tags menu_tags placeholder_tags %}
{% block content %}
{% placeholder page_content %}
{% endblock %}
{% block sidebar-content %}
{% placeholder page_sidebar %}
{% endblock %}
{% block navbar-menu-content %}
{% endblock navbar-menu-content %}

View file

@ -0,0 +1,13 @@
{% extends "cms_page/foundation5//base.html" %}
{% load cms_tags menu_tags placeholder_tags %}
{% block content %}
{% placeholder page_content %}
{% endblock %}
{% block sidebar-content %}
{% endblock %}
{% block navbar-menu-content %}
{% endblock navbar-menu-content %}

View file

@ -0,0 +1,4 @@
========================================
Simple page templates for DjangoCMS
========================================
DjangoCMS templates for the Simple theme (``fobi.contrib.themes.simple``).

View file

@ -0,0 +1,104 @@
{% load static future_compat i18n cms_tags sekizai_tags menu_tags placeholder_tags %}<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}{% block html-attributes %}{% endblock html-attributes %}>
<head>
<title>{% block page-title %}{% endblock page-title %} | {% block site-title %}{% trans "DjangoCMS Simple example" %}{% endblock site-title %}</title>
{% block extrastyle %}{% endblock %}
{% block stylesheets %}
{#<!-- Additional core CSS files that somehow can't be put into the python theme -->#}
{% endblock stylesheets %}
{% block theme-stylesheets %}
{#<!-- This is where stylesheets declared in the Python theme are listed -->#}
{% for css_file in fobi_theme.get_media_css %}
<link href="{% static css_file %}" rel="stylesheet" media="all" />
{% endfor %}
{% endblock theme-stylesheets %}
{% block extra-stylesheets %}{% endblock extra-stylesheets %}
{% block head-javascripts %}
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
{% endblock head-javascripts %}
{% block extra-head-javascripts %}{% endblock extra-head-javascripts %}
{% block extrahead %}{% endblock extrahead %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
{% render_block "css" %}
</head>
{% load i18n %}
<body class="{% block bodyclass %}{% if fobi_theme %} theme {{ fobi_theme.html_class }}{% endif %}{% endblock %}">
{% cms_toolbar %}
{% block main-wrapper %}
<!-- Container -->
<div id="container">
{% block messages %}
{% if messages %}
<ul class="messagelist">{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
{% endfor %}</ul>
{% endif %}
{% endblock messages %}
{% block main-content-wrapper %}
<!-- Content -->
{% block main-content %}
{% block content-wrapper %}
{% block content %}
{{ content }}
{% endblock %}
{% endblock content-wrapper %}
{% block sidebar-wrapper %}
{% block sidebar %}{% endblock %}
{% endblock sidebar-wrapper %}
{% endblock main-content %}
<!-- END Content -->
{% block footer-wrapper %}
{% block footer %}<div id="footer"></div>{% endblock %}
{% endblock footer-wrapper %}
{% endblock main-content-wrapper %}
</div>
<!-- END Container -->
{% endblock main-wrapper %}
{% block javascripts %}
{#<!-- Theme core JavaScript that somehow can't be put into the Python theme -->#}
{#<!-- Placed at the end of the document so the pages load faster, although might be changed, if plugins need it to be otherwise -->#}
{% endblock javascripts %}
{% block theme-javascripts %}
{#<!-- This is where javascripts declared in the Python theme are listed -->#}
{% for js_file in fobi_theme.get_media_js %}
<script src="{% static js_file %}"></script>
{% endfor %}
{% endblock theme-javascripts %}
{% render_block "js" %}
</body>
</html>

View file

@ -0,0 +1,11 @@
{% extends "cms_page/simple/base.html" %}
{% load cms_tags menu_tags placeholder_tags %}
{% block main-content %}
{% placeholder page_content %}
{% endblock %}
{% block sidebar-content %}
{% placeholder page_sidebar %}
{% endblock %}

View file

@ -0,0 +1,10 @@
{% extends "cms_page/simple//base.html" %}
{% load cms_tags menu_tags placeholder_tags %}
{% block main-content %}
{% placeholder page_content %}
{% endblock %}
{% block sidebar-content %}
{% endblock %}

View file

@ -0,0 +1,5 @@
===========================================================
Custom templates for fobi.contrib.apps.feincms_integration
===========================================================
Custom templates for rendering the form and the thanks page to be used in
FeinCMS.

View file

@ -0,0 +1,4 @@
===========================================================
Custom project home templates for various themes
===========================================================

View file

@ -0,0 +1,3 @@
============================
FeinCMS page templates
============================

View file

@ -0,0 +1,4 @@
===========================================================
django-registration templates
===========================================================
The ``django-registration`` templates for ``fobi``.

View file

@ -66,6 +66,13 @@ if 'feincms' in settings.INSTALLED_APPS:
url(r'^pages/', include('feincms.urls')),
)
# Conditionally including DjangoCMS URls in case if
# DjangoCMS in installed apps.
if 'cms' in settings.INSTALLED_APPS:
urlpatterns += patterns('',
url(r'^cms-pages/', include('cms.urls')),
)
# Conditionally including Captcha URls in case if
# Captcha in installed apps.
if 'captcha' in settings.INSTALLED_APPS:

10
install_djangocms.sh Executable file
View file

@ -0,0 +1,10 @@
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
pip install -r examples/requirements.txt
pip install -r examples/requirements_djangocms.txt
python setup.py install
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
mkdir -p examples/media/fobi_plugins/file
python examples/simple/manage.py collectstatic --noinput --settings=settings_bootstrap3_theme_djangocms --traceback -v 3
python examples/simple/manage.py syncdb --noinput --settings=settings_bootstrap3_theme_djangocms --traceback -v 3
python examples/simple/manage.py migrate --noinput --settings=settings_bootstrap3_theme_djangocms --traceback -v 3
python examples/simple/manage.py fobi_create_test_data --settings=settings_bootstrap3_theme_djangocms --traceback -v 3

View file

@ -1,5 +1,6 @@
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
pip install -r examples/requirements.txt
pip install -r examples/requirements_feincms.txt
python setup.py install
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
mkdir -p examples/media/fobi_plugins/file

3
reinstall_djangocms.sh Executable file
View file

@ -0,0 +1,3 @@
reset
./uninstall.sh
./install_djangocms.sh

View file

@ -18,7 +18,7 @@ template_dirs = [
"src/fobi/contrib/themes/foundation5/widgets/form_handlers/db_store_foundation5_widget", # DB Store widget for Foundation 5
"src/fobi/contrib/themes/simple/templates/simple", # Simple
#"src/fobi/contrib/apps/djangocms_integration/templates/djangocms_integration", # DjangoCMS integration
"src/fobi/contrib/apps/djangocms_integration/templates/djangocms_integration", # DjangoCMS integration
#"src/fobi/contrib/apps/feincms_integration/templates/feincms_integration", # FeinCMS integration
"src/fobi/contrib/plugins/form_elements/content/content_image/templates/content_image", # Content image
@ -57,7 +57,7 @@ for static_dir in static_dirs:
for locale_dir in locale_dirs:
locale_files += [os.path.join(locale_dir, f) for f in os.listdir(locale_dir)]
version = '0.3'
version = '0.3.1'
install_requires = [
'Pillow>=2.0.0',

View file

@ -1,6 +1,6 @@
__title__ = 'django-fobi'
__version__ = '0.3'
__build__ = 0x000010
__version__ = '0.3.1'
__build__ = 0x00000b
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = 'Copyright (c) 2014 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'

View file

@ -43,6 +43,8 @@
</head>
<body{% block body-attrs %}{% if fobi_theme %} class="theme {{ fobi_theme.html_class }}"{% endif %}{% endblock body-attrs %}>
{% block before-main-wrapper %}{% endblock %}
{% block main-wrapper %}
{% block navbar-wrapper %}