Permalink
Browse files

removed code and added link to where it's been moved

  • Loading branch information...
jtauber committed Jul 20, 2014
1 parent ab0def8 commit 7b28356e89106f3d6bc0b6311d2481b96d62499a
View
@@ -1,4 +0,0 @@
-[run]
-source = agora
-omit = agora/tests/*
-branch = 1
View
@@ -1 +0,0 @@
-*.pyc
View
@@ -1,20 +0,0 @@
-language: python
-
-python:
- - 2.7
-
-env:
- - DJANGO=https://github.com/django/django/tarball/master
- - DJANGO=Django==1.6.5
-
-install:
- - pip install flake8 coverage coveralls
- - pip install -e .
- - pip install $DJANGO
-
-script:
- - flake8 --max-line-length=100 --max-complexity=10 --statistics --benchmark agora
- - coverage run setup.py test
- - coverage report
-
-after_success: coveralls
View
28 LICENSE
@@ -1,28 +0,0 @@
-Copyright (c) 2009–2014, Eldarion, Inc.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name of Eldarion, Inc. nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
@@ -1,2 +0,0 @@
-include LICENSE
-include README.rst
View
@@ -0,0 +1 @@
+Agora has been moved to [pinax-forums](https://github.com/pinax/pinax-forums).
View
@@ -1,31 +0,0 @@
-Agora
-=====
-
-.. image:: http://img.shields.io/travis/eldarion/agora.svg
- :target: https://travis-ci.org/eldarion/agora
-
-.. image:: http://img.shields.io/coveralls/eldarion/agora.svg
- :target: https://coveralls.io/r/eldarion/agora
-
-.. image:: https://img.shields.io/pypi/dm/agora.svg
- :target: https://pypi.python.org/pypi/agora/
-
-.. image:: https://img.shields.io/pypi/v/agora.svg
- :target: https://pypi.python.org/pypi/agora/
-
-.. image:: https://img.shields.io/badge/license-BSD-blue.svg
- :target: https://pypi.python.org/pypi/agora/
-
-
-Agora is a Pinax app for forums. It is focused on core forum
-functionality and hence is expected to be combined with other Pinax apps
-for broader features.
-
-See `Pinax Forums`_ for a full Django project incorporating numerous
-apps with the goal of providing an out of the box forums solution.
-
-Agora was originally built by Eldarion, incorporating code and ideas
-from various client projects. The clients were kind enough to allow
-Eldarion to open source the app and contribute it to Pinax.
-
-.. _Pinax Forums: https://github.com/pinax/pinax-project-forums
View
No changes.
View
@@ -1,44 +0,0 @@
-from django.contrib import admin
-
-from agora import models
-
-
-class ForumThreadAdmin(admin.ModelAdmin):
-
- class ForumThreadReplyInline(admin.StackedInline):
- model = models.ForumReply
- extra = 1
-
- list_display = [
- "id",
- "title",
- "created",
- "author",
- "view_count",
- "reply_count",
- "subscriber_count",
- ]
- inlines = [
- ForumThreadReplyInline
- ]
-
-
-admin.site.register(
- models.ForumCategory,
- list_display=[
- "title",
- "parent"
- ]
-)
-admin.site.register(
- models.Forum,
- list_display=[
- "id",
- "title",
- "parent",
- "category",
- "view_count",
- "post_count"
- ]
-)
-admin.site.register(models.ForumThread, ForumThreadAdmin)
View
@@ -1,6 +0,0 @@
-from django.utils.html import urlize, linebreaks, escape
-from django.utils.safestring import mark_safe
-
-
-def default_text(text):
- return mark_safe(linebreaks(urlize(escape(text))))
View
@@ -1,28 +0,0 @@
-from django.conf import settings # noqa
-from django.core.exceptions import ImproperlyConfigured
-from django.utils import importlib
-
-from appconf import AppConf
-
-
-def load_path_attr(path):
- i = path.rfind(".")
- module, attr = path[:i], path[i + 1:]
- try:
- mod = importlib.import_module(module)
- except ImportError, e:
- raise ImproperlyConfigured("Error importing {0}: '{1}'".format(module, e))
- try:
- attr = getattr(mod, attr)
- except AttributeError:
- raise ImproperlyConfigured("Module '{0}' does not define a '{1}'".format(module, attr))
- return attr
-
-
-class AgoraAppConf(AppConf):
-
- PARSER = "agora.callbacks.default_text"
- EDIT_TIMEOUT = dict(minutes=3)
-
- def configure_parser(self, value):
- return load_path_attr(value)
View
@@ -1,30 +0,0 @@
-from django import forms
-
-from agora.models import ForumThread, ForumReply
-
-
-class PostForm(object):
-
- def __init__(self, *args, **kwargs):
- no_subscribe = kwargs.pop("no_subscribe", False)
- super(PostForm, self).__init__(*args, **kwargs)
- if no_subscribe:
- del self.fields["subscribe"]
-
-
-class ThreadForm(PostForm, forms.ModelForm):
-
- subscribe = forms.BooleanField(required=False)
-
- class Meta:
- model = ForumThread
- fields = ["title", "content"]
-
-
-class ReplyForm(PostForm, forms.ModelForm):
-
- subscribe = forms.BooleanField(required=False)
-
- class Meta:
- model = ForumReply
- fields = ["content"]
View
@@ -1,34 +0,0 @@
-from django.db import models
-
-
-class ForumThreadPostQuerySet(models.query.QuerySet):
-
- def iterator(self):
- queryset = super(ForumThreadPostQuerySet, self).iterator()
- reverse = self._posts_manager_params["reverse"]
- thread = self._posts_manager_params["thread"]
- if not reverse:
- yield thread
- for obj in queryset:
- yield obj
- if reverse:
- yield thread
-
- def _clone(self, *args, **kwargs):
- kwargs["_posts_manager_params"] = self._posts_manager_params
- return super(ForumThreadPostQuerySet, self)._clone(*args, **kwargs)
-
-
-class ForumThreadManager(models.Manager):
-
- def posts(self, thread, reverse=False):
- from agora.models import ForumReply # @@@ this seems like a code smell
- queryset = ForumThreadPostQuerySet(ForumReply, using=self._db)
- queryset._posts_manager_params = {
- "reverse": reverse,
- "thread": thread,
- }
- queryset = queryset.filter(thread=thread)
- queryset = queryset.select_related("thread")
- queryset = queryset.order_by("{0}created".format(reverse and "-" or ""))
- return queryset
Oops, something went wrong.

0 comments on commit 7b28356

Please sign in to comment.