Discussion:
CSRF verification failed.
mmccoy
2010-02-24 01:26:09 UTC
Permalink
Hi folks,

Love the package, it was pretty easy to setup and seems very well
designed.

I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.

This is when I'm using the 'manage.py runserver' development
environment.

Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.

Thanks!

-mm
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Grant Callaghan
2010-02-24 16:11:52 UTC
Permalink
One thing I've found is I have to serve my media from the same domain, ie *
example.com/media* *not* *media.example.com. *This relates to javascripts same
origin policy <http://en.wikipedia.org/wiki/Same_origin_policy>
Post by mmccoy
Hi folks,
Love the package, it was pretty easy to setup and seems very well
designed.
I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.
This is when I'm using the 'manage.py runserver' development
environment.
Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.
Thanks!
-mm
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
Regards,
Grant Callaghan
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Michael McCoy π
2010-02-24 16:16:25 UTC
Permalink
Thanks for the reply..

I'm definitely doing that now.. i'm using django.views.static.serve to serve
the media.. And anyways, this problem only crops up once I POST the form to
create a new 'Page' object in the cms.. other than the, the media is serving
fine.. etc.. I can also successfully make changes to 'User' and 'Site'
objects.. (ie, models outside of the cms app).

-mm
Post by Grant Callaghan
One thing I've found is I have to serve my media from the same domain, ie
*example.com/media* *not* *media.example.com. *This relates to javascripts
same origin policy <http://en.wikipedia.org/wiki/Same_origin_policy>
Post by mmccoy
Hi folks,
Love the package, it was pretty easy to setup and seems very well
designed.
I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.
This is when I'm using the 'manage.py runserver' development
environment.
Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.
Thanks!
-mm
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
Regards,
Grant Callaghan
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Benjamin Wohlwend
2010-02-24 16:26:11 UTC
Permalink
Hi,

are you using either Django 1.1 and Django-CMS 2.0.x or a prerelease of
Django 1.2 and a very recent checkout of Django-CMS? If the version of
Django-CMS that you are using is older than a couple of days, it will not
work together with a prerelease of Django 1.2 and lead to the problem you
are seeing.

BTW: don't use django.views.static.serve to serve media in a production
environment. See
http://docs.djangoproject.com/en/dev/howto/static-files/#the-big-fat-disclaimer

Regards,
Benjamin
Post by Michael McCoy π
Thanks for the reply..
I'm definitely doing that now.. i'm using django.views.static.serve to
serve the media.. And anyways, this problem only crops up once I POST the
form to create a new 'Page' object in the cms.. other than the, the media is
serving fine.. etc.. I can also successfully make changes to 'User' and
'Site' objects.. (ie, models outside of the cms app).
-mm
On Wed, Feb 24, 2010 at 11:11 AM, Grant Callaghan <
Post by Grant Callaghan
One thing I've found is I have to serve my media from the same domain, ie
*example.com/media* *not* *media.example.com. *This relates to
javascripts same origin policy<http://en.wikipedia.org/wiki/Same_origin_policy>
Post by mmccoy
Hi folks,
Love the package, it was pretty easy to setup and seems very well
designed.
I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.
This is when I'm using the 'manage.py runserver' development
environment.
Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.
Thanks!
-mm
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
Regards,
Grant Callaghan
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Michael McCoy π
2010-02-24 16:38:45 UTC
Permalink
Benjamin,

I think you are onto something.. I'm using a fairly recent (02-15-10)
branch of the Django 1.2 development trunk:

root:/usr/lib/django/django-trunk# svn info

Path: .

URL: http://code.djangoproject.com/svn/django/trunk

Repository Root: http://code.djangoproject.com/svn

Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37

Revision: 12438

Node Kind: directory

Schedule: normal

Last Changed Author: lukeplant

Last Changed Rev: 12438

Last Changed Date: 2010-02-15 12:54:13 -0500 (Mon, 15 Feb 2010)


As for django-cms, I'm using: django_cms-2.0.2-py2.5.egg

What is the best course of action here, is there a development trunk of
django-cms that I can checkout that will not have this issue?

Thanks very much!

-mm

