Customizable Serialization. Define a class-based structure that allows users to define their own serialization format (including different output structure, including non-model fields, etc). Define Django's own serializers in that format.

146

Django's current serializer implementation imposes some restrictions that limit the usefulness of the serializers outside of fixture loading. The basic serialization format, for example, can't be changed.

147

148

The aim of this project would be to deliver a fully customizable serialization framework. Ideally, this would be a class-based structure that allows users to define their own serialization format (including different output structure, including non-model fields, etc). The end goal is that you should be able to output any object (or list of objects), in any format, to any depth, with any additional information that might be relevant in a serialization context.

149

150

In short, anywhere we have made an arbitrary design decision with Django's existing serializers, that decision should be customizable as an end user.

151

152

When developing your proposal, the proof of concept is that you should be able to define Django's existing serialization formats using your new serialization format.

* Serialized output format that can change based on where in the output tree the object is located (e.g., output the full User object if it's included from within model X, but only output the username if its included from within model Y)

161

* In an XML context, control over the tags, namespaces, attributes and nesting structures in the final XML

162

* In a JSON/YAML context, control over the use of lists, dictionaries etc, as well as the choice of key names for dictionaries.

Django doesn't currently provide support for IPv6. This project would update Django to provide support for IPv6 wherever Django currently uses IPv4 addresses.

184

185

Issues to consider:

186

* Can IPv6 support be added to model fields without adding a new field type?

187

* Is there anywhere in the WSGI/FCGI interface where IPv6 issues exist, but are currently unreported

188

* Can IPv6 support be added to configuration files (e.g., to specify memcache interfaces) in a transparent fashion?

189

190

See also:

191

* #11442

192

* #7735

175

193

176

194

=== Testing updates ===

177

195

* '''Complexity:''' Minor

178

196

179

Update Django's system tests -- migrate Doctests to UnitTests, and merge the modeltests and regressiontests directories.

180

181

Issues to consider:

182

*

183

184

See also:

185

*

197

Django's test suite originally consisted almost entirely of doctests; these doctests were used as a supplement to the written documentation. Over time, this supplemental role has been dropped. The doctests have also gotten larger; in some cases (such as the queries regressiontest) they are now extremely unwieldly. New tests that are added to Django tend to be UnitTests when possible, but the existing legacy of doctests is hard to break in some cases.

198

199

There is also an artificial distinction between modeltests and regressiontests. In the past, this distiction was used to identify tests that served a documentation purpose; this role has long since disappeared, but the struture persists, leading to confusion over the 'right place' to test certain features represented in both directories.

200

201

These two tasks indicate a need to refactor Django's test suite. The aim of this project would be to update Django's test framework; migrating as doctests to UnitTests, and merging the modeltests and regressiontests directories.

202

203

Issues to consider:

204

* How to maintain the integrity of Django's test suite? Django has spent a lot of effort building a strong regression test suite; how do we ensure that by refactoring the test suite, we don't lose the integrity of that regression set?

205

* Is there any part of this process that can be automated? If so, How?

206

* Will migrating from doctests to unittests cause any performance problems? Are there any ways to limit these performance problems?