From d6653d728b3f00b86920cf864846f9910adac49f Mon Sep 17 00:00:00 2001 From: Matt Claypotch Date: Tue, 28 Sep 2010 23:08:41 -0700 Subject: [PATCH] zomg user forms --- apps/games/forms.py | 1 + apps/games/templates/games/create.html | 19 +++++++- apps/games/templates/games/edit.html | 49 ++++++++++++++++++--- apps/games/templates/games/screenshots.html | 27 ------------ apps/games/templates/games/view.html | 7 ++- apps/games/urls.py | 3 +- apps/games/views.py | 32 ++++++++++---- media/css/forms.css | 40 +++++++++++++++-- media/css/games.css | 19 ++++++-- media/css/screen.css | 12 ++--- 10 files changed, 153 insertions(+), 56 deletions(-) delete mode 100644 apps/games/templates/games/screenshots.html diff --git a/apps/games/forms.py b/apps/games/forms.py index 5e39eb6..12bdd72 100644 --- a/apps/games/forms.py +++ b/apps/games/forms.py @@ -10,6 +10,7 @@ class GameForm(forms.ModelForm): + accept = forms.BooleanField(required=True); class Meta(object): model = Game fields = ('name', 'description', 'url', 'source', 'resources') diff --git a/apps/games/templates/games/create.html b/apps/games/templates/games/create.html index 844066f..9459678 100644 --- a/apps/games/templates/games/create.html +++ b/apps/games/templates/games/create.html @@ -12,7 +12,24 @@

Submit a Game

{% csrf_token %}
diff --git a/apps/games/templates/games/edit.html b/apps/games/templates/games/edit.html index 42a9fb0..7555019 100644 --- a/apps/games/templates/games/edit.html +++ b/apps/games/templates/games/edit.html @@ -2,6 +2,32 @@ {% block content %}

Details

+
+

Screenshots

+ + + {% if room_for_more %} +
+ {% csrf_token %} +

Upload a new screenshot

+
    + {{ screenshot_form.as_ul }} +
+ +
+ {% endif %} +
+ {% if form.errors %}