Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/django-baker/files: django-baker-0.11-py3-iter.patch
Date: Sat, 07 Mar 2015 09:52:58
Message-Id: 20150307095253.E4685133A1@oystercatcher.gentoo.org
1 jlec 15/03/07 09:52:53
2
3 Added: django-baker-0.11-py3-iter.patch
4 Log:
5 Fix compatibility for py3
6
7 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
8
9 Revision Changes Path
10 1.1 dev-python/django-baker/files/django-baker-0.11-py3-iter.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django-baker/files/django-baker-0.11-py3-iter.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django-baker/files/django-baker-0.11-py3-iter.patch?rev=1.1&content-type=text/plain
14
15 Index: django-baker-0.11-py3-iter.patch
16 ===================================================================
17 From c6c856c999cb9a9ce4ec8ecee714da7f6719019d Mon Sep 17 00:00:00 2001
18 From: Matt Clement <mclement@×××××××××××.com>
19 Date: Tue, 3 Mar 2015 14:57:41 -0500
20 Subject: [PATCH] Switch iteritems to items for Py3 compatibility
21
22 ---
23 django_baker/templates/django_baker/__init__urls | 2 +-
24 django_baker/templates/django_baker/forms | 4 ++--
25 2 files changed, 3 insertions(+), 3 deletions(-)
26
27 diff --git a/django_baker/templates/django_baker/__init__urls b/django_baker/templates/django_baker/__init__urls
28 index 1baf063..d6c9bec 100644
29 --- a/django_baker/templates/django_baker/__init__urls
30 +++ b/django_baker/templates/django_baker/__init__urls
31 @@ -1,6 +1,6 @@
32 from django.conf.urls import patterns, include
33
34 urlpatterns = patterns('',
35 -{% for model_name_slug, plural_model_name_slug in model_names_dict.iteritems %}
36 +{% for model_name_slug, plural_model_name_slug in model_names_dict.items %}
37 (r'^{{ plural_model_name_slug }}/', include('{{ app_label }}.urls.{{ model_name_slug }}_urls')),{% if forloop.first %} # NOQA{% endif %}{% endfor %}
38 )
39 diff --git a/django_baker/templates/django_baker/forms b/django_baker/templates/django_baker/forms
40 index 1f55c86..a21234d 100644
41 --- a/django_baker/templates/django_baker/forms
42 +++ b/django_baker/templates/django_baker/forms
43 @@ -1,7 +1,7 @@
44 from django import forms
45 from .models import {{ model_names|join:", " }}
46
47 -{% for model_name, model_fields in model_names.iteritems %}
48 +{% for model_name, model_fields in model_names.items %}
49 class {{ model_name }}Form(forms.ModelForm):
50
51 class Meta:
52 @@ -36,4 +36,4 @@ class {{ model_name }}Form(forms.ModelForm):
53 def save(self, commit=True):
54 return super({{ model_name }}Form, self).save(commit)
55 {% if not forloop.last %}
56 -{% endif %}{% endfor %}
57 \ No newline at end of file
58 +{% endif %}{% endfor %}