All of lore.kernel.org
 help / color / mirror / Atom feed
* [layerindex-web][PATCH 0/3] Fixes for some recent changes
@ 2018-05-04 11:55 Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 1/3] views: fix regression in publish email sending code Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Eggleton @ 2018-05-04 11:55 UTC (permalink / raw)
  To: yocto

Fix a few regressions I recently introduced.


The following changes since commit b4cfb049d9fda7fe82f97f8532abdb7272cf0a76:

  requirements.txt: bump Django and other dependency versions (2018-05-01 10:10:21 +1200)

are available in the Git repository at:

  git://git.yoctoproject.org/layerindex-web paule/fixes1
  http://git.yoctoproject.org/cgit.cgi//log/?h=paule/fixes1

Paul Eggleton (3):
  views: fix regression in publish email sending code
  requirements.txt: fix some conflicting requirements
  detail: Fix layer description not wrapping properly

 layerindex/views.py              | 9 ++++-----
 requirements.txt                 | 6 +++---
 templates/layerindex/detail.html | 2 +-
 3 files changed, 8 insertions(+), 9 deletions(-)

-- 
2.14.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [layerindex-web][PATCH 1/3] views: fix regression in publish email sending code
  2018-05-04 11:55 [layerindex-web][PATCH 0/3] Fixes for some recent changes Paul Eggleton
@ 2018-05-04 11:55 ` Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 2/3] requirements.txt: fix some conflicting requirements Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 3/3] detail: Fix layer description not wrapping properly Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2018-05-04 11:55 UTC (permalink / raw)
  To: yocto

In e902b67bccddf34d8bbd65ad6c81d078e945ebb8 I missed a couple of Context
usages in the layer publish view and the result was that it broke
publishing a layer (and apparently I didn't run a final test on that,
shame on me).

Thanks to Yi Zhao <yi.zhao@windriver.com> for pointing this out.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 layerindex/views.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/layerindex/views.py b/layerindex/views.py
index c84982ae..bc3cddfa 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -20,7 +20,6 @@ from django.db import transaction
 from django.contrib.auth.models import User, Permission
 from django.db.models import Q, Count, Sum
 from django.template.loader import get_template
-from django.template import Context
 from django.utils.decorators import method_decorator
 from django.contrib.auth.decorators import login_required
 from django.contrib import messages
@@ -277,19 +276,19 @@ def publish_view(request, name):
             break
 
     # create subject from subject template
-    d = Context({
+    d = {
         'layer_name': layeritem.name,
         'site_name': request.META['HTTP_HOST'],
-    })
+    }
     subject = subjecttext.render(d).rstrip()
 
     #create body from body template
-    d = Context({
+    d = {
         'maintainers': maintainer_names,
         'layer_name': layeritem.name,
         'layer_url': layer_url,
         'help_contact': help_contact,
-    })
+    }
     body = bodytext.render(d)
 
     tasks.send_email.apply_async((subject, body, from_email, [m.email for m in maintainers]))
-- 
2.14.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [layerindex-web][PATCH 2/3] requirements.txt: fix some conflicting requirements
  2018-05-04 11:55 [layerindex-web][PATCH 0/3] Fixes for some recent changes Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 1/3] views: fix regression in publish email sending code Paul Eggleton
@ 2018-05-04 11:55 ` Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 3/3] detail: Fix layer description not wrapping properly Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2018-05-04 11:55 UTC (permalink / raw)
  To: yocto

pip (strangely only in the python 2 version when I test it here) reports
that some of the versions in requirements.txt were incompatible:

django-nvd3 0.9.7 has requirement python-nvd3==0.14.2, but you'll have
python-nvd3 0.15.0 which is incompatible.
django-registration 2.4.1 has requirement confusable-homoglyphs~=3.0,
but you'll have confusable-homoglyphs 2.0.2 which is incompatible.
python-nvd3 0.14.2 has requirement python-slugify==1.1.4, but you'll
have python-slugify 1.2.5 which is incompatible.

I'm not particularly keen on downgrading these but it seems like we
don't have much choice. Luckily looking over the changelogs it doesn't
seem like that will cause us any problems though.

Thanks to Yi Zhao <yi.zhao@windriver.com> for pointing this out.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 requirements.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/requirements.txt b/requirements.txt
index 604c653e..5ca7cf6e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,7 +2,7 @@ amqp==2.2.2
 anyjson==0.3.3
 billiard==3.5.0.3
 celery==4.1.0
-confusable-homoglyphs==2.0.2
+confusable-homoglyphs==3.0.0
 Django>1.11.0,<1.12
 django-cors-headers==1.1.0
 django-nvd3==0.9.7
@@ -19,8 +19,8 @@ kombu==4.1.0
 MarkupSafe==1.0
 mysqlclient==1.3.12
 Pillow==5.1.0
-python-nvd3==0.15.0
-python-slugify==1.2.5
+python-nvd3==0.14.2
+python-slugify==1.1.4
 pytz==2018.4
 six==1.11.0
 smmap==0.9.0
-- 
2.14.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [layerindex-web][PATCH 3/3] detail: Fix layer description not wrapping properly
  2018-05-04 11:55 [layerindex-web][PATCH 0/3] Fixes for some recent changes Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 1/3] views: fix regression in publish email sending code Paul Eggleton
  2018-05-04 11:55 ` [layerindex-web][PATCH 2/3] requirements.txt: fix some conflicting requirements Paul Eggleton
@ 2018-05-04 11:55 ` Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2018-05-04 11:55 UTC (permalink / raw)
  To: yocto

In 3adddf6a25977cb576f8fcefd307d947e43d637b I changed the style to allow
pre-formatted text to work in the layer description, but this broke
wrapping so that text could go behind the "Dependencies" box. Use the
"pre-wrap" style instead so that both pre-formatting and wrapping work
here.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 templates/layerindex/detail.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html
index d1e807be..220d475b 100644
--- a/templates/layerindex/detail.html
+++ b/templates/layerindex/detail.html
@@ -76,7 +76,7 @@
 
             <div class="row-fluid">
                 <div class="description span7">
-                    <p style="white-space: pre">{{ layeritem.description }}</p>
+                    <p style="white-space: pre-wrap">{{ layeritem.description }}</p>
                     <p>
                         {% if layeritem.usage_url %}
                             <span class="label label-info">
-- 
2.14.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-04 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-04 11:55 [layerindex-web][PATCH 0/3] Fixes for some recent changes Paul Eggleton
2018-05-04 11:55 ` [layerindex-web][PATCH 1/3] views: fix regression in publish email sending code Paul Eggleton
2018-05-04 11:55 ` [layerindex-web][PATCH 2/3] requirements.txt: fix some conflicting requirements Paul Eggleton
2018-05-04 11:55 ` [layerindex-web][PATCH 3/3] detail: Fix layer description not wrapping properly Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.