Merge lp:~phanatic/django-configglue/django-1.6 into lp:django-configglue

Proposed by Szilveszter Farkas
Status: Merged
Approved by: Ricardo Kirkner
Approved revision: 78
Merged at revision: 78
Proposed branch: lp:~phanatic/django-configglue/django-1.6
Merge into: lp:django-configglue
Diff against target: 105 lines (+62/-0)
3 files modified
django_configglue/schema.py (+50/-0)
django_configglue/tests/test_settings.py (+4/-0)
tox.ini (+8/-0)
To merge this branch: bzr merge lp:~phanatic/django-configglue/django-1.6
Reviewer Review Type Date Requested Status
Ricardo Kirkner Approve
Review via email: mp+194269@code.launchpad.net

Commit message

Added support for Django 1.6

Description of the change

Support for Django 1.6 final.

To post a comment you must log in.
Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

Thank you Szilveszter! LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django_configglue/schema.py'
2--- django_configglue/schema.py 2013-09-16 02:00:02 +0000
3+++ django_configglue/schema.py 2013-11-07 01:15:37 +0000
4@@ -1672,6 +1672,55 @@
5 "serializing session data.")
6
7
8+Django16Base = derivate_django_schema(
9+ Django153Schema)
10+
11+
12+class Django16Schema(Django16Base):
13+ version = '1.6'
14+
15+ class django(Django16Base.django):
16+
17+ base_dir = StringOption(
18+ help="Used by the example project to help build paths for other "
19+ "settings variables.")
20+
21+ databases = DictOption(
22+ item=UpperCaseDictOption(spec={
23+ 'engine': StringOption(default='django.db.backends.'),
24+ 'name': StringOption(),
25+ 'user': StringOption(),
26+ 'password': StringOption(),
27+ 'host': StringOption(),
28+ 'port': StringOption(),
29+ 'atomic_requests': BoolOption(default=False),
30+ 'autocommit': BoolOption(default=True),
31+ 'conn_max_age': IntOption(default=0),
32+ }),
33+ default={
34+ 'default': {
35+ 'ENGINE': 'django.db.backends.',
36+ 'NAME': '',
37+ 'USER': '',
38+ 'PASSWORD': '',
39+ 'HOST': '',
40+ 'PORT': '',
41+ }
42+ })
43+
44+ csrf_cookie_httponly = BoolOption(
45+ default=False,
46+ help="Whether to use HttpOnly flag on the CSRF cookie. If this "
47+ "is set to True, client-side JavaScript will not to be able "
48+ "to access the CSRF cookie. See SESSION_COOKIE_HTTPONLY for "
49+ "details on HttpOnly.")
50+
51+ session_serializer = StringOption(
52+ default='django.contrib.sessions.serializers.JSONSerializer',
53+ help="Full import path of a serializer class to use for "
54+ "serializing session data.")
55+
56+
57 class DjangoSchemaFactory(object):
58 def __init__(self):
59 self._schemas = {}
60@@ -1810,3 +1859,4 @@
61 schemas.register(Django15Schema, '1.5.2')
62 schemas.register(Django153Schema)
63 schemas.register(Django153Schema, '1.5.4')
64+schemas.register(Django16Schema)
65
66=== modified file 'django_configglue/tests/test_settings.py'
67--- django_configglue/tests/test_settings.py 2013-05-16 19:02:56 +0000
68+++ django_configglue/tests/test_settings.py 2013-11-07 01:15:37 +0000
69@@ -43,6 +43,10 @@
70 "ROOT_URLCONF = 'urls'",
71 "SETTINGS_ENCODING = '%s'" % SETTINGS_ENCODING,
72 ]
73+ # Django 1.6 needs special treatment (BASE_DIR is not a core setting,
74+ # but it's a very useful convention from the example project)
75+ if django.VERSION >= (1, 6, 0):
76+ expected_values.append("BASE_DIR = ''")
77 self.call_command(show_current=True)
78 output_lines = self.output.strip().split('\n')
79 self.assertEqual(set(expected_values), set(output_lines))
80
81=== modified file 'tox.ini'
82--- tox.ini 2013-09-16 02:00:02 +0000
83+++ tox.ini 2013-11-07 01:15:37 +0000
84@@ -8,6 +8,7 @@
85 py26-django15,
86 py27-django15,
87 py27-django154,
88+ py27-django16,
89 edge
90
91 [testenv]
92@@ -69,6 +70,13 @@
93 mock
94 django==1.5.4
95
96+[testenv:py27-django16]
97+basepython = python2.7
98+deps =
99+ configglue
100+ mock
101+ django==1.6
102+
103 [testenv:edge]
104 deps =
105 bzr+http://bazaar.launchpad.net/~configglue/configglue/trunk/

Subscribers

People subscribed via source and target branches