← Back
Editing: edit.cpython-311.pyc
� �|�e� � � � d dl mZ d dlmZ d dlmZ d dlmZm Z m Z d dlmZm Z mZ G d� de� � Z G d� d ee � � Z G d � de � � Z G d� d ee� � Z G d� de e� � Z G d� dee� � Z G d� dee� � Z G d� dee� � Z G d� dee� � Z G d� d� � Z G d� dee� � Z G d� dee� � ZdS )� )�ImproperlyConfigured)�models)�HttpResponseRedirect)�ContextMixin�TemplateResponseMixin�View)�BaseDetailView�SingleObjectMixin�!SingleObjectTemplateResponseMixinc �d � � e Zd ZdZi ZdZdZdZd� Zd� Z d� Z dd�Zd� Zd� Z d � Zd � Z� fd�Z� xZS ) � FormMixinz5Provide a way to show and handle a form in a request.Nc �4 � | j � � � S )z6Return the initial data to use for forms on this view.)�initial�copy��selfs �;/usr/lib/python3/dist-packages/django/views/generic/edit.py�get_initialzFormMixin.get_initial s � ��|� � �"�"�"� c � � | j S )z#Return the prefix to use for forms.)�prefixr s r � get_prefixzFormMixin.get_prefix s � ��{�r c � � | j S )zReturn the form class to use.)� form_classr s r �get_form_classzFormMixin.get_form_class s � ���r c �b � |�| � � � } |di | � � � ��S )z7Return an instance of the form to be used in this view.N� )r �get_form_kwargs)r r s r �get_formzFormMixin.get_form s; � ����,�,�.�.�J��z�3�3�D�0�0�2�2�3�3�3r c �� � | � � � | � � � d�}| j j dv r,|� | j j | j j d�� � |S )�8Return the keyword arguments for instantiating the form.)r r )�POST�PUT)�data�files)r r �request�method�updater"