[mezzanine-users] Re: Tinymce Popup Bad Request
I have the same problem as Eduardo. I am using Linode server with setup: https -domain nginx gunicorn django 1.6.2 mezzanine 3.0.9 filebrowser-safe - 0.3.3 grappelli-safe - 0.3.7 Whenever I am trying to add image or edit html I get 400 -bad requests. With python manage.py runserver I get: GET /asset_proxy/?u=https://mydomain.com/static/grappelli/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm HTTP/1.0 400 GET /asset_proxy/?u=https://mydomain.com/static/grappelli/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm HTTP/1.0 400 No idea where these are coming from... torstai, 17. huhtikuuta 2014 10.28.13 UTC+3 Eduardo Sciammarella kirjoitti: Hi People - I'm having a difficult time with tinymce. Apologies if this has been asked/answered before. I have tried reading all the threads on this issue and I am still not able to get it to work. I am a novice so I might be missing something that a more advanced person would understand. I am seemingly having the same issue on localhost and on Heroku. I am storing my static files on S3. When I invoke the popup up for tinymce by clicking on the 'html' editor from the inline icons - I get a ‘Bad Request (400)’ - the response is empty - this is the request url - https://127.0.0.1:8000/asset_proxy/?u=https://bucketname.s3.amazonaws.com/static/grappelli/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm. I have this error whether I am running sslserver or runserver. I am guessing this is most likely a cross-domain issue. I am using Mezzanine 3.0.9 - filebrowser-safe==0.3.2 - grappelli-safe==0.3.7 and django-s3-folder-storage==0.2 My settings are: DEFAULT_S3_PATH = media STATIC_S3_PATH = static S3_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME STATIC_ROOT = /%s/ % STATIC_S3_PATH MEDIA_ROOT = '%s/' % DEFAULT_S3_PATH STATIC_URL = '//s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME MEDIA_URL = 'http://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME ADMIN_MEDIA_PREFIX = STATIC_URL + grappelli/ I’m really stumped - any input would be awesome. Thanks —Edu -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Re: Marking Django Application Pages as Active in the Navigation
Stepping through the page middleware which handles assigning the page variable will probably shed some light: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/pages/middleware.py#L91-L124 On Tue, Apr 22, 2014 at 6:09 PM, PR pavan.ri...@gmail.com wrote: On Monday, April 21, 2014 12:30:16 PM UTC-4, Eduardo Rivas wrote: The blog app defines it's own url patterns. For example, the list view (showing all blog posts) is mapped to /blog by default. It seem to be that the blog app defines / to be the list view in its urls.py. Mezzanine includes the blog's urls.py, adding the BLOG_SLUG prefix. The app I am integrating also defines it's own urls. I simply included these in my project's urls.py(above the mezzanine catch-all): (^pastes/, include('dpaste.urls.dpaste')), Then I created a RichTextPage with the name Pastes and no parent to match this url. I can successfully visit the dpaste app from the added navigation link. When I remove the dpaste url include, I can successfully visit the RichTextPage. The trick is in creating a page in the admin with the exact same slug. You have to do this to get Mezzanine to insert the page variable into your context. In the end, Mezzanine will merge both the context provided by the page and the context of your own application. My problem is that I have created the page with the slug but Mezzanine is not inserting the page variable into my context, so the navigation link does not receive an active class. I've done this in the past with a custom Portfolio app and the integration is seamless. If you want to inspect your template context, list of templates and other useful debugging info in your browser, you should use Django Debug Toolbar. Install it with pip install django-debug-tollbar, Mezzanine will activate it automatically when it detects it's installed; you should then get a small button in the top-right corner of your site when running in the development server. Yes I've done all this, thats how I was able to see that the template was not being passed the page context variable... Here is a related screenshot: https://lh4.googleusercontent.com/-lKB3QXJ_Ud8/U1YijWBoSOI/AJ0/qqZqhwwT3PU/s1600/2014-04-22-040313_1366x768_scrot.png You can see that a Pastes page exists and that the browser is visiting the /pastes/ url, however the Pastes link is not shaded as active(and yes the theme does define a different color for active tabs, it works fine for the blog app). The breadcrumb only exists because I hardcoded it into the template, which would be unneeded if the page variable was inserted. -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Re: Marking Django Application Pages as Active in the Navigation
On Tuesday, April 22, 2014 4:13:20 AM UTC-4, Stephen McDonald wrote: Stepping through the page middleware which handles assigning the page variable will probably shed some light: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/pages/middleware.py#L91-L124 Thanks! From this I noticed that the request returned by the view had no context_data attribute. Apparently the view needs to use mezzanine.utils.render instead of django's render or render_to_response in order to be given a context_data attribute. For now, I will just override the urls and create custom views, but is there any easy way to wrap or decorate views that use Django's render? -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Tests failing
Hi Stephen Thanks for the timely response. When you mentioned the bad/missing Pillow install I recalled that I originally had some issues with Pillow. I think Pillow itself has a number of (possibly undocumented?) dependencies and things go quite wrong if they are not met when you try to install. In the end I started from scratch and created a new VM, and made sure that I had all the dependencies that I could find for Pillow before attempting to install it. Then I followed the steps exactly in your 'Contributing' section with the exception that I specified 'pyflakes==0.6.1 pep8==1.4.1' when installing these bits, as per the test_require line in setup.py. Now when I run the tests it ends up saying OK (skipped=2, expected failures=1). Is this close enough in terms of 'all tests passing'? I don't see anything about failures in the output, though I get a number of warnings about things being deprecated (which is why I'm doing all this in the first place). Regards Kevin On Sunday, April 20, 2014 5:22:36 PM UTC-7, Stephen McDonald wrote: Those all look like dependency issues. Making sure you've got the correct versions of the test dependencies (as per `tests_require` in setup.py) should fix the first failure. The second and third look due to a bad/missing PIL/Pillow install. The failures against Django 1.7 are expected - there's a lot of work to be done there. On Mon, Apr 21, 2014 at 9:48 AM, Kevin Golding kevingol...@gmail.comjavascript: wrote: Hi all I was planning to make some changes for things that are deprecated in Django1.7, so I forked Mezzanine on bitbucket and did all the steps in the Contributing section to create a development environment (but using my fork on bitbucket instead of the github one listed). However before I made any actual changes I ran the 'manage.py test' command just to see how it worked, and it reported 3 errors. I'm not really sure what to do now. If I make my changes will the pull request be rejected because the tests don't pass for unrelated reasons? I've pasted in the output of the test run below. Note that this is running against Django 1.6.2. I also have an environment set up with Django 1.7, and when I run the tests there I get 8 'errors' in addition to the 3 'failures'. Any suggestions what I should do now? Thanks Kevin = (mezz_dj16)kevin@ubuntu:~/mezzanine_dj16/mezzanine$ ./mezzanine/project_template/manage.py test /home/kevin/mezzanine_dj16/mezzanine/mezzanine/utils/conf.py:51: UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django 1.5 requires. Will fall back to the domains configured as sites. warn(You haven't defined the ALLOWED_HOSTS settings, which /home/kevin/mezzanine_dj16/mezzanine/mezzanine/utils/conf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Australia/Sydney warn(TIME_ZONE setting is not set, using closest match: %s % tz) Creating test database for alias 'default'... .x...s../home/kevin/mezzanine_dj16/mezz_dj16/local/lib/python2.7/site-packages/django/http/response.py:330: DeprecationWarning: Using mimetype keyword argument is deprecated, use content_type instead super(HttpResponse, self).__init__(*args, **kwargs) ...F..s./home/kevin/mezzanine_dj16/mezz_dj16/local/lib/python2.7/site-packages/pkg_resources.py:991: UserWarning: /home/kevin/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning) FF == FAIL: test_syntax (mezzanine.core.tests.CoreTests) -- Traceback (most recent call last): File /home/kevin/mezzanine_dj16/mezzanine/mezzanine/core/tests.py, line 72, in test_syntax self.fail(Syntax warnings!\n\n%s % \n.join(warnings)) AssertionError: Syntax warnings! mezzanine/utils/tests.py:142: visually indented line with same indent as next logical line mezzanine/utils/docs.py:154: visually indented line with same indent as next logical line mezzanine/utils/docs.py:199: visually indented line with same indent as next logical line mezzanine/project_template/settings.py:251: block comment should start with '# ' mezzanine/project_template/settings.py:252: block comment should start with '# ' mezzanine/accounts/forms.py:215: visually indented line with same indent as next logical line mezzanine/core/middleware.py:204: visually indented line with
Re: [mezzanine-users] Tests failing
Looks like all tests are passing. On Tue, Apr 22, 2014 at 7:54 PM, Kevin Golding kevingolding2...@gmail.comwrote: Hi Stephen Thanks for the timely response. When you mentioned the bad/missing Pillow install I recalled that I originally had some issues with Pillow. I think Pillow itself has a number of (possibly undocumented?) dependencies and things go quite wrong if they are not met when you try to install. In the end I started from scratch and created a new VM, and made sure that I had all the dependencies that I could find for Pillow before attempting to install it. Then I followed the steps exactly in your 'Contributing' section with the exception that I specified 'pyflakes==0.6.1 pep8==1.4.1' when installing these bits, as per the test_require line in setup.py. Now when I run the tests it ends up saying OK (skipped=2, expected failures=1). Is this close enough in terms of 'all tests passing'? I don't see anything about failures in the output, though I get a number of warnings about things being deprecated (which is why I'm doing all this in the first place). Regards Kevin On Sunday, April 20, 2014 5:22:36 PM UTC-7, Stephen McDonald wrote: Those all look like dependency issues. Making sure you've got the correct versions of the test dependencies (as per `tests_require` in setup.py) should fix the first failure. The second and third look due to a bad/missing PIL/Pillow install. The failures against Django 1.7 are expected - there's a lot of work to be done there. On Mon, Apr 21, 2014 at 9:48 AM, Kevin Golding kevingol...@gmail.comwrote: Hi all I was planning to make some changes for things that are deprecated in Django1.7, so I forked Mezzanine on bitbucket and did all the steps in the Contributing section to create a development environment (but using my fork on bitbucket instead of the github one listed). However before I made any actual changes I ran the 'manage.py test' command just to see how it worked, and it reported 3 errors. I'm not really sure what to do now. If I make my changes will the pull request be rejected because the tests don't pass for unrelated reasons? I've pasted in the output of the test run below. Note that this is running against Django 1.6.2. I also have an environment set up with Django 1.7, and when I run the tests there I get 8 'errors' in addition to the 3 'failures'. Any suggestions what I should do now? Thanks Kevin = (mezz_dj16)kevin@ubuntu:~/mezzanine_dj16/mezzanine$ ./mezzanine/project_template/manage.py test /home/kevin/mezzanine_dj16/mezzanine/mezzanine/utils/conf.py:51: UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django 1.5 requires. Will fall back to the domains configured as sites. warn(You haven't defined the ALLOWED_HOSTS settings, which /home/kevin/mezzanine_dj16/mezzanine/mezzanine/utils/conf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Australia/Sydney warn(TIME_ZONE setting is not set, using closest match: %s % tz) Creating test database for alias 'default'... .x.. .s.. /home/kevin/mezzanine_dj16/mezz_dj16/local/lib/ python2.7/site-packages/django/http/response.py:330: DeprecationWarning: Using mimetype keyword argument is deprecated, use content_type instead super(HttpResponse, self).__init__(*args, **kwargs) ...F..s./home/kevin/mezzanine_dj16/mezz_ dj16/local/lib/python2.7/site-packages/pkg_resources.py:991: UserWarning: /home/kevin/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning) FF == FAIL: test_syntax (mezzanine.core.tests.CoreTests) -- Traceback (most recent call last): File /home/kevin/mezzanine_dj16/mezzanine/mezzanine/core/tests.py, line 72, in test_syntax self.fail(Syntax warnings!\n\n%s % \n.join(warnings)) AssertionError: Syntax warnings! mezzanine/utils/tests.py:142: visually indented line with same indent as next logical line mezzanine/utils/docs.py:154: visually indented line with same indent as next logical line mezzanine/utils/docs.py:199: visually indented line with same indent as next logical line mezzanine/project_template/settings.py:251: block comment should start with '# ' mezzanine/project_template/settings.py:252: block comment should start with '# ' mezzanine/accounts/forms.py:215: visually indented line with same
[mezzanine-users] How do I stop the sitemap showing local host on the live site?
I'm having fun with Mezzanine: Using Django 1.6.2, mezzanine 3.0.6 and Python 3; I've just migrated www.paulwhippconsulting.com from an old Joomla 1.5 version. The site is like the 'plumber's dripping tap' and Mezzanine certainly saved me a lot of time now I've finally got around to updating it. I only have one big issue with the site now that it is deployed which I'm investigating but I thought I'd mention it here in case anyone has a quick solution: The sitemap file http://www.paulwhippconsulting.com/sitemap.xml is showing my local development as the host url. -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] How do I stop the sitemap showing local host on the live site?
Absolutely correct. I went to delete it and it wanted to delete all my content. However, editing the existing entry to reflect my main domain paulwhippconsulting.com worked fine. I also use paulwhippconsulting.com.au. This now also has the sitemap for paulwhippconsulting.com. I'm not sure if this matters; I probably would be better off just redirecting were it not for the fact that my Australian customers like to know my business is Australian. I guess I'll have to read more about sites. Thanks for the quick response. On Wednesday, April 23, 2014 10:18:40 AM UTC+10, Stephen McDonald wrote: There's a sites section in the admin for configuring each site record (which most content has a relation to). Guessing you've got one record in there, and its domain is localhost. On Wed, Apr 23, 2014 at 10:16 AM, Paul Whipp paul@gmail.comjavascript: wrote: I'm having fun with Mezzanine: Using Django 1.6.2, mezzanine 3.0.6 and Python 3; I've just migrated www.paulwhippconsulting.com from an old Joomla 1.5 version. The site is like the 'plumber's dripping tap' and Mezzanine certainly saved me a lot of time now I've finally got around to updating it. I only have one big issue with the site now that it is deployed which I'm investigating but I thought I'd mention it here in case anyone has a quick solution: The sitemap file http://www.paulwhippconsulting.com/sitemap.xml is showing my local development as the host url. -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] How do I stop the sitemap showing local host on the live site?
I think the current school of thought in SEO would suggest only one canonical host, and the other domain can just redirect to the primary one - I usually do this in the nginx config but it'd work equally well with apache or some other web server. On Wed, Apr 23, 2014 at 10:31 AM, Paul Whipp paul.wh...@gmail.com wrote: Absolutely correct. I went to delete it and it wanted to delete all my content. However, editing the existing entry to reflect my main domain paulwhippconsulting.com worked fine. I also use paulwhippconsulting.com.au. This now also has the sitemap for paulwhippconsulting.com. I'm not sure if this matters; I probably would be better off just redirecting were it not for the fact that my Australian customers like to know my business is Australian. I guess I'll have to read more about sites. Thanks for the quick response. On Wednesday, April 23, 2014 10:18:40 AM UTC+10, Stephen McDonald wrote: There's a sites section in the admin for configuring each site record (which most content has a relation to). Guessing you've got one record in there, and its domain is localhost. On Wed, Apr 23, 2014 at 10:16 AM, Paul Whipp paul@gmail.com wrote: I'm having fun with Mezzanine: Using Django 1.6.2, mezzanine 3.0.6 and Python 3; I've just migrated www.paulwhippconsulting.com from an old Joomla 1.5 version. The site is like the 'plumber's dripping tap' and Mezzanine certainly saved me a lot of time now I've finally got around to updating it. I only have one big issue with the site now that it is deployed which I'm investigating but I thought I'd mention it here in case anyone has a quick solution: The sitemap file http://www.paulwhippconsulting.com/sitemap.xml is showing my local development as the host url. -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] How do I stop the sitemap showing local host on the live site?
Done, thanks. On Wednesday, April 23, 2014 10:33:50 AM UTC+10, Stephen McDonald wrote: I think the current school of thought in SEO would suggest only one canonical host, and the other domain can just redirect to the primary one - I usually do this in the nginx config but it'd work equally well with apache or some other web server. On Wed, Apr 23, 2014 at 10:31 AM, Paul Whipp paul@gmail.comjavascript: wrote: Absolutely correct. I went to delete it and it wanted to delete all my content. However, editing the existing entry to reflect my main domain paulwhippconsulting.com worked fine. I also use paulwhippconsulting.com.au. This now also has the sitemap for paulwhippconsulting.com. I'm not sure if this matters; I probably would be better off just redirecting were it not for the fact that my Australian customers like to know my business is Australian. I guess I'll have to read more about sites. Thanks for the quick response. On Wednesday, April 23, 2014 10:18:40 AM UTC+10, Stephen McDonald wrote: There's a sites section in the admin for configuring each site record (which most content has a relation to). Guessing you've got one record in there, and its domain is localhost. On Wed, Apr 23, 2014 at 10:16 AM, Paul Whipp paul@gmail.com wrote: I'm having fun with Mezzanine: Using Django 1.6.2, mezzanine 3.0.6 and Python 3; I've just migrated www.paulwhippconsulting.com from an old Joomla 1.5 version. The site is like the 'plumber's dripping tap' and Mezzanine certainly saved me a lot of time now I've finally got around to updating it. I only have one big issue with the site now that it is deployed which I'm investigating but I thought I'd mention it here in case anyone has a quick solution: The sitemap file http://www.paulwhippconsulting.com/sitemap.xml is showing my local development as the host url. -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[mezzanine-users] Tool for drawing mezzanine model graph
Hi all, I am looking at mezzanine docs these days and today I find a page regarding model graph. Here is the graph link: http://mezzanine.jupo.org/docs/_images/graph.png So, anybody know which tool is used to generate this graph, python specific tool? Thanks. Wesley -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Tool for drawing mezzanine model graph
It's from django-extensions: http://django-extensions.readthedocs.org/en/latest/graph_models.html On Wed, Apr 23, 2014 at 11:53 AM, Wesley nisp...@gmail.com wrote: Hi all, I am looking at mezzanine docs these days and today I find a page regarding model graph. Here is the graph link: http://mezzanine.jupo.org/docs/_images/graph.png So, anybody know which tool is used to generate this graph, python specific tool? Thanks. Wesley -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[mezzanine-users] Task List: Test that need to be written
Hello everyone. I've setup a task listhttps://github.com/stephenmcd/mezzanine/issues/1012of tests that need to be written for Mezzanine. If you can think of any feature that needs to be protected from unintentional breaking, please comment on the issue (or here) to have it added to the list, or contribute the test itself! Hopefully this will make Mezzanine more robust and stable from one release to the other. It will also create a centralized space for new contributors to tackle issues. Looking forward to listening at your ideas. The link again: https://github.com/stephenmcd/mezzanine/issues/1012 -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.