Merge lp:~dholbach/developer-ubuntu-com/1525202 into lp:developer-ubuntu-com

Proposed by Daniel Holbach
Status: Superseded
Proposed branch: lp:~dholbach/developer-ubuntu-com/1525202
Merge into: lp:developer-ubuntu-com
Diff against target: 313 lines (+91/-26) (has conflicts)
7 files modified
Makefile (+16/-3)
developer_portal/blog/views.py (+15/-5)
developer_portal/management/commands/initdb.py (+25/-14)
developer_portal/settings.py (+6/-0)
locale/developer_portal.pot (+4/-4)
pip-cache-revno.txt (+4/-0)
requirements.txt (+21/-0)
Text conflict in Makefile
Text conflict in developer_portal/management/commands/initdb.py
Text conflict in developer_portal/settings.py
Text conflict in pip-cache-revno.txt
Text conflict in requirements.txt
To merge this branch: bzr merge lp:~dholbach/developer-ubuntu-com/1525202
Reviewer Review Type Date Requested Status
Ubuntu App Developer site developers Pending
Review via email: mp+280317@code.launchpad.net

This proposal supersedes a proposal from 2015-12-11.

This proposal has been superseded by a proposal from 2015-12-11.

To post a comment you must log in.
166. By Daniel Holbach

