Git Product home page Git Product logo

1hph's Introduction

One Hour Photo Hunt

Installation Instructions

Non-Python dependencies

  1. MySQL
  2. Apache2

Package requirements (Ubuntu)

apache2, mysql-server python-setuptools python-mysqldb python-dev git-core subversion libapache2-mod-wsgi build-essential libjpeg-dev libpng12-dev rabbitmq-server memcached

Non-package requirements

celeryd (http://ask.github.com/celery/getting-started/broker-installation.html)

Installation

sudo easy_install -U virtualenv
virtualenv gonzo
source gonzo/bin/activate
easy_install -U pip

Next, install 1hph from git and all of its dependencies

pip install -e [email protected]:paulcwatts/1hph.git#egg=1hph
pip install -U -r gonzo/src/1hph/requirements.txt

Configuration

Next you'll need to create a local settings module to add your specific database settings and SECRET_KEY. This can live anywhere in the Python path, and can be specified using the environment variable GONZO_LOCAL_SETTINGS_MODULE. The default is 'gonzo.local_settings'.

TODO: Use the gonzo.wsgi file template to hook into Apache.

Database

Step-by-step instructions to set up MySQL.

mysql -u root -p
(enter password)

mysql> create database gonzo;
mysql> create user 'gonzo'@'localhost' identified by 'some_pass';
mysql> grant all privileges on *.* to 'gonzo'@'localhost' with grant option;

Use this user in your Django settings.

Syncing the database

Once you have your database and Apache configuration set up, you can then sync the Django DB to MySQL:

source gonzo/bin/activate
django-admin.py syncdb --settings=gonzo.settings --pythonpath=<path_to_local_settings>

1hph's People

Contributors

paulcwatts avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

1hph's Issues

Metagame

This is an "uber-story" that encompasses all the stuff we need to implement the metagame. Fill this out as needed.

Feeds

Add RSS/Atom feeds for Hunts, Comments, and a User's Activity stream.

Submission buttons

For each photo, you should be able to mark it as inappropriate, or delete it if you are the person who submitted it.

Good robots.txt

Create a good robots.txt so search engines don't crawl some pages.

Geolocation

  1. Read user's geolocation using the Geolocation API
  2. Display it on somewhere in the UI (their profile?)
  3. Reverse Geocode using Twitter's API.
  4. Use this as the lat/lon for submissions.

Once we have Twitter submissions, get the latitude/longitude via the Tweet.
Next, we may be able to find it in the photo.

Test Plan

Create a wiki page that lists all the test cases that we should begin to build unit tests for.

Google Analytics

Make this enabled by settings, and enable it on the production server.

Email submissions deserve a reply

Current behavior:
If you submit via email, there is no reply. The user needs to go to the site to see whether or not the submission succeeded.

Desired behavior:
Reply to the email, and include a link to the photo.

Submissions via Twitter

Twitter users who send a picture to @1hph with the proper hashtag will be added to the hunt. Standard submission rules apply.

Big TODO: How do we extract the file from whatever twitter upload service they use? Hopefully there's some metadata we can use.

Basic mobile site

Sign-in, view current hunts, submit photos, vote. It doesn't need to be fancy.

Client-side form validation

For all client forms, use the jQuery form validation plugin to verify the form before the user clicks "submit."

OAuth on API

This needs to be finished if we ever want to make our API public.

User can delete submissions

They need to have some ability to remove submissions they create.

This should be integrated with some form of "button overlay" for all images that will provide buttons for other photo-related actions, like "mark as inappropriate"

Aux pages

Write basic copy for the Help, TOS, Privacy Policy, About us, and Learn More pages.

Unable to create a new user from Twitter if the Twitter screen name is already an existing username

Repro:

  1. Create a user in the normal way with a username 'X'
  2. Attempt to use "sign-in with Twitter" on a new user whose Twitter screen name is also 'X'

Actual:
3. There's a TODO in gonzo.webapp.account.views.twitter_postauth because in this situation an exception would be thrown if we tried to create a new user with that screen name.

Expected:
3. The new Twitter user should get the opportunity to create a new user name to complete signup.

Email submission: exceptions are sent back to the user

Current behavior:
Right now if the email submission code throws an exception for some reason, this is sent back to the user as a failed email.

Desired behavior:
Send back a better response, and put the backtrace somewhere we might care about it.

Stream API

Similar to Twitter's stream API, use a long-lived connection and stream Javascript callbacks for "push" notifications.

/media is missing cache expiration

Need to set up mod_expires so our Apache-served resources can be cached. That's why we serve them from Apache in the first place.

Also, add a Cache-Control: public so proxies can cache stuff.

SSL works properly

Current SSL is disabled. What we need to do:

  1. Get our correct SSL certificates for 1hph.com and dev.1hph.com
  2. Install those in Apache and create the appropriate virtual hosts.
  3. Test that the account/sign in pages use HTTPS.
  4. Test that we leave HTTPS when leaving the account sign in pages.

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.