%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/djangomod.pyo

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	m
Z
dZd�Zd�Z
ddddd�Zdedddedd	�Zdddddd
�Zddddd�Zdedeeeedddd�
ZdS(
u
Manage Django sites
i(tabsolute_importtprint_functiontunicode_literalsN(tsixudjangocC@stS(N(t__virtualname__(((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pyt__virtual__scC@s�|sMtjjjd�rdStjjjd�r8dStjjd��ntjjtjj|dd��r�tjj|dd�S|S(u!
    Return the django admin
    udjango-admin.pyudjango-adminu1django-admin or django-admin.py not found on PATHubin(	tsalttutilstpathtwhicht
exceptionstCommandExecutionErrortostexiststjoin(tbin_env((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pyt_get_django_admins	$c
O@s�t|�}dj|||�}	|r<dj|	|�}	nx |D]}
dj|	|
�}	qCWxDtj|�D]3\}}|jd�sodj|	||�}	qoqoWtd|	d|d|d	t�S(
u�
    Run arbitrary django management command

    CLI Example:

    .. code-block:: bash

        salt '*' django.command <settings_module> <command>
    u{0} {1} --settings={2}u{0} --pythonpath={1}u	{0} --{1}u__u
{0} --{1}={2}ucmd.runtenvtrunastpython_shell(RtformatRt	iteritemst
startswitht__salt__tFalse(
tsettings_moduletcommandRt
pythonpathRRtargstkwargstdjatcmdtargtkeytvalue((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pyR-s
c
	C@sjg}i}	|r"|jd�n|r5||	d<n|rK|jd�nt|d||||||	�S(u6
    Run syncdb

    Execute the Django-Admin syncdb command, if South is available on the
    minion the ``migrate`` option can be passed as ``True`` calling the
    migrations to run after the syncdb completes

    CLI Example:

    .. code-block:: bash

        salt '*' django.syncdb <settings_module>
    umigrateudatabaseunoinputusyncdb(tappendR(
RRtmigratetdatabaseRRtnoinputRRR((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pytsyncdbLs
c
	C@sPdg}td|d|�}	|r1||	d<nt|d||||||	�S(u&
    Create a super user for the database.
    This function defaults to use the ``--noinput`` flag which prevents the
    creation of a password for the superuser.

    CLI Example:

    .. code-block:: bash

        salt '*' django.createsuperuser <settings_module> user user@example.com
    unoinputtemailtusernameudatabaseucreatesuperuser(tdictR(
RR)R(RR%RRRRR((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pytcreatesuperuserss		
c	C@s_g}i}|r||d<ndjddj|jd���}t|||||||�S(u�
    Load fixture data

    Fixtures:
        comma separated list of fixtures to load

    CLI Example:

    .. code-block:: bash

        salt '*' django.loaddata <settings_module> <comma delimited list of fixtures>

    udatabaseu{0} {1}uloaddatau u,(RRtsplitR(	RtfixturesRR%RRRRR((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pytloaddata�s
$c
	C@s�dg}i}|r%|jd�n|r8||d<n|rN|jd�n|rd|jd�n|rz|jd�n|r�|jd�nt|d|||	|
||�S(	u�
    Collect static files from each of your applications into a single location
    that can easily be served in production.

    CLI Example:

    .. code-block:: bash

        salt '*' django.collectstatic <settings_module>
    unoinputuno-post-processuignoreudry-runuclearulinkuno-default-ignoreu
collectstatic(R#R(
RRtno_post_processtignoretdry_runtcleartlinktno_default_ignoreRRRRR((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pyt
collectstatic�s*	
(t__doc__t
__future__RRRRtsalt.utils.pathRtsalt.exceptionstsalt.extRRRRtNoneRRtTrueR'R+R.R5(((s:/usr/lib/python2.7/site-packages/salt/modules/djangomod.pyt<module>sL		#

Zerion Mini Shell 1.0