##// END OF EJS Templates
apache folder updated...
apache folder updated git-svn-id: http://jro-dev.igp.gob.pe/svn/jro_hard/radarsys/trunk/webapp@183 aa17d016-51d5-4e8b-934c-7b2bbb1bbe71

File last commit:

r158:03c8e52d0d74
r160:637f706305f2
Show More
forms.py
34 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]
Miguel Urco
Campaign has been added to RadarSys Model...
r13
Fiorella Quino
CGS model, form, view, url and html have been added....
r4 def clean(self):
Miguel Urco
Campaign has been added to RadarSys Model...
r13 return
Fiorella Quino
updating repository....
r158 #
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()