Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates as of October 2013 #1

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
afbb262
Initial directory structure.
Oct 11, 2008
6285a11
Checking in basic set of files, generated from autoproject.
Oct 13, 2008
7eba156
Basic set of classes.
Oct 13, 2008
7fd308b
ChangeLog update: PhpbbPassword works now.
Oct 13, 2008
4674f26
Updated project name in comments.
Oct 14, 2008
55beb73
Updated comments, code cleanup in various places.
Oct 14, 2008
9893ddf
Fixed a bug when password is provided as unicode.
Nov 22, 2008
cc82d74
- Fixed views
Nov 24, 2008
3fa1a79
Added a TODO file.
Nov 24, 2008
914c1dd
- Added admin site code
Nov 27, 2008
47af16a
Adding admin interface file.
Nov 27, 2008
cb8e463
Better RSS feeds.
Nov 28, 2008
739e900
Updated admin interface and models.
Nov 29, 2008
11e52b8
Bugfix: added loading of i18n tags to templates.
Nov 29, 2008
175cba3
- Added license note to admin.py
Nov 30, 2008
b3c75f9
- Renamed classes Forum* to Phpbb*.
Nov 30, 2008
9ceb18a
Added localization files with some polish translations.
Nov 30, 2008
76901e9
Better ordering of topics in forum index.
Nov 30, 2008
8981e45
Updated links to forum posts.
Dec 2, 2008
675aa10
Added translation for 'topics'.
Dec 5, 2008
c243b9e
- Updated sitemaps
Dec 9, 2008
5cdff45
Removing 'changefreq' and 'priority' from sitemap.
Dec 16, 2008
0301a92
- Added translation for unanswered topics
Dec 16, 2008
aa0cc0b
Added a random tool to fix MySQL encoding.
Dec 26, 2008
4d99b8c
Removed some Polish from forum templates.
Feb 26, 2009
dd5a996
Model updates.
May 31, 2009
9ce13fc
Add a comment about stupid forum exclusions.
Feb 3, 2012
942cf4e
use a list of blocked forums
Feb 3, 2012
32fe065
do not think we are part of django.contrib; add a comment about missi…
Feb 3, 2012
1a7a420
A bugfix for an import statement and class reference
Feb 3, 2012
003bbf5
Merge remote-tracking branch 'remotes/github/master'
automaciej Feb 3, 2012
604dbcf
Added missed merges.
automaciej Feb 3, 2012
187fcf6
django.contrib.phpbb -> phpbb
mkoloberdin Sep 9, 2011
5c8c77d
Added settings.py, PHPBB_TABLE_PREFIX option
mkoloberdin Sep 9, 2011
1a9bd18
Added setup.py
mkoloberdin Jul 24, 2012
65c08bc
Merge my changes (1, 2, 3)
mkoloberdin Jul 25, 2012
9909d8b
Add a comment about stupid forum exclusions.
Feb 3, 2012
18d2e22
use a list of blocked forums
Feb 3, 2012
4b1b7a8
do not think we are part of django.contrib; add a comment about missi…
Feb 3, 2012
cb0382c
A bugfix for an import statement and class reference
Feb 3, 2012
763267a
Hardcoded BLOCKED_FORUMS -> settings.PHPBB_BLOCKED_FORUMS
mkoloberdin Jul 25, 2012
fc89a2f
user.is_staff = False
mkoloberdin Jul 25, 2012
ef72152
Don't hardcode e.g. blocked forums, use settings
automaciej Jul 26, 2012
df41f66
Add setup.py
automaciej Jul 26, 2012
48035d0
Merge branch 'master' of https://github.com/mkoloberdin/django-phpbb
automaciej Jul 26, 2012
a6eac5c
Rename password_unittest.py to password_test.py
automaciej May 21, 2013
7c00212
README files update
automaciej May 22, 2013
1672b80
Documentation updates.
automaciej May 22, 2013
dfe0388
Rename the default location in url.py.
automaciej May 24, 2013
dca8764
Site-specific updates to views and templates.
automaciej May 25, 2013
58cbe20
Rename bbcode_unittest.py to bbcode_test.py
automaciej May 25, 2013
f2fd77c
Make the unit test files executable.
automaciej May 25, 2013
25f1dc6
Include the forum ID in the external link.
automaciej May 25, 2013
dce7d89
Include the link to the main forum in archive tmpl
automaciej May 25, 2013
3e1610a
Removed site-specific files.
automaciej May 25, 2013
0aa8930
Provide an example URLs configuration.
automaciej May 25, 2013
bccf66b
url.py fix
automaciej May 25, 2013
7b2064f
Cleanup, mostly whitespace fixes.
automaciej May 25, 2013
1824240
Move common querysets to a shared module.
automaciej May 25, 2013
7be99fd
Move common querysets to a shared module.
automaciej May 25, 2013
e59ed7f
Ditch own bbcode parser, use postmarkup.
automaciej May 26, 2013
858adc0
Update to Django 1.6
automaciej Jan 4, 2015
891b622
Use permanent redirects.
automaciej Jan 4, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use a list of blocked forums
git-svn-id: https://django-phpbb.googlecode.com/svn/trunk@36 2cc4e26e-97ec-11dd-87e9-a30ea5446288
  • Loading branch information
maciej.blizinski@gmail.com authored and mkoloberdin committed Jul 25, 2012

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 18d2e226d4b466ab2547baba1ba226dce9320cb4
20 changes: 15 additions & 5 deletions phpbb/views.py
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@
from django.core.paginator import Paginator, InvalidPage
from django.core import exceptions

BLOCKED_FORUMS = [6, 15, 19]

def phpbb_config_context(request):
try:
sitename = PhpbbConfig.objects.get(pk='sitename').config_value
@@ -37,6 +39,8 @@ def phpbb_config_context(request):
}

def forum_index(request, forum_id, slug, page_no = None, paginate_by = 10):
if forum_id in [str(x) for x in BLOCKED_FORUMS]:
raise Http404
if page_no:
try:
if int(page_no) == 1:
@@ -103,6 +107,8 @@ def topic(request, topic_id, slug, page_no = None, paginate_by = 10):
raise Http404
try:
t = PhpbbTopic.objects.get(pk = topic_id)
if t.forum.pk in BLOCKED_FORUMS:
raise Http404
except exceptions.ObjectDoesNotExist, e:
raise Http404
posts = t.phpbbpost_set.all()
@@ -144,9 +150,13 @@ def unanswered(request):
def handle_viewtopic(request):
if request.GET.has_key('t'):
topic_id = request.GET['t']
t = PhpbbTopic.objects.get(pk = topic_id)
return HttpResponseRedirect(t.get_absolute_url())
try:
topic_id_int = int(topic_id)
t = get_object_or_404(PhpbbTopic, pk=topic_id_int)
return HttpResponseRedirect(t.get_absolute_url())
except ValueError, e:
raise Http404
if request.GET.has_key('p'):
topic_id = request.GET['p']
t = PhpbbPost.objects.get(pk = topic_id)
return HttpResponseRedirect(t.get_absolute_url())
post_id = request.GET['p']
p = get_object_or_404(PhpbbPost, pk=post_id)
return HttpResponseRedirect(p.get_absolute_url())