X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/2b808329bca3af8d614aa13af7b6ccf24092d4ce..806ef92a88cc844c47e59220ada96477a4ce601a:/models/nodes.py?ds=inline diff --git a/models/nodes.py b/models/nodes.py index 6bdc85d..78df3d6 100644 --- a/models/nodes.py +++ b/models/nodes.py @@ -1,4 +1,5 @@ from django.db import models +from django.contrib.sites.models import Site from django.http import HttpResponse, HttpResponseServerError, HttpResponseRedirect from django.core.servers.basehttp import FileWrapper from philo.models.base import InheritableTreeEntity @@ -16,6 +17,10 @@ class Node(InheritableTreeEntity): app_label = 'philo' +# the following line enables the selection of a node as the root for a given django.contrib.sites Site object +models.ForeignKey(Node, related_name='sites', null=True, blank=True).contribute_to_class(Site, 'root_node') + + class MultiNode(Node): accepts_subpath = True