PK!&pytedjmi/__init__.pyfrom .core import * PK!pytedjmi/core.pyfrom functools import wraps from django.db import connection, transaction from django.db.migrations.executor import MigrationExecutor class MigrationStructureError(Exception): pass def migrate(app=None, migration=None): with transaction.atomic(): executor = MigrationExecutor(connection) executor.loader.build_graph() # reload. executor.loader.check_consistent_history(connection) # Before anything else, see if there's conflicting apps and # drop out hard if there are any if executor.loader.detect_conflicts(): raise MigrationStructureError("Migrations have conflicts.") # Handle if app and migration: targets = [(app, migration)] elif app: targets = [ key for key in executor.loader.graph.leaf_nodes() if key[0] == app ] else: targets = executor.loader.graph.leaf_nodes() plan = executor.migration_plan(targets) pre_migrate_state = executor._create_project_state( with_applied_migrations=True ) post_migrate_state = executor.migrate( targets, plan=plan, state=pre_migrate_state.clone() ) post_migrate_state.clear_delayed_apps_cache() return executor.loader.project_state(targets).apps def cleanup(fn): @wraps(fn) def wrapper(*args, **kwargs): try: connection.disable_constraint_checking() with transaction.atomic(): return fn(*args, **kwargs) finally: migrate() return wrapper PK!t((pytedjmi/urls.pyapp_name = "pytedjmi" urlpatterns = [] PK!#pytedjmi-0.2.1.dist-info/LICENSE.mdCopyright (c) 2017, Kit La Touche All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PK!HnHTUpytedjmi-0.2.1.dist-info/WHEEL A н#Z;/"d&F[xzw@Zpy3Fv]\fi4WZ^EgM_-]#0(q7PK!HA!pytedjmi-0.2.1.dist-info/METADATARMo1ϯDE h@m R8;ɰv=n_o6ٔHtN7oR*~RY=L!~ʹ3zl ZG2FEɝC8"r\j|u vz15K 9>%]x/\ZԴdn$kAhs$,1|?IEV=t$pިoM9MpAcr[J]X/N^aDGl|,GC1x7kl)Ö2:H)ɆbeN(.2ŹL3\!2AN^] d^Q3A#[ϫo6j %Ƽ>s)ꎍ)zloO h\0w*a5,Nsp|} ~ YD_zؠ*&x1 2zPK!HzQpytedjmi-0.2.1.dist-info/RECORDuͶB@}2a]ޒd3'*& !5oWޟO׊ ]~T4 +(P+%G<.ش+PQҺ=2\͘e lݳJխ\a wԳl b&}<ࠝdžх 7 o,c1PK!&pytedjmi/__init__.pyPK!Fpytedjmi/core.pyPK!t((pytedjmi/urls.pyPK!#Jpytedjmi-0.2.1.dist-info/LICENSE.mdPK!HnHTUW pytedjmi-0.2.1.dist-info/WHEELPK!HA! pytedjmi-0.2.1.dist-info/METADATAPK!HzQpytedjmi-0.2.1.dist-info/RECORDPKo