use parentheses around print statements, use {} for formatting

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2015-12-04 11:49:10 +0000
+++ Makefile 2015-12-11 15:39:09 +0000
@@ -14,8 +14,13 @@
1414
15swift-perms:15swift-perms:
16 @echo "Setting up Swift bucket permissions"16 @echo "Setting up Swift bucket permissions"
17<<<<<<< TREE
17 @if [ "${SWIFT_CONTAINER_NAME}" = "" ]; then echo "Using default upload container"; http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' devportal_uploaded; else http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' $(SWIFT_CONTAINER_NAME); fi18 @if [ "${SWIFT_CONTAINER_NAME}" = "" ]; then echo "Using default upload container"; http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' devportal_uploaded; else http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' $(SWIFT_CONTAINER_NAME); fi
18 @if [ "${SWIFT_STATICCONTAINER_NAME}" = "" ]; then echo "Using default static container"; http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' devportal_static; else http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' $(SWIFT_STATICCONTAINER_NAME); fi19 @if [ "${SWIFT_STATICCONTAINER_NAME}" = "" ]; then echo "Using default static container"; http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' devportal_static; else http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" swift post --read-acl '.r:*' $(SWIFT_STATICCONTAINER_NAME); fi
20=======
21 @if [ "${SWIFT_CONTAINER_NAME}" = "" ]; then echo "Using default upload container"; swift post --read-acl '.r:*' devportal_uploaded; else swift post --read-acl '.r:*' $(SWIFT_CONTAINER_NAME); fi
22 @if [ "${SWIFT_STATICCONTAINER_NAME}" = "" ]; then echo "Using default static container"; swift post --read-acl '.r:*' devportal_static; else swift post --read-acl '.r:*' $(SWIFT_STATICCONTAINER_NAME); fi
23>>>>>>> MERGE-SOURCE
1924
20update-apidocs:25update-apidocs:
21 if [ $(DATABASE_URL) ]; then DJANGO_SETTINGS_MODULE=charm_settings ./update_apidocs.sh > ${PWD}/../../logs/update_apidocs.log 2>${PWD}/../../logs/update_apidocs_errors.log; fi26 if [ $(DATABASE_URL) ]; then DJANGO_SETTINGS_MODULE=charm_settings ./update_apidocs.sh > ${PWD}/../../logs/update_apidocs.log 2>${PWD}/../../logs/update_apidocs_errors.log; fi
@@ -51,28 +56,36 @@
51collectstatic: collectstatic.done56collectstatic: collectstatic.done
52collectstatic.done:57collectstatic.done:
53 @echo "Collecting static files"58 @echo "Collecting static files"
59<<<<<<< TREE
54 @http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" python manage.py collectstatic -v 0 --noinput --settings charm_settings 2>/dev/null60 @http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" python manage.py collectstatic -v 0 --noinput --settings charm_settings 2>/dev/null
61=======
62 @python manage.py collectstatic -v 0 --noinput --settings charm_settings 2>/dev/null
63>>>>>>> MERGE-SOURCE
55 @touch collectstatic.done64 @touch collectstatic.done
5665
57collectstatic.debug:66collectstatic.debug:
58 @echo "Debugging output from collectstatic"67 @echo "Debugging output from collectstatic"
68<<<<<<< TREE
59 @http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" python manage.py collectstatic -v 1 --noinput --settings charm_settings69 @http_proxy="${swift_proxy}" https_proxy="${swift_proxy}" python manage.py collectstatic -v 1 --noinput --settings charm_settings
70=======
71 @python manage.py collectstatic -v 1 --noinput --settings charm_settings
72>>>>>>> MERGE-SOURCE
6073
61update-pip-cache:74update-pip-cache:
62 @echo "Updating pip-cache"75 @echo "Updating pip-cache"
63 rm -rf pip-cache76 rm -rf pip-cache
64 bzr branch lp:~developer-ubuntu-com-dev/developer-ubuntu-com/dependencies pip-cache77 bzr branch lp:developer-ubuntu-com/dependencies pip-cache
65 pip install --exists-action=w --download pip-cache/ -r requirements.txt78 pip install --exists-action=w --download pip-cache/ -r requirements.txt
66 bzr add pip-cache/* 79 bzr add pip-cache/*
67 bzr commit pip-cache/ -m 'automatically updated devportal requirements'80 bzr commit pip-cache/ -m 'automatically updated devportal requirements'
68 bzr push --directory pip-cache lp:~developer-ubuntu-com-dev/developer-ubuntu-com/dependencies81 bzr push --directory pip-cache lp:developer-ubuntu-com/dependencies
69 bzr revno pip-cache > pip-cache-revno.txt82 bzr revno pip-cache > pip-cache-revno.txt
70 rm -rf pip-cache83 rm -rf pip-cache
71 @echo "** Remember to commit pip-cache-revno.txt"84 @echo "** Remember to commit pip-cache-revno.txt"
7285
73pip-cache:86pip-cache:
74 @echo "Downloading pip-cache"87 @echo "Downloading pip-cache"
75 @bzr branch -r `cat pip-cache-revno.txt` lp:~developer-ubuntu-com-dev/developer-ubuntu-com/dependencies pip-cache88 @bzr branch -r `cat pip-cache-revno.txt` lp:developer-ubuntu-com/dependencies pip-cache
7689
77env: pip-cache90env: pip-cache
78 @echo "Creating virtualenv"91 @echo "Creating virtualenv"
7992
=== modified file 'developer_portal/blog/views.py'
--- developer_portal/blog/views.py 2015-12-04 11:49:10 +0000
+++ developer_portal/blog/views.py 2015-12-11 15:39:09 +0000
@@ -43,7 +43,9 @@
43 return super(MultiLangEntryYear, self).get(request, *args, **kwargs)43 return super(MultiLangEntryYear, self).get(request, *args, **kwargs)
4444
45 def get_dated_queryset(self, ordering=None, **lookup):45 def get_dated_queryset(self, ordering=None, **lookup):
46 return super(MultiLangEntryYear, self).get_dated_queryset(ordering, **lookup).filter(categories__slug=self.language)46 if ordering:
47 return super(MultiLangEntryYear, self).get_dated_queryset(**lookup).filter(categories__slug=self.language).order_by(ordering)
48 return super(MultiLangEntryYear, self).get_dated_queryset(**lookup).filter(categories__slug=self.language)
4749
48class MultiLangEntryMonth(MultiLangMixin, EntryMonth):50class MultiLangEntryMonth(MultiLangMixin, EntryMonth):
49 def get(self, request, *args, **kwargs):51 def get(self, request, *args, **kwargs):
@@ -51,7 +53,9 @@
51 return super(MultiLangEntryMonth, self).get(request, *args, **kwargs)53 return super(MultiLangEntryMonth, self).get(request, *args, **kwargs)
5254
53 def get_dated_queryset(self, ordering=None, **lookup):55 def get_dated_queryset(self, ordering=None, **lookup):
54 return super(MultiLangEntryMonth, self).get_dated_queryset(ordering, **lookup).filter(categories__slug=self.language)56 if ordering:
57 return super(MultiLangEntryMonth, self).get_dated_queryset(**lookup).filter(categories__slug=self.language).order_by(ordering)
58 return super(MultiLangEntryMonth, self).get_dated_queryset(**lookup).filter(categories__slug=self.language)
5559
56class MultiLangEntryWeek(MultiLangMixin, EntryWeek):60class MultiLangEntryWeek(MultiLangMixin, EntryWeek):
57 def get(self, request, *args, **kwargs):61 def get(self, request, *args, **kwargs):
@@ -59,7 +63,9 @@
59 return super(MultiLangEntryWeek, self).get(request, *args, **kwargs)63 return super(MultiLangEntryWeek, self).get(request, *args, **kwargs)
6064
61 def get_dated_queryset(self, ordering=None, **lookup):65 def get_dated_queryset(self, ordering=None, **lookup):
62 return super(MultiLangEntryWeek, self).get_dated_queryset(ordering, **lookup).filter(categories__slug=self.language)66 if ordering:
67 return super(MultiLangEntryWeek, self).get_dated_queryset(**lookup).filter(categories__slug=self.language).order_by(ordering)
68 return super(MultiLangEntryWeek, self).get_dated_queryset(**lookup).filter(categories__slug=self.language)
6369
64class MultiLangEntryDay(MultiLangMixin, EntryDay):70class MultiLangEntryDay(MultiLangMixin, EntryDay):
65 def get(self, request, *args, **kwargs):71 def get(self, request, *args, **kwargs):
@@ -67,7 +73,9 @@
67 return super(MultiLangEntryDay, self).get(request, *args, **kwargs)73 return super(MultiLangEntryDay, self).get(request, *args, **kwargs)
6874
69 def get_dated_queryset(self, ordering=None, **lookup):75 def get_dated_queryset(self, ordering=None, **lookup):
70 return super(MultiLangEntryDay, self).get_dated_queryset(ordering, **lookup).filter(categories__slug=self.language)76 if ordering:
77 return super(MultiLangEntryDay, self).get_dated_queryset(**lookup).filter(categories__slug=self.language).order_by(ordering)
78 return super(MultiLangEntryDay, self).get_dated_queryset(**lookup).filter(categories__slug=self.language)
7179
72class MultiLangEntryToday(MultiLangMixin, EntryToday):80class MultiLangEntryToday(MultiLangMixin, EntryToday):
73 def get(self, request, *args, **kwargs):81 def get(self, request, *args, **kwargs):
@@ -75,4 +83,6 @@
75 return super(MultiLangEntryToday, self).get(request, *args, **kwargs)83 return super(MultiLangEntryToday, self).get(request, *args, **kwargs)
7684
77 def get_dated_queryset(self, ordering=None, **lookup):85 def get_dated_queryset(self, ordering=None, **lookup):
78 return super(MultiLangEntryToday, self).get_dated_queryset(ordering, **lookup).filter(categories__slug=self.language)86 if ordering:
87 return super(MultiLangEntryToday, self).get_dated_queryset(**lookup).filter(categories__slug=self.language).order_by(ordering)
88 return super(MultiLangEntryToday, self).get_dated_queryset(**lookup).filter(categories__slug=self.language)
7989
=== modified file 'developer_portal/management/commands/initdb.py'
--- developer_portal/management/commands/initdb.py 2015-12-04 11:49:10 +0000
+++ developer_portal/management/commands/initdb.py 2015-12-11 15:39:09 +0000
@@ -1,17 +1,12 @@
1#!/usr/bin/python1#!/usr/bin/python
22
3from django.core.management.base import BaseCommand3from django.core.management.base import BaseCommand
4from optparse import make_option
5
6from django.conf import settings4from django.conf import settings
75
8import subprocess6from django.contrib.auth.models import User, Permission
9import os
10import sys
11
12from django.contrib.auth.models import User, Group, Permission
13from django.contrib.contenttypes.models import ContentType
14from cms.models.permissionmodels import PageUserGroup, GlobalPagePermission7from cms.models.permissionmodels import PageUserGroup, GlobalPagePermission
8from zinnia.models import Category
9
1510
16class Command(BaseCommand):11class Command(BaseCommand):
17 help = "Make sure the Developer Portal database is set up properly."12 help = "Make sure the Developer Portal database is set up properly."
@@ -27,17 +22,18 @@
27 admin.save()22 admin.save()
2823
29 if hasattr(settings, 'ADMIN_GROUP') and settings.ADMIN_GROUP != "":24 if hasattr(settings, 'ADMIN_GROUP') and settings.ADMIN_GROUP != "":
30 print "Configuring "+settings.ADMIN_GROUP+" group."25 print("Configuring {} group.".format(settings.ADMIN_GROUP))
31 admins, created = PageUserGroup.objects.get_or_create(name=settings.ADMIN_GROUP, defaults={'created_by': admin})26 admins, created = PageUserGroup.objects.get_or_create(
27 name=settings.ADMIN_GROUP, defaults={'created_by': admin})
32 admins.permissions.add(*list(all_perms))28 admins.permissions.add(*list(all_perms))
3329
34 print "Configuring global permissions for group."30 print "Configuring global permissions for group."
35 adminperms, created = GlobalPagePermission.objects.get_or_create(31 adminperms, created = GlobalPagePermission.objects.get_or_create(
36 # who:32 # who:
37 group = admins,33 group=admins,
3834
39 # what:35 # what:
40 defaults = {36 defaults={
41 'can_change': True,37 'can_change': True,
42 'can_add': True,38 'can_add': True,
43 'can_delete': True,39 'can_delete': True,
@@ -52,17 +48,24 @@
5248
53 if hasattr(settings, 'EDITOR_GROUP') and settings.EDITOR_GROUP != "":49 if hasattr(settings, 'EDITOR_GROUP') and settings.EDITOR_GROUP != "":
54 print "Configuring "+settings.EDITOR_GROUP+" group."50 print "Configuring "+settings.EDITOR_GROUP+" group."
51<<<<<<< TREE
55 editors, created = PageUserGroup.objects.get_or_create(name=settings.EDITOR_GROUP, defaults={'created_by': admin})52 editors, created = PageUserGroup.objects.get_or_create(name=settings.EDITOR_GROUP, defaults={'created_by': admin})
56 page_perms = Permission.objects.filter(content_type__app_label='cms', content_type__name='page')53 page_perms = Permission.objects.filter(content_type__app_label='cms', content_type__name='page')
54=======
55 editors, created = PageUserGroup.objects.get_or_create(
56 name=settings.EDITOR_GROUP, defaults={'created_by': admin})
57 page_perms = Permission.objects.filter(
58 content_type__app_label='cms', content_type__model='page')
59>>>>>>> MERGE-SOURCE
57 editors.permissions.add(*list(page_perms))60 editors.permissions.add(*list(page_perms))
5861
59 print "Configuring global permissions for group."62 print "Configuring global permissions for group."
60 editorsperms, created = GlobalPagePermission.objects.get_or_create(63 editorsperms, created = GlobalPagePermission.objects.get_or_create(
61 # who:64 # who:
62 group = editors,65 group=editors,
6366
64 # what:67 # what:
65 defaults = {68 defaults={
66 'can_change': True,69 'can_change': True,
67 'can_add': True,70 'can_add': True,
68 'can_delete': True,71 'can_delete': True,
@@ -74,3 +77,11 @@
74 }77 }
75 )78 )
76 editorsperms.sites.add(settings.SITE_ID)79 editorsperms.sites.add(settings.SITE_ID)
80
81 print('Adding zinnia categories for the following: {}.'.format(
82 ', '.join([a[0] for a in settings.LANGUAGES])))
83 for lang in settings.LANGUAGES:
84 if lang[1] == 'Simplified Chinese':
85 Category.objects.get_or_create(title='Chinese', slug=lang[0])
86 else:
87 Category.objects.get_or_create(title=lang[1], slug=lang[0])
7788
=== modified file 'developer_portal/settings.py'
--- developer_portal/settings.py 2015-12-04 16:09:27 +0000
+++ developer_portal/settings.py 2015-12-11 15:39:09 +0000
@@ -290,11 +290,17 @@
290 'toolbar': 'Zinnia',290 'toolbar': 'Zinnia',
291 },291 },
292}292}
293<<<<<<< TREE
293294
294# Allow iframes in ckeditor295# Allow iframes in ckeditor
295TEXT_ADDITIONAL_TAGS = ('iframe',)296TEXT_ADDITIONAL_TAGS = ('iframe',)
296TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder')297TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder')
297298
299=======
300TEXT_ADDITIONAL_TAGS = ('iframe',)
301TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder')
302
303>>>>>>> MERGE-SOURCE
298CMSPLUGIN_ZINNIA_APP_URLS = ['developer_portal.blog.urls']304CMSPLUGIN_ZINNIA_APP_URLS = ['developer_portal.blog.urls']
299305
300REST_FRAMEWORK = {306REST_FRAMEWORK = {
301307
=== modified file 'locale/developer_portal.pot'
--- locale/developer_portal.pot 2015-09-04 13:37:10 +0000
+++ locale/developer_portal.pot 2015-12-11 15:39:09 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-09-04 12:56+0000\n"11"POT-Creation-Date: 2015-10-24 03:11+0000\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,17 +21,17 @@
21msgid "Raw HTML"21msgid "Raw HTML"
22msgstr ""22msgstr ""
2323
24#: developer_portal/models.py:2424#: developer_portal/models.py:26
25msgid "Launchpad branch location, ie: lp:snappy/15.04"25msgid "Launchpad branch location, ie: lp:snappy/15.04"
26msgstr ""26msgstr ""
2727
28#: developer_portal/models.py:2728#: developer_portal/models.py:29
29msgid ""29msgid ""
30"Path alias we want to use for the docs, ie \"snappy/guides/15.04\" or "30"Path alias we want to use for the docs, ie \"snappy/guides/15.04\" or "
31"\"snappy/guides/latest\", etc."31"\"snappy/guides/latest\", etc."
32msgstr ""32msgstr ""
3333
34#: developer_portal/models.py:3234#: developer_portal/models.py:34
35msgid "File name of doc to be used as index document, ie \"intro.md\""35msgid "File name of doc to be used as index document, ie \"intro.md\""
36msgstr ""36msgstr ""
3737
3838
=== modified file 'pip-cache-revno.txt'
--- pip-cache-revno.txt 2015-12-04 11:49:10 +0000
+++ pip-cache-revno.txt 2015-12-11 15:39:09 +0000
@@ -1,1 +1,5 @@
1<<<<<<< TREE
114214
3=======
417
5>>>>>>> MERGE-SOURCE
26
=== modified file 'requirements.txt'
--- requirements.txt 2015-12-04 11:49:10 +0000
+++ requirements.txt 2015-12-11 15:39:09 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1oslo.config==1.6.02oslo.config==1.6.0
2oslo.i18n==1.2.03oslo.i18n==1.2.0
3oslo.serialization==1.2.04oslo.serialization==1.2.0
@@ -8,17 +9,37 @@
8Pillow==2.6.19Pillow==2.6.1
9beautifulsoup4==4.4.010beautifulsoup4==4.4.0
10cmsplugin-zinnia==0.611cmsplugin-zinnia==0.6
12=======
13Django==1.8.7
14django-template-debug==0.3.5
15oslo.config==2.7.0
16oslo.i18n==2.7.0
17oslo.serialization==1.11.0
18oslo.utils==2.8.0
19Pillow==2.9.0
20cmsplugin-zinnia==0.8
21Markdown==2.6.5
22beautifulsoup4==4.4.1
23>>>>>>> MERGE-SOURCE
11dj-database-url==0.3.024dj-database-url==0.3.0
12django-admin-enhancer==0.1.3.125django-admin-enhancer==0.1.3.1
13django-appconf==0.626django-appconf==0.6
14django-blog-zinnia==0.14.227django-blog-zinnia==0.14.2
15django-ckeditor==4.4.728django-ckeditor==4.4.7
16django-ckeditor-updated==4.4.429django-ckeditor-updated==4.4.4
30<<<<<<< TREE
17django-classy-tags==0.5.131django-classy-tags==0.5.1
18django-cms==3.0.632django-cms==3.0.6
19django-contrib-comments==1.533django-contrib-comments==1.5
20django-meta==0.2.034django-meta==0.2.0
21django-meta-mixin==0.1.135django-meta-mixin==0.1.1
36=======
37django-classy-tags==0.6.2
38django-cms==3.2.0
39django-contrib-comments==1.6.1
40django-meta==0.3.1
41django-meta-mixin==0.2.1
42>>>>>>> MERGE-SOURCE
22django-missing==0.1.1343django-missing==0.1.13
23django-mptt==0.7.444django-mptt==0.7.4
24django-parler==1.1.145django-parler==1.1.1

Subscribers

People subscribed via source and target branches