
 X                 @   sZ   d  d l  m Z d  d l m Z d  d l m Z d d l m Z Gd d   d e  Z d S)	    )import_module)CommandError)TemplateCommand   )get_random_secret_keyc                   s.   e  Z d  Z d Z d Z   f d d   Z   S)CommandzCreates a Django project directory structure for the given project name in the current directory or optionally in the given directory.z You must provide a project name.c                s   | j  d  | j  d  } } |  j | d  y t |  Wn t k
 rQ Yn Xt d |   t   | d <t t |   j d | | |  d  S)Nname	directoryprojectzv%r conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name.Z
secret_key)	popZvalidate_namer   ImportErrorr   r   superr   handle)selfoptionsproject_nametarget)	__class__ Z/home/ubuntu/projects/ifolica/build/django/django/core/management/commands/startproject.pyr      s    
zCommand.handle)__name__
__module____qualname__helpZmissing_args_messager   r   r   )r   r   r   	   s   r   N)		importlibr   Zdjango.core.management.baser   Z django.core.management.templatesr   utilsr   r   r   r   r   r   <module>   s   