ó
;ĎOc           @   sV   d  d l  m Z d  d l m Z m Z d  d l m Z m Z d e f d     YZ d S(   i˙˙˙˙(   t   make_option(   t   BaseCommandt   CommandError(   t   connectionst   DEFAULT_DB_ALIASt   Commandc           B   sK   e  Z d  Z e j e d d d d d d e d d f Z e Z d	   Z	 RS(
   sa   Runs the command-line client for specified database, or the default database if none is provided.s
   --databaset   actiont   storet   destt   databaset   defaultt   helpsU   Nominates a database onto which to open a shell.  Defaults to the "default" database.c         K   sR   t  | j d  } y | j j   Wn' t k
 rM t d | j j   n Xd  S(   NR	   s@   You appear not to have the %r program installed or on your path.(   R   t   gett   clientt   runshellt   OSErrorR   t   executable_name(   t   selft   optionst
   connection(    (    s@   ../Django//lib/python/django/core/management/commands/dbshell.pyt   handle   s    (
   t   __name__t
   __module__R   R   t   option_listR    R   t   Falset   requires_model_validationR   (    (    (    s@   ../Django//lib/python/django/core/management/commands/dbshell.pyR      s   N(	   t   optparseR    t   django.core.management.baseR   R   t	   django.dbR   R   R   (    (    (    s@   ../Django//lib/python/django/core/management/commands/dbshell.pyt   <module>   s   