コード例 #1
0
 class Meta:
     model = uploadedImage
     cicuOptions = {
         'ratioWidth': '200', #if image need to have fix-width ratio
         'ratioHeight':'200', #if image need to have fix-height ratio
         'sizeWarning': 'False', #if True the crop selection have to respect minimal ratio size defined above.
     }
     widgets = {
         'image': CicuUploaderInput(options=cicuOptions)
     }
コード例 #2
0
	class Meta:
		model = UserProfile
		fields = ['cover_image',]
		cicuOptions = {
            'ratioWidth': '540',       #fix-width ratio, default 0
            'ratioHeight':'210',       #fix-height ratio , default 0
            'sizeWarning': 'False',    #if True the crop selection have to respect minimal ratio size defined above. Default 'False'
        }
		widgets = {
			'cover_image': CicuUploaderInput(options=cicuOptions),
		}
コード例 #3
0
ファイル: forms.py プロジェクト: meletakis/collato
    class Meta:
        model = Organization
        fields = ['name','description', 'image']

	cicuOptions = {
            'ratioWidth': '200',      #fix-width ratio, default 0
            'ratioHeight':'200',      #fix-height ratio , default 0
            'sizeWarning': 'True',    #if True the crop selection have to respect minimal ratio size defined above. Default 'False'
	}
	widgets = {
	    'description': Textarea(attrs={'class':'form-control'}),
	    'name': TextInput(attrs={'class':'form-control'}),
	    'image': CicuUploaderInput(options=cicuOptions)
	}
コード例 #4
0
 class Meta:
     model = Post
     fields = ['text', 'picture']
     cicuOptions = {
         #'ratioWidth': '500',       #fix-width ratio, default 0
         #'ratioHeight':'500',       #fix-height ratio , default 0
         'sizeWarning':
         'False',  #if True the crop selection have to respect minimal ratio size defined above. Default 'False'
     }
     widgets = {
         'text':
         forms.Textarea(
             attrs={
                 'id': 'post-text',
                 'required': True,
                 'placeholder': 'Share Something Dude...',
                 'class': 'form-control',
                 'style': 'height:43px;',
             }),
         'picture':
         CicuUploaderInput(options=cicuOptions)
     }