##// END OF EJS Templates
Task #714: Modulo web del ABS ...
Task #714: Modulo web del ABS git-svn-id: http://jro-dev.igp.gob.pe/svn/jro_hard/radarsys/trunk/webapp@189 aa17d016-51d5-4e8b-934c-7b2bbb1bbe71

File last commit:

r161:b7757d1e1a33
r166:d72e9c99e97e
Show More
forms.py
33 lines | 1.0 KiB | text/x-python | PythonLexer
Fiorella Quino
CGS model, form, view, url and html have been added....
r4 from django import forms
Miguel Urco
Campaign has been added to RadarSys Model...
r13 from apps.main.models import Device
Fiorella Quino
CGS model, form, view, url and html have been added....
r4 from .models import CGSConfiguration
class CGSConfigurationForm(forms.ModelForm):
Fiorella Quino
updating repository....
r158
Fiorella Quino
CGS model, form, view, url and html have been added....
r4 def __init__(self, *args, **kwargs):
#request = kwargs.pop('request')
super(CGSConfigurationForm, self).__init__(*args, **kwargs)
Miguel Urco
Campaign has been added to RadarSys Model...
r13 instance = getattr(self, 'instance', None)
Fiorella Quino
updating repository....
r158
Miguel Urco
Campaign has been added to RadarSys Model...
r13 if instance and instance.pk:
Fiorella Quino
updating repository....
r158
Miguel Urco
Campaign has been added to RadarSys Model...
r13 devices = Device.objects.filter(device_type__name='cgs')
Fiorella Quino
updating repository....
r158
Juan C. Espinoza
Update several views and models in main app...
r85 if instance.experiment:
self.fields['experiment'].widget.attrs['disabled'] = 'disabled'
Fiorella Quino
updating repository....
r158
Juan C. Espinoza
Update several views and models in main app...
r85 self.fields['device'].widget.choices = [(device.id, device) for device in devices]
Fiorella Quino
cgs updated...
r161
Fiorella Quino
CGS model, form, view, url and html have been added....
r4 def clean(self):
Fiorella Quino
cgs updated...
r161 return
Fiorella Quino
CGS model, form, view, url and html have been added....
r4
class Meta:
model = CGSConfiguration
Juan C. Espinoza
Update several views and models in main app...
r85 exclude = ('type', 'parameters', 'status')
#fields = ('experiment', 'device', 'freq0', 'freq1', 'freq2', 'freq3')
Fiorella Quino
updating repository....
r158
Fiorella Quino
Task #95: se agrego la funcion "import" para archivos .json ...
r42 class UploadFileForm(forms.Form):
title = forms.CharField(label='Extension Type', widget=forms.TextInput(attrs={'readonly':'readonly'}))
Fiorella Quino
updating repository....
r158 file = forms.FileField()