Opened 15 years ago
Last modified 15 years ago
#14989 closed
Allow serializers to non ovewrite fixtures objects if they are marked as non overridable — at Initial Version
| Reported by: | Manuel Saelices | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Serialization) | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Look at this use case:
- The developer creates a new Django project (i.e. with south support).
- The developer creates the database schema and load the initial data (including in example a demo home page).
- The manager modify home page, and other contents.
- The webmaster upgrade the project, and executing
migratecommand (because south support). - With default Django serializers, all manager changes that exists as fixtures data will be lost.
I know Django docs prevent about that, but It was wonderful you may mark objects as no rewritable, like this:
!xml
<?xml version="1.0" encoding="utf-8"?>
<django-objects version="1.0">
<object pk="1" model="fooapp.foomodel" overwrite="no">
<field type="SlugField" name="slug">welcome</field>
...
</object>
</django-objects>
Look at this implementation as implementation reference.
Note:
See TracTickets
for help on using tickets.