Skip to content
Browse files

Conflict merge

  • Loading branch information...
2 parents ea42d72 + b177b38 commit 1cbd0ae4398f86a421757e754407ae3726561472 @andrewhayward andrewhayward committed
View
10 gameon/base/static/base/css/home.css
@@ -173,6 +173,16 @@ div[role=main] .big-picture .busta {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
+.participate .vevent {
+ padding-bottom: 0.5em;
+ margin-bottom: 0.5em;
+}
+.participate .vevent h4 {
+ margin: 0.5em 0 0;
+}
+.participate .vevent p {
+ margin: 0;
+}
.participate article footer {
padding: 30px 40px;
border-radius: 0 0 16px 16px;
View
65 gameon/base/static/base/css/master.css
@@ -82,28 +82,26 @@ div[role=main] .busta {
width: 25%;
overflow: hidden;
}
-/* Removing this for now, until we get assets in place
-
- padding-top: 150px;
-}
-.mini-col:before {
+#judges_list .mini-col::before,
+#resource_list .mini-col::before,
+#rules_page .mini-col::before {
content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- max-width: 220px;
+ display: block;
height: 140px;
- background: #ebebeb;
+ background: #EBEBEB 50% 50% no-repeat;
border-radius: 4px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
- border: 1px solid #666;
- display: block;
+ border: 1px inset rgba(255,255,255,0.5);
+}
+#judges_list .mini-col::before {
+ background-image: url(/static/base/img/css/find-panel.png);
+}
+#resource_list .mini-col::before,
+#rules_page .mini-col::before {
+ background-image: url(/static/base/img/css/docs-panel.png);
}
-
-*/
.shout {
font-size: 48px;
font-weight: bold;
@@ -183,6 +181,7 @@ li .frame {
position: relative;
z-index: 10;
width: 100%;
+ display: block;
}
.mast-head {
background: #00283a;
@@ -191,6 +190,7 @@ li .frame {
}
.mast-head h1 {
padding: 0.75em 0;
+ background: url(/static/base/img/css/mast-head.png) 100% 0 no-repeat;
}
.sub-head {
background: #00283a;
@@ -198,15 +198,25 @@ li .frame {
padding: 1em 20px;
border-radius: 8px;
}
-.vcard {
+#grand-prize {
+ background-image: url(/static/base/img/css/grand-prize.png);
+ background-position: 95% 0;
+ background-repeat: no-repeat;
+}
+#category-prizes {
+ background-image: url(/static/base/img/css/category-prizes.png);
+ background-position: 95% 0;
+ background-repeat: no-repeat;
+}
+.judges .vcard {
padding-left: 150px;
position: relative;
}
-.vcard .fn {
+.judges .vcard .fn {
color: #37D09E;
display: inline-block;
}
-.vcard .photo {
+.judges .vcard .photo {
border-radius: 50%;
border: 4px solid #e4e4e4;
background: #e4e4e4;
@@ -214,6 +224,11 @@ li .frame {
top: 0;
left: 0;
}
+.events .vevent {
+ border-bottom: 1px solid #e4e4e4;
+ margin-bottom: 1em;
+ padding-bottom: 1em;
+}
div[role="main"] {
background: #fff;
overflow: hidden;
@@ -493,6 +508,20 @@ nav li a {
background-image: -moz-linear-gradient(top, #DDD, #FFF 15px);
background-image: linear-gradient(top, #DDD, #FFF 15px);
}
+ #judges_list .mini-col,
+ #resource_list .mini-col,
+ #rules_page .mini-col {
+ padding-left: 150px;
+ }
+ #judges_list .mini-col::before,
+ #resource_list .mini-col::before,
+ #rules_page .mini-col::before {
+ float: left;
+ width: 100px;
+ height: 100px;
+ margin: 10px 0 0 -120px;
+ background-size: 50%;
+ }
}
@media all and (max-width: 412px) {
View
BIN gameon/base/static/base/img/css/category-prizes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gameon/base/static/base/img/css/docs-panel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gameon/base/static/base/img/css/find-panel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gameon/base/static/base/img/css/grand-prize.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gameon/base/static/base/img/css/mast-head.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3 gameon/base/templates/403.html
@@ -7,12 +7,11 @@
{% block content %}
<article>
<header class="mast-head">
- <h1 class="busta shout">Error - 403 Forbidden</h1>
+ <h1 class="busta shout">Oops - looks like you've done something that you shouldn't have done</h1>
</header>
<div class="busta">
<div class="cf">
<div class="main-col">
- <h2 class="exclaim">Looks like you've done something that you shouldn't have done</h2>
{% if case == 'no_edit_rights' %}
<p>You tried to edit a game that you don't have the rights to edit.</p>
<ul class="whimper">
View
48 gameon/base/templates/404.html
@@ -1,15 +1,33 @@
-<!DOCTYPE html>
-<html LANG="{{ LANG }}" dir="{{ DIR }}">
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
- <title>{{ _('Page not found') }}</title>
- </head>
- <body>
- <h1>{{ _('Page not found') }}</h1>
- <p>
- {% trans %}
- Sorry, but we couldn't find the page you're looking for.
- {% endtrans %}
- </p>
- </body>
-</html>
+{% extends 'base.html' %}
+
+{% block page_title %}404 (Page not found){% endblock %}
+{% block page_id %}error_404{% endblock %}
+{% block section_class %}errors{% endblock %}
+
+{% block content %}
+<article>
+ <header class="mast-head">
+ <h1 class="busta shout">Oops - looks like you've found a broken link</h1>
+ </header>
+ <div class="busta">
+ <div class="cf">
+ <div class="main-col">
+ <p>Nothing to worry about, probably one of the things below:</p>
+ <ul class="whimper">
+ <li>Check your spelling and check again.</li>
+ <li>if you clicked a link from somewhere else check that they're aren't any special hidden characters, if you find out that they've posted the wrong link then it would be awesome if you could let them know.</li>
+ </ul>
+ <p>If you think something weird might have gone on in our application <a href="mailto:gameon@mozilla.org">send us an email</a>.</p>
+ </div>
+ <aside class="meta mini-col">
+ <h2 class="whimper">Here are some links that should work</h2>
+ <ul class="no-style">
+ <li>Read the latest news in the <a href="https://blog.mozilla.org/gameon/">Game On blog</a>.</li>
+ <li>Ensure that you know the <a href="{{ url('static_site.rules') }}">challenge rules</a>,</li>
+ <li>See what amazing <a href="{{ url('static_site.judges') }}">judges we have</a>.</li>
+ </ul>
+ </aside>
+ </div>
+ </div>
+</article>
+{% endblock %}
View
38 gameon/base/templates/500.html
@@ -1,15 +1,23 @@
-<!DOCTYPE html>
-<html LANG="{{ LANG }}" dir="{{ DIR }}">
- <head>
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
- <title>{{ _('Something went wrong!') }}</title>
- </head>
- <body>
- <h1>{{ _('Page not found') }}</h1>
- <p>
- {% trans %}
- Sorry, but something went wrong.
- {% endtrans %}
- </p>
- </body>
-</html>
+{% extends 'base.html' %}
+
+{% block page_title %}500 (Server error){% endblock %}
+{% block page_id %}error_500{% endblock %}
+{% block section_class %}errors{% endblock %}
+
+{% block user_nav %}{% endblock %}
+
+{% block content %}
+<article>
+ <header class="mast-head">
+ <h1 class="busta shout">Oh dear - looks something has gone rather wrong</h1>
+ </header>
+ <div class="busta">
+ <div class="cf">
+ <p>Hopefully this might just be a temporary blip but if you try again and the same thing happens it's probably worth giving us a bit of time to fix things. We will be been notified of the error so hopefully have all the information we need to looking into what has caused it.</p>
+ <p><strong>We're really sorry for the inconvenience, hopefully we can have this fixed up ASAP.</strong> If you notice that the same thing is broken for a couple of days check out the <a href="https://blog.mozilla.org/gameon/">Game On blog for updates</a> and feel free to drop us an email at <a href="mailto:gameon@mozilla.org">gameon@mozilla.org</a> explaining the problem.</p>
+ </div>
+ </div>
+</article>
+{% endblock %}
+
+{% block browser_id_code %}{% endblock %}
View
4 gameon/base/templates/base.html
@@ -37,6 +37,7 @@
</div>
<section class="personal cf">
<div class="busta">
+ {% block user_nav %}
{% if not request.user.is_active %}
<p><a id="browserid" href="#">Sign In</a></p>
<form method="POST" action="{{ url('browserid_verify') }}">
@@ -51,6 +52,7 @@
<li><a href="{{ url('users_signout') }}">Log out</a></li>
</ul>
{% endif %}
+ {% endblock %}
</div>
</section>
<div role="main">
@@ -71,8 +73,10 @@
{% endcompress %}
{% block page_js %}{% endblock %}
<script src="//www.mozilla.org/tabzilla/media/js/tabzilla.js"></script>
+ {% block browser_id_code %}
{% if not request.user.is_active %}
{{ browserid_form.media }}
{% endif %}
+ {% endblock %}
</body>
</html>
View
0 gameon/events/__init__.py
No changes.
View
10 gameon/events/admin.py
@@ -0,0 +1,10 @@
+from django.contrib import admin
+from gameon.events import models
+
+
+class EventAdmin(admin.ModelAdmin):
+ model = models.Event
+ list_display = ('name', 'location', 'start_date')
+
+admin.site.register(models.Location)
+admin.site.register(models.Event, EventAdmin)
View
8 gameon/events/managers.py
@@ -0,0 +1,8 @@
+from django.db import models
+from datetime import datetime
+
+
+class EventManager(models.Manager):
+
+ def get_upcoming(self):
+ return self.get_query_set().filter(end_date__gt=datetime.utcnow())
View
61 gameon/events/migrations/0001_initial.py
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'Location'
+ db.create_table('events_location', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('street', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('town', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('country', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ))
+ db.send_create_signal('events', ['Location'])
+
+ # Adding model 'Event'
+ db.create_table('events_event', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('url', self.gf('django.db.models.fields.URLField')(max_length=255)),
+ ('location', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['events.Location'], null=True, blank=True)),
+ ('start_date', self.gf('django.db.models.fields.DateTimeField')()),
+ ('end_date', self.gf('django.db.models.fields.DateTimeField')()),
+ ))
+ db.send_create_signal('events', ['Event'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Location'
+ db.delete_table('events_location')
+
+ # Deleting model 'Event'
+ db.delete_table('events_event')
+
+
+ models = {
+ 'events.event': {
+ 'Meta': {'object_name': 'Event'},
+ 'end_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['events.Location']", 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'start_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '255'})
+ },
+ 'events.location': {
+ 'Meta': {'object_name': 'Location'},
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'street': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ }
+ }
+
+ complete_apps = ['events']
View
0 gameon/events/migrations/__init__.py
No changes.
View
33 gameon/events/models.py
@@ -0,0 +1,33 @@
+from django.db import models
+
+from tower import ugettext_lazy as _
+from datetime import datetime
+
+from gameon.events.managers import EventManager
+
+
+class Location(models.Model):
+ name = models.CharField(max_length=255, verbose_name=(u'Location name'))
+ street = models.CharField(max_length=255, verbose_name=(u'Street Address'))
+ town = models.CharField(max_length=255, verbose_name=(u'Town'))
+ country = models.CharField(max_length=255, verbose_name=(u'Country'))
+
+ def __unicode__(self):
+ return '%s - %s' % (self.name, self.country)
+
+
+class Event(models.Model):
+
+ objects = EventManager()
+
+ name = models.CharField(max_length=255, verbose_name=(u'Event name'))
+ url = models.URLField(verbose_name=_(u'Event URL'), max_length=255)
+ location = models.ForeignKey(Location, blank=True, null=True)
+ start_date = models.DateTimeField(verbose_name=_(u'Start date'))
+ end_date = models.DateTimeField(verbose_name=_(u'End date'))
+
+ def __unicode__(self):
+ return self.name
+
+ def has_finished(self):
+ return datetime.utcnow() < self.end_date
View
42 gameon/events/templates/events/list.html
@@ -0,0 +1,42 @@
+{% extends 'base.html' %}
+
+{% block page_title %}Game Jams{% endblock %}
+{% block page_id %}event_list{% endblock %}
+{% block section_class %}events{% endblock %}
+
+{% block content %}
+<section>
+ <header class="mast-head">
+ <h1 class="busta shout">All Game Jams</h1>
+ </header>
+ <div class="busta">
+ <div class="cf">
+ <div class="main-col">
+ {% if events %}
+ <ol class="no-style">
+ {% for ev in events %}
+ <li class="vevent">
+ <h2 class="summary">{{ ev.name }}</h2>
+ <p class="location vcard"><span class="fn">{{ ev.location.name }}</span>, <span class="adr"><span class="street-address">{{ ev.location.street }}</span>, {{ ev.location.town }}, <span class="country-name">{{ ev.location.country }}</span></span></p>
+ <p><span class="dtstart">{{ ev.start_date.strftime('%B %d, %Y %l:%M%p') }}</span> to <span class="dtend">{{ ev.end_date.strftime('%B %d, %Y %l:%M%p') }}</span></p>
+ <a class="url" href="{{ ev.url }}">Register for this Game Jam</a>
+ </li>
+ {% endfor %}
+ </ol>
+ {% else %}
+ <h2>We currently have no Game Jams planned</h2>
+ <p>Keep an eye on the <a href="https://mozilla.org/gameon/">Game On blog</a> for further announcements, or equally you can try and <a href="https://donate.mozilla.org/page/event/create/">organise your own jam</a>!</p>
+ {% endif %}
+ </div>
+ <aside class="meta mini-col">
+ <h2 class="whimper">More about Game Jams</h2>
+ <ul class="no-style">
+ <li><a href="{{ url('static_site.faqs') }}#game-jams">What exactly is a Game Jam?</a></li>
+ <li><a href="https://webmaker.org/en-US/events/guides/game-jam/">Game Jam event guide</a></li>
+ <li><a href="https://donate.mozilla.org/page/event/create/">Organise your own Game Jam</a></li>
+ </ul>
+ </aside>
+ </div>
+ </div>
+</section>
+{% endblock %}
View
7 gameon/events/urls.py
@@ -0,0 +1,7 @@
+from django.conf.urls.defaults import patterns, url
+
+from . import views
+
+urlpatterns = patterns('',
+ url(r'^events/$', views.list, name='events.list'),
+)
View
12 gameon/events/views.py
@@ -0,0 +1,12 @@
+from django.shortcuts import render
+
+from gameon.events.models import Event
+
+
+def list(request, template='events/list.html'):
+ """
+ Display a list of events - until we have this functionality on webmaker.org
+ """
+ return render(request, template, {
+ 'events': Event.objects.get_upcoming().order_by('start_date'),
+ })
View
4 gameon/settings/base.py
@@ -8,6 +8,9 @@
# clone.
PROJECT_MODULE = 'gameon'
+# This is used by get_current_challenge in gameon/submissions/managers.py
+# It gets added into the DB as part of gameon/submissions/migrations/0009_initial_challenge.py
+# If the DB value changes, or you add in a new current challenge also change this
GAMEON_CHALLENGE_SLUG = 'gameon-2013'
MARKETPLACE_URL = 'https://marketplace.firefox.com/developers/docs/mkt_submission'
@@ -34,6 +37,7 @@
'%s.static_site' % PROJECT_MODULE,
'%s.users' % PROJECT_MODULE,
'%s.submissions' % PROJECT_MODULE,
+ '%s.events' % PROJECT_MODULE,
'south',
]
View
19 gameon/static_site/templates/static_site/landing.html
@@ -21,7 +21,7 @@
{% if not request.challenge.has_started() %}
<p>Submissions open on {{ request.challenge.start_date.strftime('%B %e, %Y') }}</p>
{% endif %}
- {% if not request.challenge.has_closed() %}
+ {% if request.challenge.has_closed() %}
<p><a href="{{ url('submissions.entry_list') }}">See what people submitted</a></p>
{% endif %}
{% endif %}
@@ -65,9 +65,22 @@ <h2 class="exclaim">Come to a Game Jam!</h2>
<li>Got a game idea for the competition you'd like help testing and finishing up?</li>
<li>Interested in playing with new technologies and meeting people who love making and hacking games as much as you do?</li>
</ul>
- <p>[include upcoming game jam lists when merged]</p>
+ {% if events %}
+ <h3>Upcoming events</h3>
+ <ol class="no-style">
+ {% for ev in events %}
+ <li class="vevent">
+ <h4><a class="summary url" href="{{ ev.url }}">{{ ev.name }}</a></h4>
+ <p><span class="dtstart">{{ ev.start_date.strftime('%B %d, %Y %l:%M%p') }}</span> in {{ ev.location.town }}, <span class="location">{{ ev.location.country }}</span></p>
+ </li>
+ {% endfor %}
+ </ol>
+ {% if num_events > 3 %}
+ <a href="{{ url('events.list') }}">See all upcoming Game Jams</a>
+ {% endif %}
+ {% endif %}
<footer>
- <a href="#">Register for an upcoming game jam [link through to gameon event page when merged in]</a> or <a href="https://webmaker.org/events/guides/game-jam/">run your own here</a>
+ <a href="{{ url('events.list') }}">Register for an upcoming game jam</a> or <a href="https://webmaker.org/events/guides/game-jam/">run your own here</a>
</footer>
</div>
</article>
View
4 gameon/static_site/templates/static_site/prizes.html
@@ -11,7 +11,7 @@ <h1 class="busta shout">Prizes</h1>
</header>
<div class="busta">
<div class="cf">
- <h2 class="sub-head exclaim">Grand Prize</h2>
+ <h2 class="sub-head exclaim" id="grand-prize">Grand Prize</h2>
<div class="prize">
<h3 class="exclaim">Grand Champion</h3>
<p>Awarded to the best darned game we could find.</p>
@@ -29,7 +29,7 @@ <h3 class="exclaim">Grand Champion</h3>
<li><span>Special Edition Mozilla Swag. Leave room in your luggage. Trust us.<span></li>
</ul>
</div>
- <h2 class="sub-head exclaim">Category Prizes</h2>
+ <h2 class="sub-head exclaim" id="category-prizes">Category Prizes</h2>
<div class="main-col">
<div class="prize">
<h3 class="exclaim">Best Hackable Game (Non Stop Hacking)</h3>
View
10 gameon/static_site/views.py
@@ -3,13 +3,21 @@
import commonware
from gameon.submissions.models import Category
+from gameon.events.models import Event
+
log = commonware.log.getLogger('playdoh')
def home(request, template='static_site/landing.html'):
"""Main example view."""
- data = {}
+
+ upcoming_events = Event.objects.get_upcoming()
+
+ data = {
+ 'events': upcoming_events.order_by('start_date')[:3],
+ 'num_events': upcoming_events.count()
+ }
return render(request, template, data)
View
110 gameon/submissions/migrations/0009_initial_challenge.py
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+from south.v2 import DataMigration
+from django.core.exceptions import ObjectDoesNotExist
+from django.conf import settings
+
+GAMEON_CHALLENGE_SLUG = settings.GAMEON_CHALLENGE_SLUG
+
+
+class Migration(DataMigration):
+
+ depends_on = (
+ ('submissions', '0008_fix_desciption_typo'),
+ )
+
+ def forwards(self, orm):
+ try:
+ category = (orm['submissions.Challenge'].objects
+ .get(slug=GAMEON_CHALLENGE_SLUG))
+ except ObjectDoesNotExist:
+ category_data = {
+ 'name': 'Gameon 2013',
+ 'slug': GAMEON_CHALLENGE_SLUG,
+ 'start_date': '2012-12-11 00:00:00',
+ 'end_date': '2013-02-20 23:59:59',
+ }
+ category = orm['submissions.Challenge'].objects.create(**category_data)
+
+ def backwards(self, orm):
+ "Write your backwards methods here."
+ print "Not removing any data from the DB, we can't know for certain what was there before"
+ pass
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'submissions.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'submissions.challenge': {
+ 'Meta': {'object_name': 'Challenge'},
+ 'end_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}),
+ 'start_date': ('django.db.models.fields.DateTimeField', [], {})
+ },
+ 'submissions.entry': {
+ 'Meta': {'object_name': 'Entry'},
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['submissions.Category']", 'null': 'True', 'blank': 'True'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['users.Profile']", 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'default': "''"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
+ 'team_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'team_members': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'team_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'to_market': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '255'}),
+ 'video_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '255'})
+ },
+ 'users.profile': {
+ 'Meta': {'object_name': 'Profile'},
+ 'bio': ('django.db.models.fields.TextField', [], {'default': "''"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
+ 'website': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '255'})
+ }
+ }
+
+ complete_apps = ['submissions']
View
2 gameon/submissions/templates/submissions/single.html
@@ -39,8 +39,10 @@ <h2 class="whimper">Submitted by</h2>
{% if entry.editable_by(user=request.user) and request.challenge.is_open() %}
<a class="cta whimper" href="{{ url('submissions.entry_edit', slug=entry.slug) }}">Edit your game</a>
{% endif %}
+ {% if entry.category %}
<h2 class="whimper">Category</h2>
<p><a href="{{ url('submissions.entry_list', category=entry.category.slug) }}">{{ entry.category }}</a></p>
+ {% endif %}
</aside>
</div>
</div>
View
1 gameon/urls.py
@@ -15,6 +15,7 @@
urlpatterns = patterns('',
# Example:
(r'', include(urls)),
+ (r'', include('gameon.events.urls')),
(r'', include('gameon.users.urls')),
(r'', include('gameon.submissions.urls')),
(r'^browserid/', include('django_browserid.urls')),
View
4 gameon/users/models.py
@@ -16,9 +16,9 @@ class Profile(models.Model):
name = models.CharField(max_length=255, blank=True,
verbose_name=_(u'Display name'))
bio = models.TextField(verbose_name=_(u'Personal bio'),
- validators=[MaxLengthValidator(250)], default="")
+ validators=[MaxLengthValidator(250)], default="", blank=True)
website = models.URLField(verbose_name=_(u'Personal website'), max_length=255,
- default="")
+ default="", blank=True)
@models.permalink
def get_absolute_url(self):

0 comments on commit 1cbd0ae

Please sign in to comment.
Something went wrong with that request. Please try again.