github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

sunlightlabs / django-brainstorm

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 37
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (3)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (3)
    • 0.2.1
    • 0.2.0
    • 0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

brainstorm idea voting app used to power feedback.sunlightfoundation.com — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

bump for 0.2.1 
jamesturk (author)
Wed Dec 09 11:22:56 -0800 2009
commit  60aedff443fa039100b8b1a64a694f14771abb39
tree    1fdf9517e6cb1431f1d4f1d86cca47531aefd83d
parent  0863c412932b6ed5247fdcaedf3f0ae2a91d336e
django-brainstorm /
name age
history
message
file CHANGELOG Wed Dec 09 11:22:56 -0800 2009 bump for 0.2.1 [jamesturk]
file LICENSE Wed Feb 25 08:42:20 -0800 2009 initial commit [jamesturk]
file MANIFEST.in Wed Dec 09 11:22:56 -0800 2009 bump for 0.2.1 [jamesturk]
file README.rst Wed Dec 09 11:22:56 -0800 2009 bump for 0.2.1 [jamesturk]
directory brainstorm/ Wed Dec 09 11:22:56 -0800 2009 bump for 0.2.1 [jamesturk]
file setup.py Wed Dec 09 11:22:56 -0800 2009 bump for 0.2.1 [jamesturk]
README.rst

django-brainstorm

Django app for creating a site with multiple areas to brainstorm ideas.

This app powers http://sunlightlabs.com/ideas/ and other similar sites.

django-brainstorm is a project of Sunlight Labs (c) 2009. Written by James Turk <jturk@sunlightfoundation.com>.

All code is under a BSD-style license, see LICENSE for details.

Source: http://github.com/sunlightlabs/django-brainstorm/

Requirements

python >= 2.4 django >= 1.0

Usage

  1. Add 'brainstorm' to your INSTALLED_APPS setting.

  2. Add a reference to brainstorm.urls somewhere in your urls.py:

    (r'^', include('brainstorm.urls')),  # something that looks like this
    
  3. Login to the django admin and create a subsite.

A subsite has a slug, name, description, theme, and a number of other options. The important two are theme and slug, slug dictates where the subsite will live and theme specifies the name of a theme template (see Creating Themes for details)

Creating Themes

A theme is represented by a single django template, currently kept at templates/themes/themename.html

Required Elements

The theme must include a content block that will be filled by the page, the theme should also include "idea_form.html" if you wish to use the generic idea submission form.

Example dynamic content block:

<!-- content -->
<div>
    <h2 id="secondLogo"><a href="http://mysite.com/subsite/">{{subsite.name}}</a></h2>
    <div id="featureBox">
        <p>project description</p>
    </div>

    <div id="ltColumn">
    {% block content %}
    {% endblock %}
    </div>

    <div id="rtColumn">
    <h3>Submit New Idea</h3>
        {% include "idea_form.html" %}
    </div>
    <div class="clear"></div>
</div>

Styling the Theme

Obviously the styling/design of the static portions of the theme is entirely within the hands of the designer. There are however a few dynamic sections which typically will need some form of styling.

index

The 'content' block of the index contains two divs: 'div#ideas' and 'div#pagination'.

'div#ideas' contains an list where each li is a pair of div.btnVote and div.voteContent. When a div.btnVote has been voted up it will have the additional class 'voted' to allow for additional styling.

'div.btnVote' contains the link 'a.vote_link' for voting and 'div.votes_counted' for displaying the current vote total.

'div.voteContent' contains an <h3> with the idea title, a div.commentMeta with the idea's submitter/date, and a <p> with the description.

idea

The content block of the idea page contains two divs: 'div#idea' and 'div#comments'.

'div#idea' contains a single pair of 'div.btnVote' and 'div.voteContent' (see index for description of these elements)

'div#comments' contains an <h3> with the number of comments, then an ordered list where each <li> has the following elements:

  • div.commentMeta which contains span.commentMetaAuthor and span.commentMetaDate
  • div.commentContent which contains a <p> with the comment itself

(TODO: comment form)

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server