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

in the bottom Submit line (with save etc buttons) in the /clone page is not showing up #41

Open
sam-ghosh opened this issue Apr 15, 2019 · 3 comments

Comments

@sam-ghosh
Copy link

sam-ghosh commented Apr 15, 2019

Hi guys, in the bottom Submit line (with save etc buttons) in the /clone page was not showing up until I added in admin.py line 211 add=True

 return self.render_change_form(request,
                                       context,
                                       form_url=form_url,
                                       change=False,
                                       add=True

                                       )
@bastiaan85
Copy link

bastiaan85 commented Apr 17, 2019

I ran into this too, Python 3.7.1, django==2.1.3 and django-modelclone==0.7.1. I was able to workaround it by forcing add=True in my ModelAdmin's render_change_form:

class MyModelAdmin(ClonableModelAdmin):
    def render_change_form(self, request, context, *args, **kwargs):
        kwargs['add'] = True
        return super(MyModelAdmin, self).render_change_form(request, context, *args, **kwargs)

hottwaj added a commit to hottwaj/django-modelclone that referenced this issue Oct 31, 2019
@hottwaj
Copy link

hottwaj commented Oct 31, 2019

Thanks for your code snippets guys, helped me get this working.

I've added a PR with a change based on the solution given by @bastiaan85

Thanks for the nice library!

xuhcc added a commit to xuhcc/django-modelclone that referenced this issue May 24, 2022
Improved solution for bug RealGeeks#41
@xuhcc
Copy link

xuhcc commented May 27, 2022

I've fixed this issue in my fork and also updated the project to work with newer django versions
https://github.com/xuhcc/django-modelclone

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

4 participants