This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals | |
| from django.db import migrations, models | |
| class CopyFieldsBetweenTables(migrations.operations.base.Operation): | |
| reversible = False | |
| def __init__(self, model_from_name, model_to_name, columns): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.db import transaction | |
| from django.db.models.deletion import Collector | |
| from django.db.models.fields.related import ForeignKey, ManyToManyField, OneToOneField | |
| duplicates = [] | |
| items = {} | |
| client = Client.objects.get(name='Demo') | |
| for c in Company.objects.filter(active=True, client=client): | |
| company_name = c.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "sheets": [ | |
| { | |
| "key": "sheet1", | |
| "name": "Example Sheet 1", | |
| "columns": [ | |
| { | |
| "name": "Column 1", | |
| "width": 2, | |
| "args": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| throw new Error('ERROR!'); |
OlderNewer