calloway introduction

28
It builds the boring stuff, so you can build the cool stuff Friday, June 25, 2010

Post on 18-Oct-2014

2.009 views

Category:

Technology


1 download

DESCRIPTION

Introducing Calloway: a builder of boring web stuff for opinionated developers. Just released at http://www.callowayproject.com/ under the Apache 2.0 license. It quickly builds a web site infrastructure in a manner that developers can easily customize

TRANSCRIPT

Page 1: Calloway introduction

It builds the boring stuff,

so you can build the cool stuff

Friday, June 25, 2010

Page 2: Calloway introduction

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

Page 3: Calloway introduction

Web teams

have their own ways of

doing things

Friday, June 25, 2010

Page 4: Calloway introduction

A builder of boring stuff for

opinionated developers

Calloway

Friday, June 25, 2010

Page 5: Calloway introduction

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

Page 6: Calloway introduction

Integration Without

Dependency

Friday, June 25, 2010

Page 7: Calloway introduction

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

Page 8: Calloway introduction

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

Page 9: Calloway introduction

Other Add-ons

Rich Text Editing

Positioning of

content

Some applications can simply augment

others, without modification

Friday, June 25, 2010

Page 10: Calloway introduction

User Interface for

Content Managers is

Important

Friday, June 25, 2010

Page 11: Calloway introduction

You can make your own dashboard modules

Friday, June 25, 2010

Page 12: Calloway introduction

Menus are easily

customized by project

Friday, June 25, 2010

Page 13: Calloway introduction

We took the edit inline to a new level

Friday, June 25, 2010

Page 14: Calloway introduction

Still a few CSS issues

The quick edit form is specified in admin.py

Friday, June 25, 2010

Page 15: Calloway introduction

Icon sets are included!

Friday, June 25, 2010

Page 16: Calloway introduction

A lightbox view of images only makes sense

Friday, June 25, 2010

Page 17: Calloway introduction

Many-to-Many Generic Relations

Friday, June 25, 2010

Page 18: Calloway introduction

Allows for different presentations...

Friday, June 25, 2010

Page 19: Calloway introduction

...of related content

Friday, June 25, 2010

Page 20: Calloway introduction

Easy customizations

through overrides and

fallbacks

Friday, June 25, 2010

Page 21: Calloway introduction

Overriding Settings

Calloway settings.py

ADMIN_MEDIA_PREFIXAPPEND_SLASH

AUTHENTICATION_BACKENDSMEDIA_ROOT

MIDDLEWARE_CLASSESROOT_URLCONFSITE_ID

TEMPLATE_CONTEXT_PROCESSORS

Friday, June 25, 2010

Page 22: Calloway introduction

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

Page 23: Calloway introduction

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

Page 24: Calloway introduction

So simple a designer

could do it

talented

Friday, June 25, 2010

Page 25: Calloway introduction

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

Page 26: Calloway introduction

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

Page 27: Calloway introduction

Details

• In production, but still a bit alpha

• Apache 2.0 license

• www.callowayproject.com

• github.com/callowayproject

Friday, June 25, 2010

Page 28: Calloway introduction

More Details

[email protected], @coordt

• opensource.washingtontimes.com

• github.com/coordt

• github.com/washingtontimes

Friday, June 25, 2010