Giter Site home page Giter Site logo

favouriteq's Introduction

#favouriteQ

What's your favourite question?

Follow @favouriteq for daily questions

Another Gunt London production


##Installation

###Database

Create a mysql database called favouriteq

Create tables for apps that aren't using south

./manage.py syncdb

Create tables for apps that are using south. Data will be loaded from fixtures

./manage.py migrate

During development developers should continue to run the ./manage.py migrate command to keep their DB up to date.

###Virtual environment

Create virtual environment

virtualenv --no-site-packages env

(if you don't have virtualenv, install it: sudo pip install virtualenv)

(if you don't have pip, install it: sudo easy_install pip)

Activate virtual environment

source env/bin/activate

###Dependencies

From the root

pip install -r requirements/requirements.txt

###Run

From the root

cd favouriteQ
python manage.py runserver

Open http://127.0.0.1:8000/ in a browser

###Deploy Live

Note you will need to have installed requirements so you have fabric on your machine.

From the root

cd favouriteQ
fab production deploy

If you want less verbose output

fab production deploy --hide=stdout

favouriteq's People

Contributors

pxg avatar orangespaceman avatar k0ng avatar

Stargazers

JT5D avatar

Watchers

James Cloos avatar Remi Shergold avatar

favouriteq's Issues

Send out a summary tweet at the end of a question?

Consider sending a summary tweet at the end of a question - i.e. just before a new question is posted.

The summary tweet could feature notes about the previous question, e.g. how many people have replied, if there was a most popular answer, maybe a link to the archive page.

Save all tweets to the DB

This would require a DB migration but would be easier to track what's happen with tweets processed by the system.

Tweak nav

Change link to just 'suggest'

Put in a 'home' link (test between archive and home pages)

Catch exception when they are no questions to ask

python post_to_twitter.py
Traceback (most recent call last):
File "post_to_twitter.py", line 16, in
question = Question.objects.get_new_question()
File "/Users/pxg/Sites/favourite_q_django/favouriteQ/questions/models.py", line 15, in get_new_question
return questions[0]
File "/Users/pxg/Sites/favourite_q_django/env/lib/python2.7/site-packages/django/db/models/query.py", line 207, in getitem
return list(qs)[0]
IndexError: list index out of range

Friday Favourite

We should offer of a 6-pack of Guntweisers to the answer we think is best on Friday

Favourites Favourite

We can choose a favourite answer of the day. This shows on the site with a star by the
answer (maybe it's moved to the top too?). We could tweet the favourite when it's selected.

Next question

Add the ability to select the next question - this should de-prioritise all other questions (unlike the existing priority filter which allows multiple questions to have priority)

Add a 'maxlength' property to the suggest a question textarea

At the moment its absence is causing a JavaScript error. It should be present so we can display the character countdown.

Is there a character limit on the textarea? If not I suggest 140, as that's the number of characters that'll fit in a tweet. Shorter if we're also planning on tweeting who suggested the question.

(e.g. "Who is your favourite ginger? (via @thegingerbloke)"

Do something when there are no active questions left

Tweet a request for more questions instead (with a link that deeplinks to the #submit form)

Maybe also email us to remind us to set a question - although we should really see the tweet and do this ourselves anyway

Search twitter cron job log instead of print

The current search twitter script prints it's output. This is good for debugging, however when it runs on cron the output is emailed to ec2-user this results in 1440 emails a day which is silly.

Research a better way to log this output. Would be nice to have a switch so the output can still be seen when scripts are run from the command line.

Generate new Twitter API keys

The current keys can be found in the Github history.

  1. Generate new API keys
  2. Update them in the private config repo
  3. Deploy to the live server - test they work (run the cron tasks manually)
  4. Delete the old keys.

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.