It builds the boring stuff, so you can build the cool stuff Friday, June 25, 2010
Oct 18, 2014
It builds the boring stuff,
so you can build the cool stuff
Friday, June 25, 2010
Websites are mostly
“infrastructure”
The fun stuff
Caching
Taxonomies
Media Handling
Staff Management
User Management
Server Configuration
Unique
Features
The boring stuff
Friday, June 25, 2010
Web teams
have their own ways of
doing things
Friday, June 25, 2010
A builder of boring stuff for
opinionated developers
Calloway
Friday, June 25, 2010
Principles
• Integration without dependency
• User interface for content managers is
important
• Easy customization through overrides
and fallbacks
• So simple a designer could do it
Friday, June 25, 2010
Integration Without
Dependency
Friday, June 25, 2010
if 'staff' in global_settings.INSTALLED_APPS: from staff.models import StaffMember as AuthorModelelse: from django.contrib.auth.models import User as AuthorModel
from django.conf import settingsfrom django.db.models import get_modelAUTHOR_MODEL = getattr(settings, 'STORY_AUTHOR_MODEL', 'auth.user')AuthorModel = get_model(AUTHOR_MODEL.split('.'))
authors = models.ManyToManyField(AuthorModel, verbose_name=_('Authors'), blank=True, null=True)
Dynamic Relations
Integrate with
another app, if
available.
Or allow the
developer to
decide.
Either way,
implementation is
still simple.
Friday, June 25, 2010
if 'categories' in global_settings.INSTALLED_APPS: HAS_CATEGORIES = True from categories.fields import CategoryM2MField, CategoryFKFieldelse: HAS_CATEGORIES = False
if HAS_CATEGORIES: primary_category = CategoryFKField( related_name='primary_story_set') categories = CategoryM2MField(blank=True)
Optional Features
Friday, June 25, 2010
Other Add-ons
Rich Text Editing
Positioning of
content
Some applications can simply augment
others, without modification
Friday, June 25, 2010
User Interface for
Content Managers is
Important
Friday, June 25, 2010
You can make your own dashboard modules
Friday, June 25, 2010
Menus are easily
customized by project
Friday, June 25, 2010
We took the edit inline to a new level
Friday, June 25, 2010
Still a few CSS issues
The quick edit form is specified in admin.py
Friday, June 25, 2010
Icon sets are included!
Friday, June 25, 2010
A lightbox view of images only makes sense
Friday, June 25, 2010
Many-to-Many Generic Relations
Friday, June 25, 2010
Allows for different presentations...
Friday, June 25, 2010
...of related content
Friday, June 25, 2010
Easy customizations
through overrides and
fallbacks
Friday, June 25, 2010
Overriding Settings
Calloway settings.py
ADMIN_MEDIA_PREFIXAPPEND_SLASH
AUTHENTICATION_BACKENDSMEDIA_ROOT
MIDDLEWARE_CLASSESROOT_URLCONFSITE_ID
TEMPLATE_CONTEXT_PROCESSORS
Friday, June 25, 2010
Overriding Settings
Project settings.py
from calloway.settings import *
AUTHENTICATION_BACKENDSMEDIA_ROOT
from local_settings import *
Calloway settings.py
ADMIN_MEDIA_PREFIXAPPEND_SLASH
AUTHENTICATION_BACKENDSMEDIA_ROOT
MIDDLEWARE_CLASSESROOT_URLCONFSITE_ID
TEMPLATE_CONTEXT_PROCESSORS
Friday, June 25, 2010
Overriding Settings
Project settings.py
from calloway.settings import *
AUTHENTICATION_BACKENDSMEDIA_ROOT
from local_settings import *
Calloway settings.py
ADMIN_MEDIA_PREFIX APPEND_SLASH
AUTHENTICATION_BACKENDSMEDIA_ROOT
MIDDLEWARE_CLASSESROOT_URLCONFSITE_ID
TEMPLATE_CONTEXT_PROCESSORS
local_settings.py
MEDIA_ROOT
Friday, June 25, 2010
So simple a designer
could do it
talented
Friday, June 25, 2010
Calloway App
Pieces of Calloway
Internal snippets
Default Templates
Default Settings
External App
References
Project Creation
Template Project
start_project.py
Friday, June 25, 2010
Typical Workflow
• Execute start_project.py
• Answer questions
• Modify application bundles in INSTALLED_APPS
• Execute generate_reqs
• Execute pip install -r setup/requirements.txt
Friday, June 25, 2010
Details
• In production, but still a bit alpha
• Apache 2.0 license
• www.callowayproject.com
• github.com/callowayproject
Friday, June 25, 2010
More Details
• [email protected], @coordt
• opensource.washingtontimes.com
• github.com/coordt
• github.com/washingtontimes
Friday, June 25, 2010