This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
Small fixes #82
Merged
Merged
Small fixes #82
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e624993
Sorting out the profile page when you have no entries
rossbruniges 7618d1e
Fixing the Partnerhip typo
rossbruniges 3db415c
Removing all the links direct to en-US
rossbruniges 7706c53
Using the messages framework to show when things have happened better…
rossbruniges ea6ad6f
Design review fixes
rossbruniges 777649d
Turns out that image uploads were not working at all. Now they do, an…
rossbruniges af0376f
Fixing up the comments from @andrewhayward - and also cleaning up a f…
rossbruniges 2fcc7c1
Min-height required for small-screen viewing
andrewhayward 0a7a7da
Switching background image out for CSS equivalent
andrewhayward 87018a1
Merge pull request #1 from andrewhayward/small-fixes
rossbruniges f04894a
Fix for latest version of Firefox
andrewhayward File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
from django.shortcuts import render | ||
from django.contrib import messages | ||
from django.core.urlresolvers import reverse | ||
from django.conf import settings | ||
from django.http import HttpResponseRedirect | ||
from django.template.defaultfilters import slugify | ||
from django.contrib.auth.decorators import login_required | ||
|
||
from tower import ugettext as _ | ||
|
||
from gameon.base.views import action_unavailable_response | ||
from gameon.base.utils import get_page, get_paginator | ||
from gameon.submissions.models import Entry, Category | ||
|
@@ -25,8 +28,9 @@ def create(request, template='submissions/create.html'): | |
if entry.to_market == True: | ||
return HttpResponseRedirect(settings.MARKETPLACE_URL) | ||
else: | ||
return HttpResponseRedirect(reverse('submissions.entry_list', | ||
kwargs={'category': 'all'})) | ||
messages.success(request, _('<strong>Game submitted!</strong>')) | ||
return HttpResponseRedirect(reverse('submissions.entry_single', | ||
kwargs={'slug': entry.slug})) | ||
else: | ||
data = { | ||
'categories': Category.objects.all(), | ||
|
@@ -50,13 +54,15 @@ def edit_entry(request, slug, template='submissions/edit.html'): | |
form = EntryForm(request.POST, instance=entry) | ||
if form.is_valid(): | ||
entry = form.save(commit=False) | ||
entry.slug = slugify(entry.title) | ||
new_slug = slugify(entry.title) | ||
entry.slug = new_slug | ||
form.save() | ||
if entry.to_market == True: | ||
return HttpResponseRedirect(settings.MARKETPLACE_URL) | ||
else: | ||
return HttpResponseRedirect(reverse('submissions.entry_list', | ||
kwargs={'category': 'all'})) | ||
messages.success(request, _('<strong>Game edited!</strong>')) | ||
return HttpResponseRedirect(reverse('submissions.entry_single', | ||
kwargs={'slug': new_slug})) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could just have used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might have been me being stupid but I thought that entry.slug was still returning the OLD value (before it changed) so in the case of an edit I assigned it to a value to use. I might have been wrong so will check again... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right - I didn't need it! |
||
else: | ||
data = { | ||
'categories': Category.objects.all(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double slash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I did this already, but then you adjusted the opacity of the main section of the box, so I didn't bother committing the fix.
Are we now going back to solid colours? 'Cause I rather liked the effect of the background image showing through!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You had done the checker-box effect? Did that ever make it into master or did I accidentally clobber it?
Yeah - back to solid colours as part of the design review notes - I likes the transparency too I must say
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd done the ridging dividers, but never committed them, because I pulled in the transparency change before pushing it out. So no, you didn't clobber it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's something at least - was your work CSS or background image based? If it's CSS (without the background image) based then, if it's possible would rather use that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS based - no images necessary. I can throw it together again if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that would be cool - if you checkout this branch and send me a pull request we can bundle it all in together!