PS, Yes I would never use static.serve in a production environment, I'm
still building this site out -- its in early development.
Post by Benjamin Wohlwend
Hi,
are you using either Django 1.1 and Django-CMS 2.0.x or a prerelease of
Django 1.2 and a very recent checkout of Django-CMS? If the version of
Django-CMS that you are using is older than a couple of days, it will not
work together with a prerelease of Django 1.2 and lead to the problem you
are seeing.
BTW: don't use django.views.static.serve to serve media in a production
environment. See
http://docs.djangoproject.com/en/dev/howto/static-files/#the-big-fat-disclaimer
Regards,
Benjamin
Post by Michael McCoy π
Thanks for the reply..
I'm definitely doing that now.. i'm using django.views.static.serve to
serve the media.. And anyways, this problem only crops up once I POST the
form to create a new 'Page' object in the cms.. other than the, the media is
serving fine.. etc.. I can also successfully make changes to 'User' and
'Site' objects.. (ie, models outside of the cms app).
-mm
On Wed, Feb 24, 2010 at 11:11 AM, Grant Callaghan <
Post by Grant Callaghan
One thing I've found is I have to serve my media from the same domain, ie
*example.com/media* *not* *media.example.com. *This relates to
javascripts same origin policy<http://en.wikipedia.org/wiki/Same_origin_policy>
Post by mmccoy
Hi folks,
Love the package, it was pretty easy to setup and seems very well
designed.
I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.
This is when I'm using the 'manage.py runserver' development
environment.
Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.
Thanks!
-mm
--
You received this message because you are subscribed to the Google
Groups "django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
Regards,
Grant Callaghan
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Benjamin Wohlwend
2010-02-24 16:49:28 UTC
Permalink
If you are still in early development and a bug here and there doesn't lead
to you being fired or something, you can use a git checkout:
http://github.com/digi604/django-cms-2.0/. Patrick Lauber committed Django
1.2 compatibility code a couple of days ago. I'm using it to develop a site
that will go online in a couple of weeks and it seems to be quite stable
(the only bug <http://github.com/digi604/django-cms-2.0/issues#issue/351> I
hit has a fairly simple workaround).

Regards,
Benjamin
Post by Michael McCoy π
Benjamin,
I think you are onto something.. I'm using a fairly recent (02-15-10)
root:/usr/lib/django/django-trunk# svn info
Path: .
URL: http://code.djangoproject.com/svn/django/trunk
Repository Root: http://code.djangoproject.com/svn
Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
Revision: 12438
Node Kind: directory
Schedule: normal
Last Changed Author: lukeplant
Last Changed Rev: 12438
Last Changed Date: 2010-02-15 12:54:13 -0500 (Mon, 15 Feb 2010)
As for django-cms, I'm using: django_cms-2.0.2-py2.5.egg
What is the best course of action here, is there a development trunk of
django-cms that I can checkout that will not have this issue?
Thanks very much!
-mm
PS, Yes I would never use static.serve in a production environment, I'm
still building this site out -- its in early development.
Hi,
Post by Benjamin Wohlwend
are you using either Django 1.1 and Django-CMS 2.0.x or a prerelease of
Django 1.2 and a very recent checkout of Django-CMS? If the version of
Django-CMS that you are using is older than a couple of days, it will not
work together with a prerelease of Django 1.2 and lead to the problem you
are seeing.
BTW: don't use django.views.static.serve to serve media in a production
environment. See
http://docs.djangoproject.com/en/dev/howto/static-files/#the-big-fat-disclaimer
Regards,
Benjamin
Post by Michael McCoy π
Thanks for the reply..
I'm definitely doing that now.. i'm using django.views.static.serve to
serve the media.. And anyways, this problem only crops up once I POST the
form to create a new 'Page' object in the cms.. other than the, the media is
serving fine.. etc.. I can also successfully make changes to 'User' and
'Site' objects.. (ie, models outside of the cms app).
-mm
On Wed, Feb 24, 2010 at 11:11 AM, Grant Callaghan <
Post by Grant Callaghan
One thing I've found is I have to serve my media from the same domain,
ie *example.com/media* *not* *media.example.com. *This relates to
javascripts same origin policy<http://en.wikipedia.org/wiki/Same_origin_policy>
Post by mmccoy
Hi folks,
Love the package, it was pretty easy to setup and seems very well
designed.
I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.
This is when I'm using the 'manage.py runserver' development
environment.
Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.
Thanks!
-mm
--
You received this message because you are subscribed to the Google
Groups "django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
Regards,
Grant Callaghan
--
You received this message because you are subscribed to the Google
Groups "django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Michael McCoy π
2010-02-24 16:51:37 UTC
Permalink
Fantastic.. I will give that a shot.. Thanks a lot!

