13 lines
506 B
Python
13 lines
506 B
Python
# -*- coding: utf-8 -*-
|
|
from django import forms
|
|
from apps.geoproc.models.model_point import Point
|
|
from apps.geoproc.models.model_obstation import ObStation
|
|
|
|
class PointForm(forms.ModelForm):
|
|
name = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control','autofocus':''}))
|
|
obstation = forms.ModelChoiceField(queryset = ObStation.objects.all(),widget=forms.Select(attrs={'class':'form-control select2'}))
|
|
|
|
class Meta:
|
|
model=Point
|
|
fields = ('id','name','obstation')
|