Code Monkey home page Code Monkey logo

source's Introduction

source

Source is a website dedicated to "advocating for, shining a spotlight on, and helping to generate community around the code that's being written in journalism." It's built with Django, using Mozilla's Playdoh web app template.

Installation

Requirements

You need Python 2.6 or 2.7, Mozilla's funfactory, MySQL, git, virtualenv, and a Unix-like OS.

Setup

First, make sure you've got funfactory installed, because the Playdoh app template will need it.

pip install funfactory

Then:

  1. Fork and/or clone this Source repository from GitHub
  2. Set up a virtual environment for your new project
  3. Activate your virtualenv and cd into the project directory
  4. Fetch the submodule dependancies

git submodule update --init --recursive

And make sure you have all the development requirements

pip install -r requirements/dev.txt

Configuration

The app has a base settings file that can be found at source/settings/base.py, you can override any of the values there inside a local.py file.

cp source/settings/local.py-dist source/settings/local.py

Please ensure that you create your own SECRET_KEY and HMAC_KEY

You can point your database config to sqlite for quick testing, or if you'd rather use MySQL, you'll need to create a new database. Adjust the DATABASES dict in source/settings/local.py accordingly, and then

python manage.py syncdb

The primary content apps are managed by django-south, so next run

python manage.py migrate articles python manage.py migrate code python manage.py migrate people

This repository includes a few fixtures with test articles, people, organizations and code records for you to play with. If you'd like to add them, next run

python manage.py loaddata test_data python manage.py loaddata taggit_test_data

And then it's time to fire it up!

python manage.py runserver

Now you should be able view your dev server at http://localhost:8000/

source's People

Contributors

cmcavoy avatar dansinker avatar davidascher avatar rossbruniges avatar ryanpitts avatar zararah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

source's Issues

active section doesn't highlight in nav

Hover over nav items and they highlight from light grey to dark. But when you click into a section, that highlight doesn't stick, so there's no visual indicator that you're in the right section.

Need an elegant hack to work around https on dev and http on live

Annoying fail with is not yet having an SSL cert on mozillaopennews.org

With https hardcoded into a couple of templates we need to think of a good way where we can work-around dev being under https and live being under http.

My solutuon - adding the protocol to settings and overriding on local.py on dev

"Knight-Mozilla OpenNews" image has a lot of jags

this one

I threw it on a black background so what I'm talking about is more visible. It blends okay on a pure white background, but on the Source site since it's laying on a grayish background, the jags are pretty noticeable (to me, at least). This could be because it was saved as an 8-bit PNG with a matte and 1 bit for the alpha channel. It should probably be saved as a 24-bit PNG with transparency so it blends better.

Server time?

Is it possible to set our server time to ET, or are we tied to PT? (Now that I know, it's not really a problem either way, but it was exciting this morning when I couldn't get articles published "now" to show up.)

Fixing text in Source launch page

https://source-dev.mozillalabs.com/en-US/articles/source-launches-oct-16/

I know that content is fluid but there's some awkwardness in the first paragraph under the subheading, "We need you."

It reads, "All year, at hackathons and conferences—and a mud-filled tent at SXSW—some of the smartest people I’ve ever have said the same thing: “how can I help?""

It probably should read "All year, at hackathons and conferences—and a mud-filled tent at SXSW—some of the smartest people I’ve ever known asked the same thing: “how can I help?”"

(But serious props for correctly using em dashes!)

Footer is wrong

Dan and I need to make Source footer content—the current stuff is all general OpenNews/Moz content, which is confusing.

Embedded "readme" file on site forces sideways scrolling

I'm looking at

http://source.mozillaopennews.org/en-US/code/django-newcache/

It has a "browse this repo" option, and when I select the "README.txt" file it shows me that file. So far so good.

Alas, the file is wider than the narrow screen space allotted to it, and I have to scroll sideways to see the file. This despite there being lots of white space on screen.

I'm not sure the best way of handling this, whether to display files in a smaller font, or to rearrange the grid so that the sidebar with the project owner doesn't get in the way of a full-width embedded project browser.

Thanks for building Source!

Ed

Bit of a performance review on media/js/listfilter.js

The show/hide code gets triggered on each keypress so we want it to be optimal enough.

Suggestions to look into (of the top of the head):

  • use .css instead of show()/hide() - less callbacks be triggered we're not using
  • ensure smallest ammount of repaints by hiding the list, doing the routine then showing when finished

unpublished articles show up on organization pages

I think that is why I encountered a page not found error. On this page: https://source-dev.mozillalabs.com/en-US/organizations/new-york-times/ If I try to access "New York Times' Ice" as an article at the bottom, it gives a 404 error. That article IS in the admin site, but it's not checked off as "display on site." https://source-dev.mozillalabs.com/admin/articles/article/15/

This might be more of a workflow thing (i.e. don't save unpublishable articles into django), but it could also be a display thing, such as to add "live on site" as a criteria for listing an article.

insecure content warnings

The page has insecure content, which different browsers deal with at varying levels of obnoxiousness. It might be worth seeing if you can get rid of them.

html in project blurbs

On the main "Code" page, the django-newcache project is escaping a link, like so:

Whereas when I click through to its own page, it's not, like so:

search appears to be skippig over common stop words

Searching for "in the spirit" on the Source site will find an article (using those quotes to force full sentence match), but "in the" does not find anything, suggesting that the search might be ignoring "common" words. Although it's an interesting subset. "in" and "the" don't work, "who" does (so if The Who ever wants to do something with Source, we're good! \o/)

Content layout for "Code" page

Love the site, but it feels difficult to actually browse the projects.

For instance: wide lines, lots of text, large fonts (so you can only see a few projects on the screen at a time).

I realize this could just be personal preference but I just feel like a portfolio would be a better metaphor for the Source project list than a blog. Are there plans to change the way projects are displayed on the Code page to move away from the social-river-style display and more into an explorable project gallery format?

Auto-refresh isn't working on Disqus widget login

This is a known issue on Disqus' end. Ticket is filed, and they're working on it. Latest correspondence: "The auto-refresh is definitely broken on HTTPS sites. We’re still doing some work on this and I’ll make sure this is getting addressed with those updates."

Noting here so that we're all aware that it's an outstanding issue, but not one we can fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.