-mm
Post by Benjamin Wohlwend
If you are still in early development and a bug here and there doesn't lead
http://github.com/digi604/django-cms-2.0/. Patrick Lauber committed Django
1.2 compatibility code a couple of days ago. I'm using it to develop a site
that will go online in a couple of weeks and it seems to be quite stable
(the only bug <http://github.com/digi604/django-cms-2.0/issues#issue/351>I hit has a fairly simple workaround).
Regards,
Benjamin
Post by Michael McCoy π
Benjamin,
I think you are onto something.. I'm using a fairly recent (02-15-10)
root:/usr/lib/django/django-trunk# svn info
Path: .
URL: http://code.djangoproject.com/svn/django/trunk
Repository Root: http://code.djangoproject.com/svn
Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
Revision: 12438
Node Kind: directory
Schedule: normal
Last Changed Author: lukeplant
Last Changed Rev: 12438
Last Changed Date: 2010-02-15 12:54:13 -0500 (Mon, 15 Feb 2010)
As for django-cms, I'm using: django_cms-2.0.2-py2.5.egg
What is the best course of action here, is there a development trunk of
django-cms that I can checkout that will not have this issue?
Thanks very much!
-mm
PS, Yes I would never use static.serve in a production environment, I'm
still building this site out -- its in early development.
Hi,
Post by Benjamin Wohlwend
are you using either Django 1.1 and Django-CMS 2.0.x or a prerelease of
Django 1.2 and a very recent checkout of Django-CMS? If the version of
Django-CMS that you are using is older than a couple of days, it will not
work together with a prerelease of Django 1.2 and lead to the problem you
are seeing.
BTW: don't use django.views.static.serve to serve media in a production
environment. See
http://docs.djangoproject.com/en/dev/howto/static-files/#the-big-fat-disclaimer
Regards,
Benjamin
Post by Michael McCoy π
Thanks for the reply..
I'm definitely doing that now.. i'm using django.views.static.serve to
serve the media.. And anyways, this problem only crops up once I POST the
form to create a new 'Page' object in the cms.. other than the, the media is
serving fine.. etc.. I can also successfully make changes to 'User' and
'Site' objects.. (ie, models outside of the cms app).
-mm
On Wed, Feb 24, 2010 at 11:11 AM, Grant Callaghan <
Post by Grant Callaghan
One thing I've found is I have to serve my media from the same domain,
ie *example.com/media* *not* *media.example.com. *This relates to
javascripts same origin policy<http://en.wikipedia.org/wiki/Same_origin_policy>
Post by mmccoy
Hi folks,
Love the package, it was pretty easy to setup and seems very well
designed.
I've got everything up and running, except anytime I try to create a
page I'm getting a 403 (CSRF verification failed. Request aborted.),
presumably generated by the django.middleware.csrf.CsrfViewMiddleware
package.
This is when I'm using the 'manage.py runserver' development
environment.
Can anyone help me with this? I tried simply commenting out the
package from 'MIDDLEWARE_CLASSES', but that didn't help.
Thanks!
-mm
--
You received this message because you are subscribed to the Google
Groups "django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
Regards,
Grant Callaghan
--
You received this message because you are subscribed to the Google
Groups "django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google
Groups "django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups
"django-cms" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/django-cms?hl=en.
--
You received this message because you are subscribed to the Google Groups "django-cms" group.
To post to this group, send email to django-cms-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to django-cms+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-cms?hl=en.
Continue reading on narkive:
Loading...