from django.forms import ModelForm
from realtydb.widgets.yandex_map_widget import YandexMap
from realtydb.models import Offer


class OfferAdminForm(ModelForm):
    class Meta:
        model = Offer
        fields = ('type', 'description', 'category', 'state', 'city', 'street', 'number_of_house',
                  'floor', 'floor_total', 'area_value', 'rooms', 'price_value', 'loc', 'salesagent')
        widgets = {
            'loc': YandexMap(),
        }
