commit
bfd2925c60
19 changed files with 152 additions and 206 deletions
|
@ -1,7 +1,4 @@
|
|||
import datetime
|
||||
|
||||
from django.db import models
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
import reversion
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
from django import template
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.encoding import smart_str
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.template.defaulttags import kwarg_re
|
||||
|
||||
from symposion.boxes.models import Box
|
||||
from symposion.boxes.forms import BoxForm
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
from django.conf import settings
|
||||
|
||||
from appconf import AppConf
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.conference.views",
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import html5lib
|
||||
from html5lib import html5parser, sanitizer
|
||||
|
||||
import markdown
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
from django.db import models
|
||||
from django.db.models.query import QuerySet
|
||||
|
||||
|
||||
class CachingM2MQuerySet(QuerySet):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CachingM2MQuerySet, self).__init__(*args, **kwargs)
|
||||
self.cached_m2m_field = kwargs["m2m_field"]
|
||||
|
||||
def iterator(self):
|
||||
parent_iter = super(CachingM2MQuerySet, self).iterator()
|
||||
m2m_model = getattr(self.model, self.cached_m2m_field).through
|
||||
|
||||
for obj in parent_iter:
|
||||
if obj.id in cached_objects:
|
||||
setattr(obj, "_cached_m2m_%s" % self.cached_m2m_field)
|
||||
yield obj
|
||||
|
||||
|
||||
class ProposalManager(models.Manager):
|
||||
def cache_m2m(self, m2m_field):
|
||||
return CachingM2MQuerySet(self.model, using=self._db, m2m_field=m2m_field)
|
||||
AdditionalSpeaker = queryset.model.additional_speakers.through
|
||||
additional_speakers = collections.defaultdict(set)
|
||||
for additional_speaker in AdditionalSpeaker._default_manager.filter(proposal__in=queryset).select_related("speaker__user"):
|
||||
additional_speakers[additional_speaker.proposal_id].add(additional_speaker.speaker)
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.proposals.views",
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
from symposion.proposals.models import ProposalSection
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
import csv
|
||||
import os
|
||||
import random
|
||||
|
||||
from django.contrib.auth import models
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from symposion.reviews.models import ReviewAssignment
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
|
||||
from django.contrib.auth.models import Group
|
||||
|
||||
from symposion.reviews.models import ProposalResult
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django import template
|
||||
|
||||
from symposion.reviews.models import Review, ReviewAssignment
|
||||
from symposion.reviews.models import ReviewAssignment
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import re
|
||||
|
||||
from django.core.mail import send_mass_mail
|
||||
from django.db.models import Q
|
||||
from django.http import HttpResponseBadRequest, HttpResponseNotAllowed
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.core.exceptions import ObjectDoesNotExist
|
|||
from django.db import models
|
||||
|
||||
from markitup.fields import MarkupField
|
||||
from model_utils.managers import InheritanceManager
|
||||
|
||||
from symposion.proposals.models import ProposalBase
|
||||
from symposion.conference.models import Section
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import itertools
|
||||
import operator
|
||||
|
||||
from django.db.models import Count, Min
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.http import Http404, HttpResponse
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
from django.template import loader, Context
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import csv
|
||||
import os
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from symposion.speakers.models import Speaker
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.speakers.views",
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
|
||||
from django.contrib.auth.models import Group
|
||||
|
||||
from symposion.sponsorship.models import Sponsor, SponsorBenefit
|
||||
from symposion.sponsorship.models import Sponsor, SponsorBenefit, SponsorLevel
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.teams.views",
|
||||
|
|
Loading…
Reference in a new issue