Browse files

Merge branch 'voting'

  • Loading branch information...
2 parents a68a7e6 + 693bed8 commit 4353ead8554081629429cd1e10998f8bbff837f1 @potch potch committed Jan 10, 2011
View
3 apps/core/context_processors.py
@@ -3,7 +3,8 @@
def nav(request):
return {
'menu' : [
- ('Competition Home', 'home'),
+ ('Home', 'home'),
+ ('Gallery', 'games.view_list'),
('Rules', 'rules'),
('Judges', 'judges'),
('Prizes', 'prizes'),
View
20 apps/games/templates/games/game_listing.html
@@ -0,0 +1,20 @@
+<section class="game" id="game-{{ game.id }}">
+ <div class="thumb">
+ <div>
+ {% if game.screenshot_set.all %}
+ <img src="{{ game.screenshot_set.all.0.get_absolute_url }}">
+ {% endif %}
+ </div>
+ </div>
+ <h2><a href="{{ game.get_absolute_url }}">{{ game.name }}</a></h2>
+ <p>{{ game.description }}</p>
+ <nav>
+ <a class="action" href="{{ game.url }}">Play</a>
+ {% if game.source %}
+ <a class="action" href="{{ game.source }}">See the source</a>
+ {% endif %}
+ {% if mine and game.creator == request.user and settings.ALLOW_EDITING %}
+ <li><a href="{% url games.edit game.id %}">Edit</a></li>
+ {% endif %}
+ </nav>
+</section>
View
13 apps/games/templates/games/list.html
@@ -1,19 +1,10 @@
{% extends "games/base.html" %}
{% block content %}
- <h1>Games</h1>
+ <h1>Game Gallery</h1>
<article class="tile-list">
{% for game in games %}
- <section class="game" id="game-{{ game.id }}">
- <h2><a href="{{ game.get_absolute_url }}">{{ game.name }}</a></h2>
- <p>{{ game.description|truncatewords_html:40 }}</p>
- <ul class="links">
- <li><a href="{{ game.url }}">Play</a></li>
- {% if game.source %}
- <li><a href="{{ game.source }}">See the source</a></li>
- {% endif %}
- </ul>
- </section>
+ {% include "games/game_listing.html" %}
{% endfor %}
</article>
{% endblock %}
View
15 apps/games/templates/games/mine.html
@@ -3,20 +3,9 @@
{% block content %}
<h1>My Games</h1>
<article class="tile-list">
+ {% set mine=True %}
{% for game in games %}
- <section class="game" id="game-{{ game.id }}">
- <h2><a href="{{ game.get_absolute_url }}">{{ game.name }}</a></h2>
- <p>{{ game.description|truncatewords_html:40 }}</p>
- <ul class="links">
- {% if settings.ALLOW_EDITING %}
- <li><a href="{% url games.edit game.id %}">Edit</a></li>
- {% endif %}
- <li><a href="{{ game.url }}">Play</a></li>
- {% if game.source %}
- <li><a href="{{ game.source }}">See the source</a></li>
- {% endif %}
- </ul>
- </section>
+ {% include "games/game_listing.html" %}
{% empty %}
<h2>You haven't submitted any games yet.</h2>
{% endfor %}
View
12 apps/games/templates/games/view.html
@@ -8,7 +8,7 @@
<ul class="screenshots">
{% for screenshot in game.screenshot_set.all %}
<li id="screenshot-{{ screenshot.id }}">
- <img src="{{ screenshot.get_absolute_url }}" height="{{ screenshot.file.height }}" width="{{ screenshot.file.width }}">
+ <img src="{{ screenshot.get_absolute_url }}">
</li>
{% empty %}
<li>No Screenshots Available</li>
@@ -21,21 +21,21 @@
<section class="description">
<ul class="links">
- <li><a href="{{ game.url }}">Play the game</a></li>
+ <li><a class="action" href="{{ game.url }}">Play the game</a></li>
{% if game.source %}
- <li><a href="{{ game.source }}">See the source</a></li>
+ <li><a class="action" href="{{ game.source }}">See the source</a></li>
{% endif %}
{% if game.creator == request.user and settings.ALLOW_EDITING %}
- <li><a href="{% url games.edit game.id %}">Edit</a></li>
+ <li><a class="action" href="{% url games.edit game.id %}">Edit</a></li>
{% endif %}
</ul>
<h2>Description</h2>
- <p>{{ game.description|linebreaks }}</p>
+ {{ game.description|linebreaks }}
{% if game.resources %}
<h2>Resources Used</h2>
- <p>{{ game.resources|linebreaks }}</p>
+ {{ game.resources|linebreaks }}
{% endif %}
</section>
View
2 apps/games/urls.py
@@ -1,4 +1,4 @@
-from django.conf.urls.defaults import patterns, url, include
+from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('games.views',
url(r'^$', 'view_list', name='games.view_list'),
View
2 apps/static/templates/static/home.html
@@ -10,7 +10,7 @@ <h1 class="home-title">&lt;&#x200a;GAME_ON&#x200a;&gt;</h1>
</div>
{% if settings.ALLOW_SUBMISSIONS %}
<div class="button">
- <a href="{% url games.create %}"><br>ENTER NOW</a>
+ <a href="{% url vote.ballot %}"><br>VOTE NOW!</a>
</div>
{% endif %}
<img class="header-left" src="{{ MEDIA_URL }}img/ships-ani.png">
View
0 apps/vote/__init__.py
No changes.
View
9 apps/vote/forms.py
@@ -0,0 +1,9 @@
+from django import forms
+
+from vote.models import Vote
+
+
+class VoteForm(forms.ModelForm):
+ class Meta(object):
+ model = Vote
+ exclude = ('creator')
View
53 apps/vote/models.py
@@ -0,0 +1,53 @@
+import json
+from random import sample, shuffle
+
+from django.conf import settings
+from django.contrib.auth.models import User
+from django.db import models
+
+from core.models import ModelBase
+from games.models import Game
+
+
+SCORES = zip(range(1, 6), range(1, 6))
+
+
+class Ballot(ModelBase):
+ """An individual ballot with X random games."""
+ creator = models.ForeignKey(User)
+ games = models.TextField(blank=True)
+
+ def __unicode__(self):
+ return self.creator.username
+
+ def get_games(self):
+ ids = json.loads(self.games)
+ return Game.objects.filter(pk__in=ids)
+
+ def build_ballot(self):
+ """Collect X random games."""
+ if not self.games: # Don't regenerate the ballot.
+ ids = Game.objects.filter(is_approved=True).values_list('pk', flat=True)
+ ids = sample(ids, min(len(ids), settings.BALLOT_SIZE))
+ shuffle(ids)
+ self.games = json.dumps(ids)
+ return self
+
+ @classmethod
+ def get_or_create(cls, user):
+ try:
+ return cls.objects.get(creator=user)
+ except cls.DoesNotExist:
+ ballot = Ballot(creator=user)
+ ballot.build_ballot().save()
+ return ballot
+
+
+class Vote(ModelBase):
+ creator = models.ForeignKey(User)
+ game = models.ForeignKey(Game)
+ score = models.SmallIntegerField(choices=SCORES, default=1)
+
+ def __unicode__(self):
+ tup = self.creator.username, self.game.name, self.score
+ return u'%s: %s: %s' % tup
View
32 apps/vote/templates/vote/ballot.html
@@ -0,0 +1,32 @@
+{% extends "vote/base.html" %}
+{% load voting_tags %}
+
+{% block content %}
+ <h1>Vote on Games</h1>
+
+ <ol class="ballot">
+ {% for game in ballot.get_games %}
+ <li>
+ <section class="game" id="game-{{ game.id }}">
+ <h2><a href="{{ game.get_absolute_url }}">{{ game.name }}</a></h2>
+ <form class="vote" action="{% url vote.vote %}" method="post">
+ {% csrf_token %}
+ {% vote_score for request.user game as score %}
+ <input type="hidden" name="game" value="{{ game.id }}"/>
+ <div class="stars stars-{{ score }}">
+ <label><input type="radio" name="score" value="1" {% if score == 1 %}checked="checked"{% endif %} /></label>
+ <label><input type="radio" name="score" value="2" {% if score == 2 %}checked="checked"{% endif %} /></label>
+ <label><input type="radio" name="score" value="3" {% if score == 3 %}checked="checked"{% endif %} /></label>
+ <label><input type="radio" name="score" value="4" {% if score == 4 %}checked="checked"{% endif %} /></label>
+ <label><input type="radio" name="score" value="5" {% if score == 5 %}checked="checked"{% endif %} /></label>
+ </div>
+ <input type="submit" value="Vote"/>
+ <a target="_blank" class="action" href="{{ game.url }}">Play</a>
+ </form>
+ </section>
+ </li>
+ {% endfor %}
+ </ol>
+
+{% endblock %}
+
View
3 apps/vote/templates/vote/base.html
@@ -0,0 +1,3 @@
+{% extends "base.html" %}
+
+{% block class %}ballot{% endblock %}
View
0 apps/vote/templatetags/__init__.py
No changes.
View
23 apps/vote/templatetags/voting_tags.py
@@ -0,0 +1,23 @@
+from django import template
+
+from templatetag_sugar.register import tag
+from templatetag_sugar.parser import Constant, Variable, Optional, Name
+
+from vote.models import Vote
+
+
+register = template.Library()
+
+
+@tag(register, [Constant("for"), Variable(), Variable(),
+ Optional([Constant("as"), Name()])])
+def vote_score(context, user, game, asvar=None):
+ try:
+ score = Vote.objects.get(creator=user, game=game).score
+ except Vote.DoesNotExist:
+ score = 0
+ if asvar:
+ context[asvar] = score
+ return ""
+ else:
+ return score
View
9 apps/vote/urls.py
@@ -0,0 +1,9 @@
+from django.conf.urls.defaults import patterns, url
+
+from vote import views
+
+
+urlpatterns = patterns('',
+ url(r'^$', views.ballot, name='vote.ballot'),
+ url(r'^/vote$', views.vote, name='vote.vote'),
+)
View
42 apps/vote/views.py
@@ -0,0 +1,42 @@
+from django.contrib.auth.decorators import login_required
+from django.http import HttpResponse, HttpResponseBadRequest
+from django.shortcuts import get_object_or_404
+from django.views.decorators.http import require_POST
+
+from core.template import render
+from games.models import Game
+from vote.forms import VoteForm
+from vote.models import Ballot, Vote
+
+
+@login_required
+def ballot(request):
+ """Display the list of games this user can vote on."""
+ ballot = Ballot.get_or_create(request.user)
+
+ return render(request, 'vote/ballot.html', {'ballot': ballot})
+
+
+@login_required
+@require_POST
+def vote(request):
+ """Create or update a game rating.
+
+ The game must be in the user's ballot.
+
+ """
+
+ ballot = get_object_or_404(Ballot, creator=request.user)
+
+ form = VoteForm(request.POST)
+
+ if form.is_valid():
+ game = get_object_or_404(Game, pk=form.cleaned_data['game'].id)
+ if not game in ballot.get_games():
+ return HttpResponseBadRequest(mimetype='application/json')
+ vote, created = Vote.objects.get_or_create(creator=request.user,
+ game=game)
+ vote.score = form.cleaned_data['score']
+ vote.save()
+ return HttpResponse(mimetype='application/json')
+ return HttpResponseBadRequest(mimetype='application/json')
View
91 media/css/forms.css
@@ -22,10 +22,9 @@ form textarea {
width: 310px;
}
-form input[type=submit] {
+form input[type=submit], a.action {
+ text-decoration: none;
cursor: pointer;
- min-width: 10em;
- margin: 0 0 0 208px;
border: 0;
font-family: Matiz, Helvetica, Arial, sans-serif;
color: #fff;
@@ -34,7 +33,11 @@ form input[type=submit] {
text-transform: uppercase;
text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
-form input[type=submit]:hover {
+form input[type=submit] {
+ min-width: 10em;
+ margin: 0 0 0 208px;
+}
+form input[type=submit]:hover, a.action:hover {
color: #FDEB6A;
}
ul.errorlist + label:before {
@@ -92,3 +95,83 @@ label.optional:after {
margin: 4px 0;
}
+form.vote input[type="submit"] {
+ display: none;
+}
+
+form.vote.changed input[type="submit"] {
+ display: inline;
+}
+
+/* ballot */
+.stars input {
+ visibility: hidden;
+ width: 26px;
+ height: 22px;
+ padding: 0;
+ margin: 0;
+}
+.stars label {
+ display: block;
+ width: 26px;
+ height: 22px;
+ padding: 0;
+ margin: 0;
+ float: left;
+ cursor: pointer;
+}
+.stars label:hover {
+ opacity: .7;
+ background-image: url(/media/img/stars.png);
+}
+.stars {
+ background-image: url(/media/img/stars.png);
+ background-position: 0 50%;
+ background-repeat: no-repeat;
+ margin-right: 0.5em;
+ width: 130px;
+ height: 22px;
+ float: right;
+ display: inline-block;
+}
+.stars-4 {
+ background-position: -26px 50%;
+}
+.stars-3 {
+ background-position: -52px 50%;
+}
+.stars-2 {
+ background-position: -78px 50%;
+}
+.stars-1 {
+ background-position: -104px 50%;
+}
+.stars-0 {
+ background-position: -130px 50%;
+}
+.ballot {
+ padding: 0;
+ list-style-type: none;
+}
+.ballot .game {
+ display: block;
+ overflow: hidden;
+ clear: both;
+ padding: 2em;
+ height: auto;
+ margin-bottom: 1em;
+ -moz-transition: .2s opacity;
+ background: #777442;
+ background: rgba(0,0,0,.2);
+}
+.ballot h2 {
+ float: left;
+ margin: 0;
+ max-width: 600px;
+ font-size: 20px;
+ line-height: 28px;
+}
+.ballot .action {
+ margin: 0 1em 0 0;
+ float: right;
+}
View
60 media/css/games.css
@@ -3,18 +3,31 @@
display: block;
width: 43%;
float:left;
- padding: 1em 3%;
- height: 200px;
+ padding: 2em 2%;
+ height: 150px;
margin-bottom: 1em;
background: #777442;
background: rgba(0,0,0,.2);
- box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
+/* box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
-moz-box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
-webkit-box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
border-radius: 1em;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
-}
+*/}
+
+.games .tile-list .game {
+ width: 36%;
+ margin-left: 3%;
+ padding-left: 8%;
+ position: relative;
+/* box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
+ -moz-box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
+ -webkit-box-shadow: inset 0 8px 4px rgba(0,0,0,.2);
+ border-radius: 1em;
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
+*/}
.games section.screenshots {
height: auto;
@@ -26,15 +39,43 @@
.games .game p {
width: auto;
+ max-height: 4.8em;
+ min-height: 4.8em;
+ overflow: hidden;
+}
+
+.game nav {
+ position: absolute;
+ bottom: 2em;
+}
+
+.thumb {
+ position: absolute;
+ left: -32px;
+ width: 71px;
+ height: 71px;
+ padding: 8px;
+ background: url("/media/img/thumb.png") no-repeat;
}
+.thumb div {
+ background: url("/media/img/game_placeholder.png");
+ width: 71px;
+ height: 71px;
+ overflow: hidden;
+}
+
+
body.games h1 {
clear: both;
- margin: 1em 0 1em 0;
+ line-height: 1em;
+ font-size: 4em;
+ margin: 1em 0 .5em 0;
}
body.games h2 {
clear: left;
+ margin-top: 1px;
}
.games .description h2 {
@@ -56,21 +97,20 @@ body.games p.edit {
body.games ul.links {
list-style-type: none;
- margin: 1em 0 0;
padding: 0;
}
body.games ul.links li {
- float: left;
+ display: inline;
+ display: inline-block;
margin: 0;
- padding: 0 1em 2em 1em;
}
-body.games ul.links li a {
+/*body.games ul.links li a {
font-family: OrbitronMed, "Courier New", monospace;
font-size: 1.5em;
}
-
+*/
.games section.screenshots {
float: right;
width: 300px;
View
3 media/css/screen.css
@@ -269,7 +269,8 @@ header nav {
margin-top: 20px;
}
-header nav .selected, input[type=submit] {
+header nav .selected, input[type=submit], a.action {
+ color: #fff;
margin-bottom: 40px;
font-size: 13px;
border-radius: 0.5em;
View
BIN media/img/game_placeholder.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN media/img/stars.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN media/img/thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
40 media/js/global.js
@@ -26,6 +26,46 @@ $(document).ready(function () {
}
});
+$.fn.vtruncate = function(opts) {
+ opts = opts || {};
+ var showTitle = opts.showTitle || false,
+ truncText = opts.truncText || "&hellip;",
+ split = [" ",""];
+ this.each(function() {
+ var $el = $(this),
+ oldtext = $el.attr("oldtext") || $el.text(),
+ txt, cutoff;
+ if ($el.attr("oldtext")) {
+ $el.text(oldtext);
+ }
+ $el.attr("oldtext", oldtext);
+ for (var i in split) {
+ delim = split[i];
+ txt = oldtext.split(delim);
+ cutoff = txt.length;
+ var done = (this.scrollHeight - this.offsetHeight) < 2,
+ chunk = Math.ceil(txt.length/2), oc=0, wid, delim;
+ while (!done) {
+ $el.html(txt.slice(0,cutoff).join(delim)+truncText);
+ wid = (this.scrollHeight - this.offsetHeight);
+ if (wid < 2 && chunk == oc) {
+ done = true;
+ } else if (wid > 1) {
+ cutoff -= chunk;
+ } else {
+ cutoff += chunk;
+ }
+ oc = chunk;
+ chunk = Math.ceil(chunk/2);
+ }
+ }
+ if (showTitle) {
+ $el.attr("title", oldtext);
+ }
+ });
+ return this;
+};
+
// initializes a particle effect on the raygun, if supported.
$(document).ready(function() {
if (!!document.createElement('canvas').getContext && //checks for canvas capability
View
28 media/js/screen.js
@@ -2,4 +2,32 @@ $(document).ready(function() {
setTimeout(function() {
$('#messages').slideUp('slow');
}, 3000);
+
+ $(".tile-list .game p").vtruncate();
+
+ // TODO(potch) unsuckify
+ // var to = false;
+ // var $hoverEl = $("<div>barf").hide().appendTo($('.games'));
+ // $(".games .game").mouseover(function() {
+ // var $tgt = $(this);
+ // // if ($tgt.find('p').attr('oldtext')) return;
+ // // if (to) clearInterval(to);
+ // // to = setTimeout(function() {
+ // var pos = $tgt.position();
+ // $hoverEl = $tgt.clone();
+ // $hoverEl.css({
+ // position: 'absolute',
+ // top: pos.top,
+ // left: pos.left,
+ // background: 'url("/media/img/tile.png")',
+ // 'pointer-events': 'none',
+ // });
+ // $hoverEl.show();
+ // // }, 300);
+ // });
+ // $(".games .game").mouseout(function() {
+ // // clearTimeout(to);
+ // // to = false;
+ // $hoverEl.hide();
+ // });
});
View
27 media/js/voting.js
@@ -0,0 +1,27 @@
+$(document).ready(function() {
+
+ var $votingForms = $('#content form.vote');
+ $votingForms.submit(function(ev) {
+ var $form = $(this);
+ ev.preventDefault();
+ $.ajax({
+ url: $form.attr('action'),
+ type: "POST",
+ data: $form.serialize(),
+ dataType: 'json',
+ success: function(data){
+ $form.find(".stars").css('opacity', '1');
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown){
+ alert("Oops, there was an error, please try again... ");
+ }
+ });
+ return false;
+ });
+ $votingForms.find('.stars input[type="radio"]').click(function() {
+ var $form = $(this).parents("form");
+ $form.find(".stars").attr('class', 'stars stars-' + $(this).val());
+ $form.find(".stars").css('opacity', '.2');
+ $form.submit();
+ });
+});
View
19 migrations/07-add-ballot.sql
@@ -0,0 +1,19 @@
+BEGIN;CREATE TABLE `vote_ballot` (
+ `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
+ `creator_id` integer NOT NULL,
+ `games` longtext NOT NULL
+)
+;
+ALTER TABLE `vote_ballot` ADD CONSTRAINT `creator_id_refs_id_23f756ca` FOREIGN KEY (`creator_id`) REFERENCES `auth_user` (`id`);
+CREATE TABLE `vote_vote` (
+ `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
+ `creator_id` integer NOT NULL,
+ `game_id` integer NOT NULL,
+ `score` smallint NOT NULL
+)
+;
+ALTER TABLE `vote_vote` ADD CONSTRAINT `game_id_refs_id_9fe09d1` FOREIGN KEY (`game_id`) REFERENCES `games_game` (`id`);
+ALTER TABLE `vote_vote` ADD CONSTRAINT `creator_id_refs_id_4175b566` FOREIGN KEY (`creator_id`) REFERENCES `auth_user` (`id`);
+CREATE INDEX `vote_ballot_685aee7` ON `vote_ballot` (`creator_id`);
+CREATE INDEX `vote_vote_685aee7` ON `vote_vote` (`creator_id`);
+CREATE INDEX `vote_vote_7b333d1e` ON `vote_vote` (`game_id`);COMMIT;
View
1 requirements/prod.txt
@@ -7,3 +7,4 @@
-e git://github.com/mozilla/django-csp.git#egg=django-csp
python-memcached
django-registration==0.7
+-e git://github.com/alex/django-templatetag-sugar.git#egg=templatetag_sugar
View
5 settings.py
@@ -109,6 +109,7 @@
'media_bundler',
'csp',
'games',
+ 'vote',
'core',
'static',
)
@@ -147,6 +148,9 @@
# How large (size) can screenshots be? ('WIDTHxHEIGHT')
SCREENSHOTS_MAX_DIMENSIONS = '640x480'
+# How many games to include in each ballot.
+BALLOT_SIZE = 5
+
MEDIA_BUNDLES = (
{
'type': 'css',
@@ -172,6 +176,7 @@
'particle.js',
'screen.js',
'global.js',
+ 'voting.js',
),
},
)
View
3 templates/base.html
@@ -28,6 +28,9 @@
{% if settings.ALLOW_SUBMISSIONS or user.game_set.all %}
<a href="{% url games.mine %}">your games</a>|
{% endif %}
+ {% if settings.ALLOW_VOTING %}
+ <a href="{% url vote.ballot %}">your votes</a>|
+ {% endif %}
<a href="{% url auth_logout %}?next=/">logout</a>
{% else %}
<a class="login" href="{% url auth_login %}">login</a>
View
9 templates/registration/account_note.html
@@ -1,8 +1,7 @@
<aside>
- Before you can submit a game, you'll need to create an account on this
+ Before you can vote on games, you'll need to create an account on this
site. Having an account allows you to come back and modify your
- submission, add new screenshots, etc. We'll also need the e-mail address
- associated with your account to contact you if you win a prize in one of
- the prize categories, or if we need to contact you about your entry for
- any reason.
+ later, and helps us ensure the voting is fair. Your email address is used
+ <i>only</i> to verify your account, and is handled in accordance with our
+ <a href="http://www.mozilla.com/en-US/privacy-policy.html">Privacy Policy</a>.
</aside>
View
2 templates/registration/activation_email.txt
@@ -1,6 +1,6 @@
Welcome to the Mozilla Labs Game On! 2010 Open Web Games Contest!
-We're excited to have you in the competition, but first we need you to confirm your e-mail address. Once you do so, you will be able to submit games and login later to modify your submissions.
+We're excited you're helping us pick out the best web games, but first we need you to confirm your e-mail address. Once you do so, you will be able to view and submit your ballot.
To complete registration, please navigate to the link below or paste it in your browser:
View
1 urls.py
@@ -8,6 +8,7 @@
urlpatterns = patterns('',
(r'^accounts/', include('registration.urls')),
(r'^games/', include('games.urls')),
+ (r'^vote', include('vote.urls')),
(r'^admin/', include(admin.site.urls)),
url(r'^$', direct_to_template, {'template': 'static/home.html'}, name='home'),
url(r'^how$', direct_to_template, {'template': 'static/how.html'}, name='how'),

0 comments on commit 4353ead

Please sign in to comment.