django-portfolio icon indicating copy to clipboard operation
django-portfolio copied to clipboard

Getting error adding a new collection:

Open coderam opened this issue 9 years ago • 3 comments

ValidationError at /admin/portfolio/collection/add/

[u'ManagementForm data is missing or has been tampered with']

Request Method: POST Request URL: http://localhost:8000/admin/portfolio/collection/add/ Django Version: 1.7.11 Exception Type: ValidationError

Details:

C:\Users\coderam\Envs\coderam\lib\site-packages\adminsortable\admin.py in add_view

        if extra_context is None:

            extra_context = {}

        extra_context.update({

            'change_form_template_extends': self.change_form_template_extends

        })

        return super(SortableAdmin, self).add_view(request, form_url,

            extra_context=extra_context)

 ...

    def change_view(self, request, object_id, extra_context=None):

        self.has_sortable_tabular_inlines = False

        self.has_sortable_stacked_inlines = False

        if extra_context is None:

Any ideas?

coderam avatar Feb 17 '16 20:02 coderam

Are CSRF tokens included?

dokterbob avatar Feb 18 '16 08:02 dokterbob

Its the admin site they should be... On Feb 18, 2016 2:58 AM, "Mathijs de Bruin" [email protected] wrote:

Are CSRF tokens included?

— Reply to this email directly or view it on GitHub https://github.com/dokterbob/django-portfolio/issues/8#issuecomment-185606498 .

coderam avatar Feb 18 '16 14:02 coderam

Only if it is properly set up.

https://docs.djangoproject.com/en/1.9/ref/csrf/#how-to-use-it

dokterbob avatar Feb 18 '16 14:02 dokterbob