22 lines
420 B
Python
22 lines
420 B
Python
from django.forms import ModelForm
|
|
|
|
from feeds.models import Feed
|
|
|
|
|
|
class FeedForm(ModelForm):
|
|
prefix = 'feed'
|
|
|
|
class Meta:
|
|
model = Feed
|
|
exclude = 'owner', 'lock', 'config_type', 'config_id', 'last_check', 'last_id',
|
|
|
|
|
|
def get_config_form(mdl):
|
|
class ConfigForm(ModelForm):
|
|
prefix = 'config'
|
|
|
|
class Meta:
|
|
model = mdl
|
|
exclude = ()
|
|
return ConfigForm
|