Skip to content
Browse files

Merge pull request #1483 from tomscytale/develop

Develop: Django 1.5 compatibility - remove simple_class_factory and verify_exists
  • Loading branch information...
2 parents 4d79785 + 97073ff commit ae6beb6da5635e63f044fa280882d38a3aae7d35 @digi604 committed Oct 18, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 cms/models/pluginmodel.py
  2. +2 −2 cms/plugins/link/models.py
View
4 cms/models/pluginmodel.py
@@ -6,7 +6,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db import models
-from django.db.models.base import (model_unpickle, simple_class_factory)
+from django.db.models.base import model_unpickle
from django.db.models.query_utils import DeferredAttribute
from django.utils.translation import ugettext_lazy as _
@@ -125,7 +125,7 @@ def __reduce__(self):
obj = self.__class__.__dict__[field.attname]
model = obj.model_ref()
else:
- factory = simple_class_factory
+ factory = lambda x, y: x
return (model_unpickle, (model, defers, factory), data)
def __unicode__(self):
View
4 cms/plugins/link/models.py
@@ -8,7 +8,7 @@ class Link(CMSPlugin):
"""
name = models.CharField(_("name"), max_length=256)
- url = models.URLField(_("link"), verify_exists=False, blank=True, null=True)
+ url = models.URLField(_("link"), blank=True, null=True)
page_link = models.ForeignKey(Page, verbose_name=_("page"), blank=True, null=True, help_text=_("A link to a page has priority over a text link."))
mailto = models.EmailField(_("mailto"), blank=True, null=True, help_text=_("An email adress has priority over a text link."))
target = models.CharField(_("target"), blank=True, max_length=100, choices=((
@@ -17,7 +17,7 @@ class Link(CMSPlugin):
("_parent", _("parent window")),
("_top", _("topmost frame")),
)))
-
+
def __unicode__(self):
return self.name

0 comments on commit ae6beb6

Please sign in to comment.
Something went wrong with that request. Please try again.