https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/south/management/commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/south/management/commands/datamigration.pyc
�
K�pRc@sdZddlmZddlZddlZddlZddlmZyeWn!e	k
ruddl
mZnXddlm
Z
ddlmZddlmZdd	lmZdd
lmZddlmZddlmZd
e
fd��YZdZdS(s!
Data migration creation command
i����(tprint_functionN(tmake_option(tSet(tBaseCommand(tno_style(tmodels(tsettings(t
Migrations(tNoMigrations(tfreezertCommandcBs�eZejeddddddddd�ed	dd
dddedd
�fZdZdZdddedd�Z	d�Z
dd�Zd�ZRS(s--freezetactiontappendtdesttfreeze_listttypetstringthelpskFreeze the specified app(s). Provide an app name with each; use the option multiple times for multiple appss--stdoutt
store_truetstdouttdefaults>Print the migration to stdout instead of writing it to a file.s7Creates a new template data migration for the given appsTUsage: ./manage.py datamigration appname migrationname [--stdout] [--freeze appname]tic
Ks�t|�}|pg}|r'd}ntjd|�rU|dkrU|jd�n|sr|jd|j�n|s�|jd|j�nyt|�}Wn%tk
r�|jd|j�nXt|dtd|d	k�}|j|�}|j	||�}	|j
�itj|	�d
6|	rDddj
tt|	��pGd
d6}
|dkrht|
�nRttjj
|j�|�d�}|j|
�|j�td|dtj�dS(Nt-s[^_\w]sLMigration names should contain only alphanumeric characters and underscores.s,You must provide a name for this migration.
s3You must provide an app to create a migration for.
sVerbosity must be an number.
tforce_creationtverbose_creationit
frozen_modelsscomplete_apps = [%s]s, Rt
complete_appstwsCreated %s.tfile(tinttretsearchterrort	usage_strt
ValueErrorRtTruet
next_filenametcalc_frozen_appstget_migration_templateR	tfreeze_apps_to_stringtjointmaptreprtprinttopentostpathtmigrations_dirtwritetclosetsyststderr(tselftapptnameRRt	verbositytoptionst
migrationstnew_filenametapps_to_freezet
file_contentstfp((sK/usr/lib/python2.7/site-packages/south/management/commands/datamigration.pythandle$s4	
-
$

cCs�g}x^|D]V}d|kr3|jd|�ntj|�sV|jd|�n|j|�q
Wttdt�r�|j|j��n|S(s
        Works out, from the current app, settings, and the command line options,
        which apps should be frozen.
        t.sLYou cannot freeze %r; you must provide an app label, like 'auth' or 'books'.s0You cannot freeze %r; it's not an installed app.tSOUTH_AUTO_FREEZE_APP(R Rtget_appRtgetattrRR#t	app_label(R4R9RR;t	to_freeze((sK/usr/lib/python2.7/site-packages/south/management/commands/datamigration.pyR%Ys
cCs$t|dtj�tj|�dS(sB
        Prints the error, and exits with the given code.
        RN(R+R2R3texit(R4tmessagetcode((sK/usr/lib/python2.7/site-packages/south/management/commands/datamigration.pyR kscCstS(N(tMIGRATION_TEMPLATE(R4((sK/usr/lib/python2.7/site-packages/south/management/commands/datamigration.pyR&rsN(
t__name__t
__module__Rtoption_listRtFalseRR!tNoneR>R%R R&(((sK/usr/lib/python2.7/site-packages/south/management/commands/datamigration.pyR
s
5	sx# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models

class Migration(DataMigration):

    def forwards(self, orm):
        "Write your forwards methods here."
        # Note: Don't use "from appname.models import ModelName". 
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.

    def backwards(self, orm):
        "Write your backwards methods here."

    models = %(frozen_models)s

    %(complete_apps)s
    symmetrical = True
(t__doc__t
__future__RR2R-RtoptparseRtsett	NameErrortsetsRtdjango.core.management.baseRtdjango.core.management.colorRt	django.dbRtdjango.confRtsouth.migrationRtsouth.exceptionsRt
south.creatorR	R
RH(((sK/usr/lib/python2.7/site-packages/south/management/commands/datamigration.pyt<module>s$
q

https://t.me/AnonymousX5 - 2025