Merge branch 'django1.6-compatibility' of https://github.com/mbrochh/symposion into mbrochh-django1.6-compatibility
Conflicts: symposion/boxes/urls.py symposion/cms/urls.py symposion/conference/urls.py symposion/proposals/models.py symposion/proposals/urls.py symposion/reviews/urls.py symposion/schedule/models.py symposion/schedule/urls.py symposion/speakers/urls.py symposion/sponsorship/urls.py symposion/teams/urls.py
This commit is contained in:
commit
cb4b0fac38
12 changed files with 30 additions and 32 deletions
|
@ -1,5 +1,4 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.boxes.views",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
|
||||
|
||||
PAGE_RE = r"(([\w-]{1,})(/[\w-]{1,})*)/"
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.conference.views",
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import datetime
|
||||
import os
|
||||
import uuid
|
||||
|
||||
|
@ -6,6 +5,7 @@ from django.core.urlresolvers import reverse
|
|||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.timezone import now
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
@ -37,20 +37,18 @@ class ProposalSection(models.Model):
|
|||
|
||||
@classmethod
|
||||
def available(cls):
|
||||
now = datetime.datetime.now()
|
||||
return cls._default_manager.filter(
|
||||
Q(start__lt=now) | Q(start=None),
|
||||
Q(end__gt=now) | Q(end=None),
|
||||
Q(start__lt=now()) | Q(start=None),
|
||||
Q(end__gt=now()) | Q(end=None),
|
||||
Q(closed=False) | Q(closed=None),
|
||||
)
|
||||
|
||||
def is_available(self):
|
||||
if self.closed:
|
||||
return False
|
||||
now = datetime.datetime.now()
|
||||
if self.start and self.start > now:
|
||||
if self.start and self.start > now():
|
||||
return False
|
||||
if self.end and self.end < now:
|
||||
if self.end and self.end < now():
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -102,7 +100,7 @@ class ProposalBase(models.Model):
|
|||
"target='_blank'>Markdown</a>.")
|
||||
)
|
||||
submitted = models.DateTimeField(
|
||||
default=datetime.datetime.now,
|
||||
default=now,
|
||||
editable=False,
|
||||
)
|
||||
speaker = models.ForeignKey("speakers.Speaker", related_name="proposals")
|
||||
|
@ -175,7 +173,8 @@ class SupportingDocument(models.Model):
|
|||
proposal = models.ForeignKey(ProposalBase, related_name="supporting_documents")
|
||||
|
||||
uploaded_by = models.ForeignKey(User)
|
||||
created_at = models.DateTimeField(default=datetime.datetime.now)
|
||||
|
||||
created_at = models.DateTimeField(default=now)
|
||||
|
||||
file = models.FileField(upload_to=uuid_filename)
|
||||
description = models.CharField(max_length=140)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.proposals.views",
|
||||
|
|
|
@ -7,7 +7,12 @@ from django.core.urlresolvers import reverse
|
|||
from django.db.models import Q
|
||||
from django.http import Http404, HttpResponse, HttpResponseForbidden
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.utils.hashcompat import sha_constructor
|
||||
|
||||
try:
|
||||
from hashlib import sha1 as sha_constructor
|
||||
except ImportError:
|
||||
from django.utils.hashcompat import sha_constructor
|
||||
|
||||
from django.views import static
|
||||
|
||||
from django.contrib import messages
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.reviews.views",
|
||||
|
|
|
@ -80,8 +80,9 @@ class Slot(models.Model):
|
|||
Unassign the associated content with this slot.
|
||||
"""
|
||||
if self.content and self.content.slot_id:
|
||||
self.content.slot = None
|
||||
self.content.save()
|
||||
presentation = self.content
|
||||
presentation.slot = None
|
||||
presentation.save()
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.schedule.views",
|
||||
url(r"^$", "schedule_conference", name="schedule_conference"),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.speakers.views",
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
from django.views.generic.simple import direct_to_template
|
||||
from django.conf.urls import patterns, url
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.sponsorship.views",
|
||||
url(r"^$", direct_to_template, {"template": "sponsorship/list.html"}, name="sponsor_list"),
|
||||
url(r"^$", TemplateView.as_view(template_name="sponsorship/list.html"), name="sponsor_list"),
|
||||
url(r"^apply/$", "sponsor_apply", name="sponsor_apply"),
|
||||
url(r"^add/$", "sponsor_add", name="sponsor_add"),
|
||||
url(r"^(?P<pk>\d+)/$", "sponsor_detail", name="sponsor_detail"),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# flake8: noqa
|
||||
from django.conf.urls.defaults import *
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
|
||||
urlpatterns = patterns("symposion.teams.views",
|
||||
|
|
Loading…
Reference in a new issue