Commits

Kai Diefenbach committed f599219

Install lfc_page within lfc_init_simple

  • Participants
  • Parent commits 6e55db7

Comments (0)

Files changed (3)

lfc/management/commands/lfc_init_simple.py

 from django.contrib.contenttypes.models import ContentType
 
 # lfc imports
+from lfc.models import Application
 from lfc.models import Portal
-from lfc.models import Page
 from lfc.models import WorkflowStatesInformation
 
+# lfc_page imports
+from lfc_page.models import Page
+
 # portlets import
 from portlets.models import Slot
 
 import workflows.utils
 from workflows.models import State
 from workflows.models import StateInheritanceBlock
-from workflows.models import StatePermissionRelation
 from workflows.models import Transition
 from workflows.models import Workflow
 from workflows.models import WorkflowPermissionRelation
 
 # utils imports
 from lfc.utils.initialize import initialize
+from lfc.utils import import_module
 from utils import WELCOME_DESCRIPTION
 
 
 
         portal.standard = page
         portal.save()
+
+        import_module("lfc_page").install()
+        try:
+            Application.objects.create(name="lfc_page")
+        except Application.DoesNotExist:
+            pass
+
         considered global and can be used within any text editor field.
 
     """
-    site = models.ForeignKey(Site, verbose_name=_(u"Site"))
     title = models.CharField(_(u"Title"), blank=True, max_length=100)
     standard = models.ForeignKey("BaseContent", verbose_name=_(u"Page"), blank=True, null=True)
 

lfc/templatetags/lfc_tags.py

     return {
         "language": language,
         "tabs": tabs,
-        "portal": lfc.utils.get_portal(request),
+        "portal": lfc.utils.get_portal(),
     }