Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if image is a hidden field cropping works no more #120

Open
fekoh opened this issue Sep 29, 2017 · 1 comment
Open

if image is a hidden field cropping works no more #120

fekoh opened this issue Sep 29, 2017 · 1 comment

Comments

@fekoh
Copy link

fekoh commented Sep 29, 2017

I try to separate the upload and crop process. First the user should upload the image (CreateView) and is then prompted in the next form to crop the image (UpdateView)

in the second form the user should not be able to upload a new image or change the image -- that's why i try to make a hidden field for the image field:

class updatePhotoForm(forms.ModelForm):
    class Meta:
        model = Photo
        fields = ['image','cropping',]
        widgets = {'image': forms.HiddenInput()}

As soon i make the 'image' field hidden, the cropping does not work anymore and shows me an input field with coordinates instead of the cropping window.

Is there a solution to this?

@abaumg
Copy link

abaumg commented Jan 23, 2019

As workaround you could a) hide the image field via CSS (display: none) and b) ignore changes to this field in during save().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants