Merge lp:~dholbach/developer-ubuntu-com/fix-imports into lp:~developer-ubuntu-com-dev/developer-ubuntu-com/snappy-docs-import

Proposed by Daniel Holbach
Status: Rejected
Rejected by: Daniel Holbach
Proposed branch: lp:~dholbach/developer-ubuntu-com/fix-imports
Merge into: lp:~developer-ubuntu-com-dev/developer-ubuntu-com/snappy-docs-import
Diff against target: 30 lines (+1/-5)
1 file modified
developer_portal/management/commands/import-snappy-branches.py (+1/-5)
To merge this branch: bzr merge lp:~dholbach/developer-ubuntu-com/fix-imports
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Disapprove
Michael Hall Pending
Review via email: mp+267166@code.launchpad.net

Commit message

simplify cms.* imports

Description of the change

simplify cms.* imports

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Unnecessary.

review: Disapprove

Unmerged revisions

141. By Daniel Holbach

fix cms.* imports

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'developer_portal/management/commands/import-snappy-branches.py'
2--- developer_portal/management/commands/import-snappy-branches.py 2015-07-31 12:58:32 +0000
3+++ developer_portal/management/commands/import-snappy-branches.py 2015-08-06 09:43:45 +0000
4@@ -1,7 +1,7 @@
5 from django.core.management.base import BaseCommand
6
7 from cms.api import create_page, add_plugin
8-from cms.models import Title
9+from cms.models import Title, Page
10
11 from bs4 import BeautifulSoup
12 import codecs
13@@ -76,8 +76,6 @@
14
15 def publish(self):
16 '''Publishes pages in their branch alias namespace.'''
17- from cms.api import create_page, add_plugin
18-
19 page = create_page(
20 self.title, "default.html", "en", slug=self.slug,
21 menu_title=self.title, parent=RELEASE_PAGES[self.release_alias],
22@@ -207,8 +205,6 @@
23 # different pages
24
25 '''Removes all pages in snappy/guides, created by the importer.'''
26- from cms.models import Title, Page
27-
28 pages_to_remove = []
29 aliases = "|".join(
30 ExternalDocsBranch.objects.values_list('docs_namespace', flat=True))

Subscribers

People subscribed via source and target branches