git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor cosmetic cleanup of model references following the models module restructuring.
[philo.git]
/
models
/
nodes.py
diff --git
a/models/nodes.py
b/models/nodes.py
index
6bdc85d
..
78df3d6
100644
(file)
--- a/
models/nodes.py
+++ b/
models/nodes.py
@@
-1,4
+1,5
@@
from django.db import models
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
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'
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
class MultiNode(Node):
accepts_subpath = True